Test
  • Introduction
  • Regression Testing
  • Unit Test
  • reflection
  • terminology
  • Defect Life Cycle
  • NullVSNotNull
  • @Before VS @BeforeEach VS...
  • JUnit Runner
  • run only functional test or integration test
  • cucumber/tags
  • cucumber/ options
  • cucumber/runwith
  • parallel cucumber test
  • cucumber/some eg
  • Hamcrest for testing
  • continuous integration
  • work flow for functional test
  • unit test for server side
  • other
  • Mock
  • jacoco&mutation
  • PowerMockito
  • performance test
Powered by GitBook
On this page

Was this helpful?

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:

  1. Clone project locally

  2. Run “mvn clean install -Dmaven.test.failure.ignore=true”

  3. 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"

PreviousJUnit RunnerNextcucumber/tags

Last updated 5 years ago

Was this helpful?