Welcome to the Question and Answer site for Software Testing Professionals

You can get your queries resolved from Software Testing Professionals.

Ask a Question

Get answers and give answers to questions from other members.

View All Questions

Get votes and earn points to build your reputation in community.

View Hot Questions

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

Open 1 Answers 22 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 (200 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.

We have resolved 1.2k+ Software Testing queries!

Software Testing Board Weekly update

We will send you handpicked questions that you would love to answer.

View previous campaigns.

Top Contributors

...