Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to include or exclude tags while doing parallel execution using serenity #3431

Open
geetha051993 opened this issue Apr 4, 2024 · 4 comments
Labels

Comments

@geetha051993
Copy link

i have tried giving @tags in testrunner class, also in serenity.properties file and in cucmber.properties file none of these works for me.
irrespective of tags all scenarios were executing parallelly.

can anyone help me on this issue, how to run specific scenarios parallelly .

testrunner:
@suite
@IncludeEngines("cucumber")
@SelectClasspathResource("com.health.bdd")
@SelectClasspathResource("/features/parallel1")
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "com.health.bdd")
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "io.cucumber.core.plugin.SerenityReporterParallel,pretty,json:target/cucumber.json,"
+ "timeline:target/test-results/timeline")
@CucumberOptions(tags = "@parw")

cucumber.properties

cucumber.execution.order = fixed
cucumber.plugin=pretty,json:target/cucumber.json,timeline:target/test-results/timeline
cucumber.snippet-type=camelcase
cucumber.filter.tags= @parw
cucumber.options=--tags @parw

serenity.properties

serenity.tag.ignore=parw

Thanks in Advance

@geetha051993
Copy link
Author

geetha051993 commented Apr 8, 2024

Hi @wakaleo , i have tried but still no luck
@suite
@IncludeEngines("cucumber")
@SelectClasspathResource("com.health.bdd")
@SelectClasspathResource("/features/Workflow")
//@SelectClasspathResource("/features/parallel")
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "com.health.bdd")
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "io.cucumber.core.plugin.SerenityReporterParallel,pretty,json:target/cucumber.json,"
+ "timeline:target/test-results/timeline")
@ConfigurationParameter(key = FILTER_TAGS_PROPERTY_NAME, value = "@parallel and @parallel4")
public class CucumberTestSuite {

getting below error else it won't execute anything if i passed DefaultParallelExecutionConfigurationStrategy. as fixed:

org.junit.platform.commons.JUnitException: TestEngine with ID 'cucumber' failed to execute tests
Caused by: org.junit.platform.commons.JUnitException: Error executing tests for engine cucumber
Caused by: java.lang.IllegalArgumentException: No enum constant org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfigurationStrategy.RANDOM
at java.base/java.lang.Enum.valueOf(Enum.java:273)
at io.cucumber.junit.platform.engine.CucumberTestEngine.createExecutorService(CucumberTestEngine.java:68)

@geetha051993
Copy link
Author

@wakaleo Thank you , it's working

@wakaleo
Copy link
Member

wakaleo commented Apr 12, 2024

That looks like a Cucumber or JUnit dependency issue of some kind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants