I have a dream I would like to achive with Cucumber.
I would like to combine cucumber with selenium (<= so far so good) AND optimize the test execution with tags. In my dream I'm able to tag my szenarios with Strings which represent a database szenario. For example:
@noData
Scenario: bake a bread
@oneBread
Scenario: look at bread
@tenBreads
Scenario: give multiple breads to the poor
Some of my tests alter the data, some don't. So I thought, how about clustering all "non-altering" tests to access the given data in parallel
@viewOnly
Scenario: look at a bread
@viewOnly
Scenario: smell a bread
With this kind of clustering I aim to achive the slightest setup and working in parallel if possible.
@noData
@viewOnly
Scenario: bake a bread
when i bake a bread
then i see a bread
@oneBread
@viewOnly
Scenario: look at a bread
then i see a bread
@oneBread
@viewOnly
Scenario: smell a bread
then i see a bread
@oneBread
Scenario: slice a bread in half
when i slice my bread
then i got two parts of the bread
@oneBread
Scenario: butter a bread
when i butter my bread
then i got one bread covered in butter
With this Feature file, I'd expect that this solution would process the features in the following order:
- Setup Szenario in database => @noData
@noData => Scenario: bake a bread
- Setup Szenario in database => @oneBread
@oneBread => @viewOnly Scenario look at a bread
@oneBread => @viewOnly Scenario smell a bread
- Setup Szenario in database => @oneBread
@oneBread => Scenario slice a bread in half
- Setup Szenario in database => @oneBread
@oneBread => Scenario butter a bread
Once I played with JUnit runners and tried to process the created JUnit Tests on my own. Do I have to write my own JUnit runner again? Or is it possible to fullfil my requirements with Cucumber features ?
Can someone help me with that?