In the project I am currently working we are using cucumber for integration testing and to keep the regular daily builds from getting too big we use profiles using tags to have a smaller daily test and a larger weekly build test suite.
Now I have a scenario outline with example inputs that I want to split up so that one example is in the daily build and others in the weekly.
Something in the spirit of
Scenario Outline: Doing some tests
Given a step
When I do some <input>
Then I should get some <output>
Examples:
|input |output |
@daily
|daily 1 |daily 2 o |
@weekly
|week 1 |week 1 o |
|week 2 |week 3 o |
. .
. .
. .
|week 999 |week 999 o|
Is this possible in any way? Should it be? Or is it a dumb idea to do it this way?
We can define each scenario with a useful tag. Later, in the runner file, we can decide which specific tag (and so as the scenario(s)) we want Cucumber to execute. Tag starts with “@”. After “@” you can have any relevant text to define your tag.
In Cucumber, tags are used to associate a test like smoke, regression etc. with a particular scenario.
After some research I found out that this is already supported from out of the box. You just have to add two Example headers to the test. Using my own example from the question to illustrate
Scenario Outline: Doing some tests
Given a step
When I do some <input>
Then I should get some <output>
@daily
Examples:
|input |output |
|daily 1 |daily 2 o |
@weekly
Examples:
|input |output |
|week 1 |week 1 o |
|week 2 |week 3 o |
. .
. .
. .
|week 999 |week 999 o|
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With