Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cucumber-java test steps execute twice in IntelliJ

Normally I run Cucumber-Jvm tests using Run/Debug configuration. Once I tried to run one tests using Run window by selecting the scenario (right click and run) From that point on wards I see each time when I run test using Edit Configuration I see steps run twice.

I am using IntelliJ Community version

Anyone had this issue before could be any settings change.

like image 311
SMPH Avatar asked Oct 25 '25 03:10

SMPH


1 Answers

Right click on the Play button on your .feature file and select the last choice 'Create Scenario ...'. On the Program arguments box you should have CucumberJvm5SMFormatter only ONCE. I had:

--plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm5SMFormatter --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm5SMFormatter --name "^My Scenario$"

Simply, I deleted the second line:

--plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm5SMFormatter --name "^My Scenario$"

and it ran perfectly!

like image 88
Konstantinos Archimandritis Avatar answered Oct 26 '25 23:10

Konstantinos Archimandritis