Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a single cucumber scenario in Intellij?

I have a simple problem - I want to run a single Cucumber scenario, but I can't seem to find any option/configuration for that.

I have 5-6 scenarios and I can set up configurations to run all tests, but It takes too much time, when I am correcting one scenario...

like image 393
user3651806 Avatar asked May 19 '14 08:05

user3651806


People also ask

How do you run a cucumber scenario multiple times?

Cucumber can be executed in parallel using TestNG and Maven test execution plugins by setting the dataprovider parallel option to true. In TestNG the scenarios and rows in a scenario outline are executed in multiple threads. One can use either Maven Surefire or Failsafe plugin for executing the runners.


1 Answers

Tag the feature file with any name, you may add multiple tags separated with spaces.

Eg : @acceptance @regression

Now, add below options in the end of VM otions by editing configuration

-Dcucumber.options="--tags @acceptance"

Run the test and it will only trigger the feature files tagged with @acceptance

You can either set the configuration one for acceptance and one for regression or edit the configuration everytime you run it.

like image 175
Santhosh Velamarthi Avatar answered Oct 04 '22 15:10

Santhosh Velamarthi