run only functional test or integration test
How to run Cucumber Tests?
To run all features:
mvn test
To run specific feature:
Syntax: mvn test -Dcucumber.options="feature file location"
mvn test -Dcucumber.options="src/test/java/com/walmart/features/AcknowledgePayment.feature"
To run specific tag
mvn clean test -Dcucumber.options="--tags @Cart"
To run a single scenario in a feature file
Input feature file name and the line number of the scenario. This will execute only that scenario
mvn test -Dcucumber.options="src/test/java/com/walmart/features/EBT_CHECKOUT.feature:9"
To view cucumber Reports locally:
Clone project locally
Run “mvn clean install -Dmaven.test.failure.ignore=true”
Open html report located at target\cucumber-report-html\cucumber-html-reports\overview-features.html
Running a Specific feature and viewing Cucumber reports:
mvn clean install -Dmaven.test.failure.ignore=true -Dcucumber.options="src/test/java/com/walmart/features/OE.feature"
Last updated
Was this helpful?