LeeWay
LeeWay

Reputation: 803

Execute certain Examples from Scenario Outlines

I have to execute certain Examples from Scenario Outlines.

Let's see the following example:

Feature: Temp

Scenario Outline: Test.Something.On.<environment>
  When action is performed on "<environment>"

Examples:
 |environment|
 |lab        |
 |prod       |

I would like to execute only the example with lab from the upper presented Examples.

I tried the followings:

Any suggestions? Big thanks.

Another sub-keywords: maven, java, cucumber-java8, cucumber-junit, junit

Upvotes: 1

Views: 817

Answers (1)

Thomas Sundberg
Thomas Sundberg

Reputation: 4323

Use two examples in yoour scenario outline and tag each example in a similar way as you have done in your third option. That should give you the behaviour you are asking for.

Upvotes: 2

Related Questions