How to make serenity parallel with fork works when running test that have scenario outline with parameter on the title? #2261
shirokuma-ds posted onGitHub
Hi, so I follow the documentation on Serenity Parallel Batches and testing it out on Serenity Cucumber 5 Starter project. Trying it out, I am able to make it run parallelly when I have 2 features, one with 2 Scenario and the other feature have Scenario Outline with 2 examples.
But when I add a parameter on the Scenario Outline title, then It's unable to run the feature with the scenario outline and only running the other feature with 2 scenario. I check the log and it seems there is a mismatch when counting the scenarios that will be run
21:28:25.522 [main] INFO i.c.junit.CucumberSerenityRunner - Running slice 1 of 1 using fork 2 of 2 from feature paths [file:/D:/Automation%20Projects/Experiments/serenity-cucumber5-starter/src/test/res
ources/features/]
21:28:25.566 [main] INFO i.c.junit.CucumberSerenityRunner - Running slice 1 of 1 using fork 1 of 2 from feature paths [file:/D:/Automation%20Projects/Experiments/serenity-cucumber5-starter/src/test/res
ources/features/]
21:28:25.788 [main] INFO i.c.junit.CucumberSerenityRunner - 2 scenario(s) included for 'Search by keyword' in file:///D:/Automation%20Projects/Experiments/serenity-cucumber5-starter/src/test/resources/
features/search_by_keyword.feature
21:28:25.814 [main] INFO i.c.junit.CucumberSerenityRunner - Filtered out all 2 scenarios for feature 'Defining Meaning'
21:28:25.816 [main] WARN i.c.junit.CucumberSerenityRunner - There is a mismatch between the number of scenarios included in this test run (0) and the expected number of scenarios loaded (1). This sugge
sts that the scenario filtering is not working correctly or feature file(s) of an unexpected structure are being run
21:28:25.789 [main] INFO i.c.junit.CucumberSerenityRunner - Included scenario 'Searching for a term(Search by keyword)'
21:28:25.816 [main] INFO i.c.junit.CucumberSerenityRunner - Running 0 of 2 features
Here is the 2 features Feature 1 (this one run) Feature 2 (this one not able to run when I add <term> parameter on the title)
I am running it using this command:
mvn clean verify -Dcucumber.options="--tags @Sanity" -Dserenity.batch.count=1 -Dserenity.batch.number=1 -P useTheForks
Why there is a mismatch? Is it because when I add the <term> parameter it count this as 2 different scenario, thus unable to divide this correctly? And how do I solve this? Thanks.