serenity-bdd / serenity-cucumber-starter

A skeleton project for Serenity BDD and Cucumber JVM
Apache License 2.0
179 stars 292 forks source link

parallel execution not working with serenity version 3.2.1 #79

Open ssumitagroya opened 2 years ago

ssumitagroya commented 2 years ago

Hi,

I am using serenity 3.2.1 version for parallel execution of feature files. Earlier it was working with 2.0.90. Please refer attached pom.xml.

serenity 2.0.90 version pom.xml

<?xml version="1.0" encoding="UTF-8"?>

4.0.0 org.example new-artifact 1.0-SNAPSHOT jar New Project UTF-8 2.0.90 2.0.90 1.0.29 4.8.0 2.10.1 1.0.3 1.2.3 1.19.4 1.12.0 3.0.0-M4 UTF-8 20 false central bintray https://jcenter.bintray.com false central bintray-plugins https://jcenter.bintray.com ch.qos.logback logback-classic ${serenity.logs} ch.qos.logback logback-core ${serenity.logs} net.serenity-bdd serenity-core ${serenity.version} test io.cucumber cucumber-core io.cucumber cucumber-java ${cucumber.version} io.cucumber cucumber-junit ${cucumber.version} com.fasterxml.jackson.core jackson-databind ${serenity.database.version} com.fasterxml.jackson.core jackson-core ${serenity.database.version} com.fasterxml.jackson.core jackson-annotations ${serenity.database.version} com.fasterxml.jackson.dataformat jackson-dataformat-xml ${serenity.database.version} com.fasterxml jackson-xml-databind 0.6.2 org.apache.httpcomponents httpclient 4.5.10 org.apache.httpcomponents httpcore 4.4.12 org.apache.httpcomponents httpmime 4.5.10 io.dropwizard.metrics metrics-httpclient 4.1.2 net.sourceforge.jtds jtds 1.3.1 org.jdbi jdbi 2.78 com.sun.jersey jersey-client ${jersey.version} com.sun.jersey jersey-json ${jersey.version} log4j log4j 1.2.17 net.serenity-bdd serenity-junit ${serenity.version} test net.serenity-bdd serenity-spring ${serenity.version} test net.serenity-bdd serenity-cucumber4 ${serenity.cucumber.version} net.serenity-bdd serenity-jira-plugin ${serenity.jira} net.serenity-bdd serenity-jira-requirements-provider ${serenity.jira} net.serenity-bdd serenity-rest-assured ${serenity.version} net.serenity-bdd serenity-screenplay-rest ${serenity.version} net.serenity-bdd serenity-screenplay-webdriver ${serenity.version} test org.apache.poi poi 3.10-FINAL org.apache.poi poi-ooxml 3.10-FINAL com.microsoft.sqlserver mssql-jdbc 8.1.1.jre13 org.apache.commons commons-email 1.5 com.sun.mail smtp 1.6.4 net.lingala.zip4j zip4j 1.2.4 junit junit 4.12 test org.assertj assertj-core 3.6.2 test org.hamcrest hamcrest-all 1.3 test net.serenity-bdd serenity-emailer ${serenity.version} com.browserstack browserstack-local-java ${browserstack.local.version} net.serenity-bdd serenity-browserstack ${serenity.version} org.apache.maven.plugins maven-failsafe-plugin ${apache.maven.plugins} test com.amazonaws aws-java-sdk 1.11.163 commons-io commons-io 2.4 se.sawano.java alphanumeric-comparator 1.4.1 org.apache.maven.plugins maven-clean-plugin 3.1.0 ${project.basedir} **/*.tmp **/*.log **/important.log **/another-important.log false org.apache.maven.plugins maven-surefire-plugin ${apache.maven.plugins} true maven-failsafe-plugin ${apache.maven.plugins} **/ParallelRunner*.java ${webdriver.base.url} methods ${parallel.tests} false integration-test verify org.apache.maven.plugins maven-compiler-plugin 3.8.0 1.8 1.8 net.serenity-bdd.maven.plugins serenity-maven-plugin ${serenity.maven.version} ${tags} serenity-reports post-integration-test aggregate parallel maven-failsafe-plugin ${apache.maven.plugins} **/ParallelRunner*.java ${webdriver.base.url} methods ${parallel.tests} false single maven-failsafe-plugin ${apache.maven.plugins} **/SingleRunner.java ${webdriver.base.url}

serenity 3.2.1 version pom.xml

<?xml version="1.0" encoding="UTF-8"?>

4.0.0 org.example new-artifact 1.0-SNAPSHOT jar New Project UTF-8 3.2.1 2.1.0 3.2.1 2.1.0 7.0.0 2.10.1 1.0.3 1.2.10 1.19.4 1.12.0 3.0.0-M5 UTF-8 20 false central bintray https://jcenter.bintray.com false central bintray-plugins https://jcenter.bintray.com ch.qos.logback logback-classic ${serenity.logs} ch.qos.logback logback-core ${serenity.logs} net.serenity-bdd serenity-core ${serenity.version} test io.cucumber cucumber-java ${cucumber.version} io.cucumber cucumber-core ${cucumber.version} io.cucumber cucumber-junit ${cucumber.version} net.serenity-bdd serenity-junit ${serenity.version} test net.serenity-bdd serenity-cucumber 3.2.1 net.serenity-bdd serenity-screenplay-rest ${serenity.version} net.serenity-bdd serenity-screenplay-webdriver ${serenity.version} test net.serenity-bdd serenity-ensure ${serenity.version} test org.apache.poi poi 3.10-FINAL org.apache.poi poi-ooxml 3.10-FINAL net.lingala.zip4j zip4j 2.10.0 org.junit.platform junit-platform-launcher 1.8.2 test org.junit.jupiter junit-jupiter-engine 5.8.2 test org.junit.vintage junit-vintage-engine 5.8.2 test junit junit 4.13.2 test org.assertj assertj-core 3.6.2 test com.browserstack browserstack-local-java ${browserstack.local.version} net.serenity-bdd serenity-browserstack ${serenity.version} org.apache.maven.plugins maven-failsafe-plugin ${apache.maven.plugins} test com.amazonaws aws-java-sdk 1.12.198 net.serenity-bdd serenity-cucumber4 2.1.2 se.sawano.java alphanumeric-comparator 1.4.1 org.apache.maven.plugins maven-clean-plugin 3.1.0 ${project.basedir} **/*.tmp **/*.log **/important.log **/another-important.log false org.apache.maven.plugins maven-surefire-plugin ${apache.maven.plugins} true maven-failsafe-plugin ${apache.maven.plugins} **/ParallelRunner*.java ${webdriver.base.url} methods ${parallel.tests} integration-test verify org.apache.maven.plugins maven-compiler-plugin 3.8.1 1.8 1.8 net.serenity-bdd.maven.plugins serenity-maven-plugin ${serenity.maven.version} ${tags} serenity-reports post-integration-test aggregate parallel maven-failsafe-plugin ${apache.maven.plugins} **/ParallelRunner*.java ${webdriver.base.url} methods classes true single maven-failsafe-plugin ${apache.maven.plugins} **/SingleRunner*.java ${webdriver.base.url}

Runner File

import io.cucumber.junit.CucumberOptions; import net.serenitybdd.cucumber.CucumberWithSerenity; import org.junit.runner.RunWith;

@RunWith(CucumberWithSerenity.class) @CucumberOptions( features = "classpath:features", glue = "com.abc.stepDefs", tags = "@regression" )

public class ParallelRunner { }

Can someone please help me to understand how can I fix this.

wakaleo commented 2 years ago

It's a known cucumber 7 issue - in Cucumber 7 parallel execution doesn't seem to work the way it's supposed to according to the Cucumber docs.