Skip to main content

POS Test Automation Training Workspace Setup

Overview

This document explains how to set up a POS Automation Training Workspace for writing and executing automation tests on POS. It is assumed that you already have a standard Training Workspace Setup.

If you have already set up the training workspace, you do not need to follow the steps below. You can directly proceed to Running a Feature. (As a prerequisite, you may need to complete the Cucumber Plugin Installation if it has not already been installed.)

If you are using an MSI POS, completing the steps in this guide will create a separate Eclipse workspace that contains all the required projects and launch configurations to act as the Automation Client.

When your Training POS is configured to run in Automation Mode, it will operate as the AUT server, while the AUT launches from this Automation Workspace will serve as the AUT client, enabling end-to-end automation.

PosAutomation Testing Architecture

What You Will Learn

  • How to setup Eclipse to support POS Automation
  • How to set up the Eclipse workspace to run POS Automation using Maven scripts and MSI POS.

Pre-requisites

  • Java

  • Eclipse IDE

    • If Your Workspace Platform Version is TRUNK-SNAPSHOT, 2.7-SNAPSHOT or above 2.7.1615 (i.e Compiler Compliance Level of the Projects is Java 1.8)
      Download :Eclipse 2025-09
      For Other Platform Versions (i.e Compiler Compliance Level of the Projects is Java 1.7)
      Download :Eclipse 2024-06
  • Access to Artifactory

  • Ensure that Enactor Automation POS is set up.

    • If you have already completed the Training Workspace setup, you should see the Training Automation React POS Launcher under Java Applications in Eclipse.

POS Automation Java Launcher

Setup an MSI POS in Automation Mode

You will also need an installed Enactor POS (installed using the standard Enactor MSI).

Fresh Installation

Install MSI POS:

  • The following installer property should be set in the .ini file during the installation
    AUTOMATION_TEST_MODE=true

Existing Installation

If you have installed the Enactor POS without the property above in the .ini file, you can activate the Automation Mode using the following step:

  • Navigate to the POS installation directory (e.g. C:\enactor\pos\scripts), open the setEnv.ps script using a text editor and add the following line:

    set AUTOMATION_TEST_MODE=true
note

The following guide has been written with Microsoft Windows as the base operating system. As a result, some references to application options and screenshots may differ.

Using the Automation Workspace Setup

Download the following zip file AutomationWorkspaceSetup.zip and extract it into the C:\Development directory

Launch Eclipse and when prompted for a workspace enter the following path C:\Development

Launch Eclipse Development Dir Workspace

Click Launch... button

Cucumber Plugin Installation

Download Cucumber V2

Extract the ZIP file.

To install the Cucumber plugin, Open the Install New Software wizard by selecting the Help Menu -> Install New Software

Select Install New Software

Then, navigate to Add -> Local and Browse to the extracted folder.

Install New Software Dialoge

Select available plugin Cucumber Eclispe Plugin plugin and Click Next...button

Install Cucumber

Complete the installation and allow Eclipse to restart.

Setting up Maven

To use the Maven Dependency manager with Enactor you will first need to set up Maven.

Create a new Maven respository directory named .m2 within you user account directory C:\Users\<USER_NAME>\.m2

Create M2 Directory

From your OS file system, copy the checkout setting.xml file found within /WorkspaceSetup/Config/maven to the newly created .m2 directory.

Checked Out Settings XML

Edit the settings.xml file and replace the following placeholders USER_NAME and PASSWORD with your Enactor Active Directory Credentials

Edit Settings XML

Open the Eclipse Preferences menu and enter Maven in the search bar.

Select the Maven -> User Settings

Open Maven Preferences

Confirm that your settings.xml appears in the User Settings Field and that the local Repository Field is also populated

Confirm Maven Settings

Switching to the Automation Workspace

Browse to the AutomationWorkspace directory under /WorkspaceSetup/.

To switch to the Automation workspace, select File menu -> Switch Workspace -> Other

Switch Workspace

When prompted for a workspace browse to and select the /WorkspaceSetup/AutomationWorkspace directory and click the Select Folder... button

Browse To Workspace

Click Launch... button

Launch New Workspace

Defining an installed JRE

Open the Eclipse Preferences menu

Select Java -> Installed JREs

Select Installed JREs

Click Add...button

Select Standard VM for the installed JRE Type

Click Next...button

Select JRE Type

Update the JRE home text box by browsing / entering the location of the JDK home directory

Update the JRE name text box by entering default_jre

Click Finish...button

Set JRE as Default

Check the default_jre to make it the default JRE eclipse should use

Use As Default JRE

Click Apply and Close

Import Config

Select File menu -> Import

From the Import dialog, Expand the General collection and select Existing Projects into Workspace

Click Next... button

Update the Select root directory text box by browsing to the location of the /WorkspaceSetup

Select Search for nested projects

Click on the Deselect All button

Select the Config project.

Click Finish

import config

Importing The Working Projects

Select File menu -> Import

From the Import dialogue, Expand the Maven collection and select Existing Maven Projects

Select Import Existing Maven Projects

Click Next... button

Update the Root directory text box by browsing to the location of the /WorkspaceSetup/CustomerProducts

Expand Advanced and from the drop-down of Name Template select name

Click Finish... button

SelectToImportWorkspaceProjects

The platform version included in the Automation training workspace setup is for the Standard Enactor Training Version.

If you need to configure the workspace for a different platform, update the platform branch and platform version appropriately.

Training Parent POM

Build the Working Projects

As the projects are imported they will trigger a build phase. This can take some time. If the projects do not build successfully or the build phase did not start, you will need to perform a manual maven install on the project Workspace Projects using the supplied MVN Install (Training Automation Projects).

To run MVN Install (Training Automation Projects), Select Run menu -> Run Configurations

GRD Select Run Configurations

Select MVN Install (Training Projetcs)

MVNConfiguration

Go to the JRE section, choose Alternate JRE:, select the installed Java version, and click Run to proceed.

JRE Selection

Once the build is completed right click on the WorkspaceProject -> Maven -> Update Projects...

Select Maven Update

Click Select All... button

Click OK... button

Maven Update Select All

On eclipse, right click on the EnactorHome folder and select Refresh.

Adding Core Automation Jar to the POS

For the AUT Launcher to successfully run you will need to update the classpath of your POS Application

  • Ensure that the Core Automation JAR is included in the classpath of your Training Automation React POS application.

  • For an MSI POS, copy the JAR file located in Development\WorkspaceSetup\Software\coreAutomation and place it in the Enactor\pos\custom-lib directory.

Running a feature

We can run Automation Tests using either Cucumber or Maven. In both cases, ensure the automation parameters are populated correctly.

Run Using Cucumber

To run a feture test, a convenient launch has been provided TrainingFunc1.feature.

Refer to Adding Enactor Step Definition Filters to access Enactor behavior-driven development steps within feature files.

To correctly set up the parameters in the launcher.properties file, refer to Update Parameters.

To run the TrainingFunc1.feature feature, Select Run menu -> Run Configurations

Select Feature Launch

Click Run... button

Run Using Maven

To run a feature you should have a Maven Run Configuration. ( For more details refer How to run tests using Maven)

Parameters should be changed appropriately. You can refer Launch Configurations and update accordingly.

Select Config Enactor Home

Go to Run menu -> Run Configurations -> Maven Build and select Training React POS AUT Run

Select Config Enactor Home

Click Run... button