Skip to main content

Running Automation Tests Using Maven

Overview

Enactor lets you run automation scripts that can drive the POS behaviour using Maven. This guide explains how to create a new maven launch.

Steps to create the Launch

Given a Pos Automation Feature we can create a maven launch and execute the tests.

Go to Run -> Run Configuration -> Maven Build and create a new maven launch.

Choose the Automated Test Project containing the feature files as the Base Directory.

Populate the Goals

clean install test -DforkCount=0 -Dcucumber.plugin="pretty" -Dcucumber.filter.tags="@PT-20000" -Dcucumber.publish.quiet=true

-Dcucumber.filter.tags refers to the tags associated with scenarios in your feature files that needs to be executed.

Set Maven Profiles

maven-postman-integration - This maven profile should be added to the launch configuration if the automated tests you intend to run include any Postman Collections steps. This profile is responsible for installing any prerequisites needed to run Postman collections.

Add Parameters

Refer Launch Configurations to get details about the launcher parameters.

Once you have set up, your maven launcher should be shown as below.

Launch Configuration

After adding all the parameters correctly, click Run to execute the test.