Reputation: 1801
I am using cucumberjs and taiko to run some browser tests on an application I'm building. I have created a number of .feature
files, and tagged different tests within these files to build a sort of playlist of tests. This works perfectly in serial but I'd like to start running these in parallel. Given the tests are driving a headless browser, I'd like to be able to run one tag per parallel instance, so that each instance is only concerned with one tag at a time and thus one browser.
#foobar.feature
@userGroup1
Feature: foo
Given I am a user of the system
When I say foo
Then you say bar
@userGroup2
Feature: biz
Given I am a user of the system
When I say biz
Then you say baz
@userGroup3
Feature: qux
Given I am a user of the system
When I say qux
Then you say quux
#pizza.feature
@userGroup1
Feature: pizza
Given I am a user of the system
When I ask for pizza
Then you send a cheese pizza
@userGroup2
Feature: delicious pizza
Given I am a user of the system
When I ask for delicious pizza
Then you send a pepperoni pizza
@userGroup3
Feature: bad pizza
Given I am a user of the system
When I ask for bad pizza
Then you send a pineapple pizza
Given the above, Ideally I'd like to be able to run the three tags in parallel, but have something like
Since the tests are running in a browser and driving user input, I cannot simply ask cucumber to run these in parallel as my playlists/tags are stateful, so if I did something like `tags = "userGroup1 OR userGroup2" the tests would not be in the expected state and would fail. I appreciate that one of the principals of cucumber is that scenarios are not dependent on one another, but I am where I am and believe a workaround is possible. This is easily achievable in serial using the JS API and looping thru the tags, but as my feature files are growing its taking much longer.
I'd also like to be able to view a report per instance/tag at the end if possible. Again, a simple task when done one at a time but I'm not sure how to achieve this in parallel.
Upvotes: 0
Views: 50