James GameSparks
2014-12-12 12:50:28 UTC
Hello all,
I have multiple .features in my test suite.
*scores.featureteams.feature*
Within those .features are multiple scenarios.
*scores.feature*
Scenario: create Score
....
Scenario: edit Score
....
*teams.feature*
Scenario: create Team
....
Scenario: edit Team
....
My features are organised and grouped by areas of our system. However, I
want to add some new scenarios within a feature (for example, that create
team scores) which would rely on other features being run first (i.e.
create the teams first in *teams.feature*):
*scores.feature*
Scenario: create Score
....
Scenario: edit Score
...
*Scenario: create Team Score....*
Because I want to add scenarios that relate more to the *scores.feature*,
that's where they should belong. But I can't run them if some of the
scenarios in the *teams.feature* haven't run first. How can I do that?
Let's also say that *scores.feature* MUST run before *teams.feature*
because of other dependencies.
I tried running the features (in sequence) with tags:
*scores.feature*
*@default*
Scenario: create Score
....
*@default*
Scenario: edit Score
...
*@teams*
Scenario: create Team Score
....
*teams.feature*
*@default*Scenario: create Team
....
*@default*Scenario: edit Team
....
then running them with:
cucumber BASE_URL=https://mygame.com RESOURCES_DIR=tests/features/resources
tests/features/scores.feature tests/features/teams.feature --tags @default
@teams
or
cucumber BASE_URL=https://mygame.com RESOURCES_DIR=tests/features/resources
tests/features/scores.feature tests/features/teams.feature --tags
@default,@teams
But this will just run all the scenarios within *scores.feature* first
(including any with @teams tag) and then run *teams.feature* afterwards.
Obviously, when it gets to the "create Team Score" scenario, it fails
because it doesn't have info it needs from the *teams.feature* being run
first.
How can I make it run through the *scores.feature*, run the original
scenarios ignoring the "create Team Scores" scenario for now, then run
through the *teams.feature*, coming back to *scores.feature* and run the
new "create Team Scores" scenario, without having to run two separate
commands such as:
--tags @default --tags ~@teams
then:
--tags @teams
I have multiple .features in my test suite.
*scores.featureteams.feature*
Within those .features are multiple scenarios.
*scores.feature*
Scenario: create Score
....
Scenario: edit Score
....
*teams.feature*
Scenario: create Team
....
Scenario: edit Team
....
My features are organised and grouped by areas of our system. However, I
want to add some new scenarios within a feature (for example, that create
team scores) which would rely on other features being run first (i.e.
create the teams first in *teams.feature*):
*scores.feature*
Scenario: create Score
....
Scenario: edit Score
...
*Scenario: create Team Score....*
Because I want to add scenarios that relate more to the *scores.feature*,
that's where they should belong. But I can't run them if some of the
scenarios in the *teams.feature* haven't run first. How can I do that?
Let's also say that *scores.feature* MUST run before *teams.feature*
because of other dependencies.
I tried running the features (in sequence) with tags:
*scores.feature*
*@default*
Scenario: create Score
....
*@default*
Scenario: edit Score
...
*@teams*
Scenario: create Team Score
....
*teams.feature*
*@default*Scenario: create Team
....
*@default*Scenario: edit Team
....
then running them with:
cucumber BASE_URL=https://mygame.com RESOURCES_DIR=tests/features/resources
tests/features/scores.feature tests/features/teams.feature --tags @default
@teams
or
cucumber BASE_URL=https://mygame.com RESOURCES_DIR=tests/features/resources
tests/features/scores.feature tests/features/teams.feature --tags
@default,@teams
But this will just run all the scenarios within *scores.feature* first
(including any with @teams tag) and then run *teams.feature* afterwards.
Obviously, when it gets to the "create Team Score" scenario, it fails
because it doesn't have info it needs from the *teams.feature* being run
first.
How can I make it run through the *scores.feature*, run the original
scenarios ignoring the "create Team Scores" scenario for now, then run
through the *teams.feature*, coming back to *scores.feature* and run the
new "create Team Scores" scenario, without having to run two separate
commands such as:
--tags @default --tags ~@teams
then:
--tags @teams
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.