Reputation: 103
I have several API tests, and browser tests. Browser tests must run consistently. This documentation (https://github.com/cucumber/cucumber-jvm/tree/main/junit-platform-engine) says:
cucumber.execution.parallel.enabled=true
cucumber.execution.parallel.config.strategy=fixed
cucumber.execution.parallel.config.fixed.parallelism=4
cucumber.execution.exclusive-resources.reads-and-writes-system-properties.read-write=SYSTEM_PROPERTIES
But, how can I specify my browser tests instead of this resource?
Upvotes: 1
Views: 586
Reputation: 12029
If your exclusive resource is the browser you mentally reserve the string BROWSER
for it. It doesn't really matter what you name the resource, just that it is uniquely identifies the browser.
Then you decide which Cucumber tag matches this resource, say @browser
. Then you remove the @
from the tag and put the remainder in the properties file:
cucumber.execution.exclusive-resources.browser.read-write=BROWSER
Then you tag your scenario with @browser
:
Feature: Exclusive resources
@browser
Scenario: first example
Given this scenario uses the browser
@browser
Scenario: second example
Given this scenario uses the browser
You can also tag all scenarios in feature by tagging the feature
@browser
Feature: Exclusive resources
Scenario: first example
Given this scenario uses the browser
Scenario: second example
Given this scenario uses the browser
Upvotes: 1