Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

0
How run single scenario from feature file with multiple scenarios using the Eclipse IDE?

Open 1 Answers 59 Views
0 1
I want to run single scenario from feature file with multiple scenarios using the Eclipse IDE. I'm using JUnit as my testing framework. I was able to run in selenium spec-flow but I am using eclipse Mavan I am not sure how to do. But definitely, I was executing whatever the spec-flow feature I want to execute I was able to by highlighting and right click.

1 Answer

0
0
Firstly add annotations to your feature files e.g

@myFeature
Feature: ...

@oneOfMyScenarios
Scenario: ...
Given ...

@anotherScenario
Scenario: ...
Given ...

Then add the following argument to the VM args in Eclipse Run Configurations

Click Run in the top menu
Click Run configurations
Click on the JUnit test which runs the cucumber features
Click the arguments tab
Enter the following into the VM arguments box:
-Dcucumber.options="--tags @oneOfMyScenarios"
Hit run

The individual scenario that has been tagged with the specified annotation will run by itself.
answered by (202 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...