Parallel Execution not happening with Cucumber JVM 4.0.0 and Junit test runnerMaven/Junit Parallel Execution - Cucumber-JVM v4.0.0How do you assert that a certain exception is thrown in JUnit 4 tests?Run JUnit4-Tests parallel in EclipseHow to run scenarios in Cucumber-JVM in parallel?Parallel Cucumber-JVM Selenium Grid Tests using Maven Surefire[Cucumber][JVM][Maven]Tests dosen't run from command line through mavenCucumber JVM Parallel Plugin does not produce expected JSON report files when Allure argLines are introduced in mavenMaven/Junit Parallel Execution - Cucumber-JVM v4.0.0Getting error “Caused by: java.lang.IllegalArgumentException & java.net.URISyntaxException:” while executing Cucumber JVM Parallel PluginLooks like something is wrong in cucumber-jvm parallel and surefire plugin configurationSeems Maven Surefire is trying to connect to TestNG for running test cases after Cucumber-JVM Parallel Plugin creates Runner successfully
Dealing with an extrovert co-worker
Singleton Design Pattern implementation in a not traditional way
Shouldn't the "credit score" prevent Americans from going deeper and deeper into personal debt?
Science fiction short story where aliens contact a drunk about Earth's impending destruction
How do I request a longer than normal leave of absence period for my wedding?
for loop not working in bash
Are there any music source codes for sound chips?
Are modern clipless shoes and pedals that much better than toe clips and straps?
How would one country purchase another?
In an emergency, how do I find and share my position?
Why is my Earth simulation slower than the reality?
Fried gnocchi with spinach, bacon, cream sauce in a single pan
Is it safe to remove the bottom chords of a series of garage roof trusses?
What is the history of the university asylum law?
Does travel insurance for short flight delays exist?
What to say to a student who has failed?
How do applicants for an NSF fellowship come up with a research plan for the research statement part of the applications
Rule based coloured background for labeling in QGIS
What are some interesting features that are common cross-linguistically but don't exist in English?
Can pay be witheld for hours cleaning up after closing time?
Is there a known non-euclidean geometry where two concentric circles of different radii can intersect? (as in the novel "The Universe Between")
See details of old sessions
Is “I am getting married with my sister” ambiguous?
What is the difference between true neutral and unaligned?
Parallel Execution not happening with Cucumber JVM 4.0.0 and Junit test runner
Maven/Junit Parallel Execution - Cucumber-JVM v4.0.0How do you assert that a certain exception is thrown in JUnit 4 tests?Run JUnit4-Tests parallel in EclipseHow to run scenarios in Cucumber-JVM in parallel?Parallel Cucumber-JVM Selenium Grid Tests using Maven Surefire[Cucumber][JVM][Maven]Tests dosen't run from command line through mavenCucumber JVM Parallel Plugin does not produce expected JSON report files when Allure argLines are introduced in mavenMaven/Junit Parallel Execution - Cucumber-JVM v4.0.0Getting error “Caused by: java.lang.IllegalArgumentException & java.net.URISyntaxException:” while executing Cucumber JVM Parallel PluginLooks like something is wrong in cucumber-jvm parallel and surefire plugin configurationSeems Maven Surefire is trying to connect to TestNG for running test cases after Cucumber-JVM Parallel Plugin creates Runner successfully
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am unable to run features in parallel using cucumber JVM 4.0.0 and Junit testrunner. I just have one browser instance opening and once the execution is completed, browser closes and opens again for next feature execution.As per my thread count of 3 in Maven surefire, i expect 3 browser instances to be opened concurrently for running 3 features. I have followed the following link, but still not successful. The Features run one after another. I have used Pico container for DI.I followed this link for updating different version of Surefire plugin but still no luck. i have tried 4.0.0 as well as 4.2.0 for IO.cucumber Jars. I have tried different versions of surefire from 2.19 to 2.22 but still no luck.I have 3 features files and each of them have one scenario outline tagged as "@Parallel".I am not sure where am going wrong.I have tried parallel as "both" and "methods" in surefire plugin. My Junit version is 4.12.
My pom is as below.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>testcase</groupId>
<artifactId>xyzproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>xyzproject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cocumber.version>4.0.0</cocumber.version>
<picocontainer.version>4.0.0</picocontainer.version>
</properties>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repo.bodar.com</id>
<url>http://repo.bodar.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-java</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-picocontainer</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-junit</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-jvm</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>or.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.11-beta3</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-spis</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cocumber-reporting</artifactId>
<version>3.10.0</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-core</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>4.1.2</version>
</dependency>
<!--REPORTING -->
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compailer-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<fork>true</fork>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.20</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cocumber-reporting</artifactId>
<version>0.0.7</version>
<dependencies>
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>991</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectname>cucumber-jvm-example</projectname>
<outputDirectory>$project.build.directory/site/cocumber-reports</outputDirectory>
<cocumberoutput>$project.build.directory/cocumber.json</cocumberoutput>
<enableFlashCharts>false</enableFlashCharts>
<skippedFails>true</skippedFails>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
My testrunner is as below.
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = "html:target/cucumber-html-report",
"json:target/cucumber.json","pretty:target/cucumber-pretty.txt",
"usage:target/cucumber-usage.json, "junit:target/cucumber-results.xml",
features="src/test/resources/featuresfiles",strict=false,dryRun=false,
glue="Stepdef_new.stepdefinitions",
tags="@Parallel"
}
Public class TestRunner
java junit cucumber-jvm
add a comment |
I am unable to run features in parallel using cucumber JVM 4.0.0 and Junit testrunner. I just have one browser instance opening and once the execution is completed, browser closes and opens again for next feature execution.As per my thread count of 3 in Maven surefire, i expect 3 browser instances to be opened concurrently for running 3 features. I have followed the following link, but still not successful. The Features run one after another. I have used Pico container for DI.I followed this link for updating different version of Surefire plugin but still no luck. i have tried 4.0.0 as well as 4.2.0 for IO.cucumber Jars. I have tried different versions of surefire from 2.19 to 2.22 but still no luck.I have 3 features files and each of them have one scenario outline tagged as "@Parallel".I am not sure where am going wrong.I have tried parallel as "both" and "methods" in surefire plugin. My Junit version is 4.12.
My pom is as below.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>testcase</groupId>
<artifactId>xyzproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>xyzproject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cocumber.version>4.0.0</cocumber.version>
<picocontainer.version>4.0.0</picocontainer.version>
</properties>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repo.bodar.com</id>
<url>http://repo.bodar.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-java</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-picocontainer</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-junit</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-jvm</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>or.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.11-beta3</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-spis</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cocumber-reporting</artifactId>
<version>3.10.0</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-core</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>4.1.2</version>
</dependency>
<!--REPORTING -->
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compailer-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<fork>true</fork>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.20</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cocumber-reporting</artifactId>
<version>0.0.7</version>
<dependencies>
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>991</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectname>cucumber-jvm-example</projectname>
<outputDirectory>$project.build.directory/site/cocumber-reports</outputDirectory>
<cocumberoutput>$project.build.directory/cocumber.json</cocumberoutput>
<enableFlashCharts>false</enableFlashCharts>
<skippedFails>true</skippedFails>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
My testrunner is as below.
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = "html:target/cucumber-html-report",
"json:target/cucumber.json","pretty:target/cucumber-pretty.txt",
"usage:target/cucumber-usage.json, "junit:target/cucumber-results.xml",
features="src/test/resources/featuresfiles",strict=false,dryRun=false,
glue="Stepdef_new.stepdefinitions",
tags="@Parallel"
}
Public class TestRunner
java junit cucumber-jvm
add a comment |
I am unable to run features in parallel using cucumber JVM 4.0.0 and Junit testrunner. I just have one browser instance opening and once the execution is completed, browser closes and opens again for next feature execution.As per my thread count of 3 in Maven surefire, i expect 3 browser instances to be opened concurrently for running 3 features. I have followed the following link, but still not successful. The Features run one after another. I have used Pico container for DI.I followed this link for updating different version of Surefire plugin but still no luck. i have tried 4.0.0 as well as 4.2.0 for IO.cucumber Jars. I have tried different versions of surefire from 2.19 to 2.22 but still no luck.I have 3 features files and each of them have one scenario outline tagged as "@Parallel".I am not sure where am going wrong.I have tried parallel as "both" and "methods" in surefire plugin. My Junit version is 4.12.
My pom is as below.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>testcase</groupId>
<artifactId>xyzproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>xyzproject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cocumber.version>4.0.0</cocumber.version>
<picocontainer.version>4.0.0</picocontainer.version>
</properties>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repo.bodar.com</id>
<url>http://repo.bodar.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-java</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-picocontainer</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-junit</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-jvm</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>or.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.11-beta3</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-spis</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cocumber-reporting</artifactId>
<version>3.10.0</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-core</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>4.1.2</version>
</dependency>
<!--REPORTING -->
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compailer-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<fork>true</fork>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.20</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cocumber-reporting</artifactId>
<version>0.0.7</version>
<dependencies>
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>991</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectname>cucumber-jvm-example</projectname>
<outputDirectory>$project.build.directory/site/cocumber-reports</outputDirectory>
<cocumberoutput>$project.build.directory/cocumber.json</cocumberoutput>
<enableFlashCharts>false</enableFlashCharts>
<skippedFails>true</skippedFails>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
My testrunner is as below.
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = "html:target/cucumber-html-report",
"json:target/cucumber.json","pretty:target/cucumber-pretty.txt",
"usage:target/cucumber-usage.json, "junit:target/cucumber-results.xml",
features="src/test/resources/featuresfiles",strict=false,dryRun=false,
glue="Stepdef_new.stepdefinitions",
tags="@Parallel"
}
Public class TestRunner
java junit cucumber-jvm
I am unable to run features in parallel using cucumber JVM 4.0.0 and Junit testrunner. I just have one browser instance opening and once the execution is completed, browser closes and opens again for next feature execution.As per my thread count of 3 in Maven surefire, i expect 3 browser instances to be opened concurrently for running 3 features. I have followed the following link, but still not successful. The Features run one after another. I have used Pico container for DI.I followed this link for updating different version of Surefire plugin but still no luck. i have tried 4.0.0 as well as 4.2.0 for IO.cucumber Jars. I have tried different versions of surefire from 2.19 to 2.22 but still no luck.I have 3 features files and each of them have one scenario outline tagged as "@Parallel".I am not sure where am going wrong.I have tried parallel as "both" and "methods" in surefire plugin. My Junit version is 4.12.
My pom is as below.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>testcase</groupId>
<artifactId>xyzproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>xyzproject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cocumber.version>4.0.0</cocumber.version>
<picocontainer.version>4.0.0</picocontainer.version>
</properties>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repo.bodar.com</id>
<url>http://repo.bodar.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-java</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-picocontainer</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-junit</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-jvm</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>or.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.11-beta3</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-spis</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cocumber-reporting</artifactId>
<version>3.10.0</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>io.cocumber</groupId>
<artifactId>cocumber-core</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>4.1.2</version>
</dependency>
<!--REPORTING -->
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compailer-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<fork>true</fork>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.20</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cocumber-reporting</artifactId>
<version>0.0.7</version>
<dependencies>
<dependency>
<groupId>com.googlecode.totallylazy</groupId>
<artifactId>totallylazy</artifactId>
<version>991</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectname>cucumber-jvm-example</projectname>
<outputDirectory>$project.build.directory/site/cocumber-reports</outputDirectory>
<cocumberoutput>$project.build.directory/cocumber.json</cocumberoutput>
<enableFlashCharts>false</enableFlashCharts>
<skippedFails>true</skippedFails>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
My testrunner is as below.
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = "html:target/cucumber-html-report",
"json:target/cucumber.json","pretty:target/cucumber-pretty.txt",
"usage:target/cucumber-usage.json, "junit:target/cucumber-results.xml",
features="src/test/resources/featuresfiles",strict=false,dryRun=false,
glue="Stepdef_new.stepdefinitions",
tags="@Parallel"
}
Public class TestRunner
java junit cucumber-jvm
java junit cucumber-jvm
edited Dec 11 '18 at 3:57
Avinash Arunkumar
asked Dec 10 '18 at 18:52
Avinash ArunkumarAvinash Arunkumar
297 bronze badges
297 bronze badges
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
This could be irrelevant .
I tried to implement to Cucumber with Junit and because of it's limitation of being parallel on feature level and I moved to Cucumber-TestNG.
TestNG it self supports Junit. So only runner class need to changed in current design
Please have a look this once https://github.com/bhargavQA/selenium-java-cucumber-framewrok.git
This is being done with Cucumber TestNG and supports parallel execution at scenario level.
The Link is not Working.
– Avinash Arunkumar
Dec 11 '18 at 3:40
please try this github.com/bhargavQA/selenium-java-cucumber-framewrok.git
– bhargav
Dec 11 '18 at 17:06
Does this support AppiumDriver for mobile?
– Chinthaka Devinda
Apr 25 at 4:25
The question was asked for Cucumber, JUnit, you answered Cucumber, TestNG. Do you have a correct answer?
– paul
May 19 at 19:33
add a comment |
I suspect you may have meant to use maven-surefire-plugin
instead of maven-surefire-report-plugin
in your configuration.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
I have changed surefire config in my original question. I have been using only surefire & not report plugin in my Pom..
– Avinash Arunkumar
Dec 11 '18 at 3:59
add a comment |
You should be using maven-failsafe-plugin, not surefire.
I used failsafe in combination with com.github.temyers -cucumber-jvm-parallel-plugin
Cucumber supports parallel execution since v4.0.0. The parallel plugin is no longer needed.
– mpkorstanje
Dec 11 '18 at 7:44
add a comment |
I had the same issue (trying enabling parallel in pom but features seem to run in sequence).
While searching I found this bug https://github.com/cbeust/testng/issues/987 claiming that the parallel and threadcount configuration is ignored in maven with testng. I then realized that I had a dependency to testng while I was not using it at all (apart from some assertions that I switched to use junit).
I can see in your pom a dependency to testng. You could try remove the dependency or ensure you use one version having the testng issue fixed and try again.
add a comment |
You can try to remove the testng dependency or to explicitly say to use the surefire-junit
like
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>$surefire.version</version>
<configuration>
<parallel>methods</parallel>
<threadCount>20</threadCount>
<!-- <useUnlimitedThreads>true</useUnlimitedThreads> -->
<includes>
<include>**/JUnitRunner.java</include>
</includes>
</configuration>
<dependencies>
<!-- https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html
- You can also manually force a specific provider by adding it as a dependency
to Surefire itself: -->
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>$surefire.version</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Try this:
https://github.com/rhapsodyman/cucumber4-parallel
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53711882%2fparallel-execution-not-happening-with-cucumber-jvm-4-0-0-and-junit-test-runner%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
This could be irrelevant .
I tried to implement to Cucumber with Junit and because of it's limitation of being parallel on feature level and I moved to Cucumber-TestNG.
TestNG it self supports Junit. So only runner class need to changed in current design
Please have a look this once https://github.com/bhargavQA/selenium-java-cucumber-framewrok.git
This is being done with Cucumber TestNG and supports parallel execution at scenario level.
The Link is not Working.
– Avinash Arunkumar
Dec 11 '18 at 3:40
please try this github.com/bhargavQA/selenium-java-cucumber-framewrok.git
– bhargav
Dec 11 '18 at 17:06
Does this support AppiumDriver for mobile?
– Chinthaka Devinda
Apr 25 at 4:25
The question was asked for Cucumber, JUnit, you answered Cucumber, TestNG. Do you have a correct answer?
– paul
May 19 at 19:33
add a comment |
This could be irrelevant .
I tried to implement to Cucumber with Junit and because of it's limitation of being parallel on feature level and I moved to Cucumber-TestNG.
TestNG it self supports Junit. So only runner class need to changed in current design
Please have a look this once https://github.com/bhargavQA/selenium-java-cucumber-framewrok.git
This is being done with Cucumber TestNG and supports parallel execution at scenario level.
The Link is not Working.
– Avinash Arunkumar
Dec 11 '18 at 3:40
please try this github.com/bhargavQA/selenium-java-cucumber-framewrok.git
– bhargav
Dec 11 '18 at 17:06
Does this support AppiumDriver for mobile?
– Chinthaka Devinda
Apr 25 at 4:25
The question was asked for Cucumber, JUnit, you answered Cucumber, TestNG. Do you have a correct answer?
– paul
May 19 at 19:33
add a comment |
This could be irrelevant .
I tried to implement to Cucumber with Junit and because of it's limitation of being parallel on feature level and I moved to Cucumber-TestNG.
TestNG it self supports Junit. So only runner class need to changed in current design
Please have a look this once https://github.com/bhargavQA/selenium-java-cucumber-framewrok.git
This is being done with Cucumber TestNG and supports parallel execution at scenario level.
This could be irrelevant .
I tried to implement to Cucumber with Junit and because of it's limitation of being parallel on feature level and I moved to Cucumber-TestNG.
TestNG it self supports Junit. So only runner class need to changed in current design
Please have a look this once https://github.com/bhargavQA/selenium-java-cucumber-framewrok.git
This is being done with Cucumber TestNG and supports parallel execution at scenario level.
edited Dec 11 '18 at 17:06
answered Dec 10 '18 at 23:58
bhargavbhargav
113 bronze badges
113 bronze badges
The Link is not Working.
– Avinash Arunkumar
Dec 11 '18 at 3:40
please try this github.com/bhargavQA/selenium-java-cucumber-framewrok.git
– bhargav
Dec 11 '18 at 17:06
Does this support AppiumDriver for mobile?
– Chinthaka Devinda
Apr 25 at 4:25
The question was asked for Cucumber, JUnit, you answered Cucumber, TestNG. Do you have a correct answer?
– paul
May 19 at 19:33
add a comment |
The Link is not Working.
– Avinash Arunkumar
Dec 11 '18 at 3:40
please try this github.com/bhargavQA/selenium-java-cucumber-framewrok.git
– bhargav
Dec 11 '18 at 17:06
Does this support AppiumDriver for mobile?
– Chinthaka Devinda
Apr 25 at 4:25
The question was asked for Cucumber, JUnit, you answered Cucumber, TestNG. Do you have a correct answer?
– paul
May 19 at 19:33
The Link is not Working.
– Avinash Arunkumar
Dec 11 '18 at 3:40
The Link is not Working.
– Avinash Arunkumar
Dec 11 '18 at 3:40
please try this github.com/bhargavQA/selenium-java-cucumber-framewrok.git
– bhargav
Dec 11 '18 at 17:06
please try this github.com/bhargavQA/selenium-java-cucumber-framewrok.git
– bhargav
Dec 11 '18 at 17:06
Does this support AppiumDriver for mobile?
– Chinthaka Devinda
Apr 25 at 4:25
Does this support AppiumDriver for mobile?
– Chinthaka Devinda
Apr 25 at 4:25
The question was asked for Cucumber, JUnit, you answered Cucumber, TestNG. Do you have a correct answer?
– paul
May 19 at 19:33
The question was asked for Cucumber, JUnit, you answered Cucumber, TestNG. Do you have a correct answer?
– paul
May 19 at 19:33
add a comment |
I suspect you may have meant to use maven-surefire-plugin
instead of maven-surefire-report-plugin
in your configuration.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
I have changed surefire config in my original question. I have been using only surefire & not report plugin in my Pom..
– Avinash Arunkumar
Dec 11 '18 at 3:59
add a comment |
I suspect you may have meant to use maven-surefire-plugin
instead of maven-surefire-report-plugin
in your configuration.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
I have changed surefire config in my original question. I have been using only surefire & not report plugin in my Pom..
– Avinash Arunkumar
Dec 11 '18 at 3:59
add a comment |
I suspect you may have meant to use maven-surefire-plugin
instead of maven-surefire-report-plugin
in your configuration.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
I suspect you may have meant to use maven-surefire-plugin
instead of maven-surefire-report-plugin
in your configuration.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>3</threadcount>
</configuration>
</plugin>
answered Dec 10 '18 at 19:59
mpkorstanjempkorstanje
2,9163 gold badges22 silver badges35 bronze badges
2,9163 gold badges22 silver badges35 bronze badges
I have changed surefire config in my original question. I have been using only surefire & not report plugin in my Pom..
– Avinash Arunkumar
Dec 11 '18 at 3:59
add a comment |
I have changed surefire config in my original question. I have been using only surefire & not report plugin in my Pom..
– Avinash Arunkumar
Dec 11 '18 at 3:59
I have changed surefire config in my original question. I have been using only surefire & not report plugin in my Pom..
– Avinash Arunkumar
Dec 11 '18 at 3:59
I have changed surefire config in my original question. I have been using only surefire & not report plugin in my Pom..
– Avinash Arunkumar
Dec 11 '18 at 3:59
add a comment |
You should be using maven-failsafe-plugin, not surefire.
I used failsafe in combination with com.github.temyers -cucumber-jvm-parallel-plugin
Cucumber supports parallel execution since v4.0.0. The parallel plugin is no longer needed.
– mpkorstanje
Dec 11 '18 at 7:44
add a comment |
You should be using maven-failsafe-plugin, not surefire.
I used failsafe in combination with com.github.temyers -cucumber-jvm-parallel-plugin
Cucumber supports parallel execution since v4.0.0. The parallel plugin is no longer needed.
– mpkorstanje
Dec 11 '18 at 7:44
add a comment |
You should be using maven-failsafe-plugin, not surefire.
I used failsafe in combination with com.github.temyers -cucumber-jvm-parallel-plugin
You should be using maven-failsafe-plugin, not surefire.
I used failsafe in combination with com.github.temyers -cucumber-jvm-parallel-plugin
answered Dec 11 '18 at 5:22
sniktsnikt
3136 silver badges18 bronze badges
3136 silver badges18 bronze badges
Cucumber supports parallel execution since v4.0.0. The parallel plugin is no longer needed.
– mpkorstanje
Dec 11 '18 at 7:44
add a comment |
Cucumber supports parallel execution since v4.0.0. The parallel plugin is no longer needed.
– mpkorstanje
Dec 11 '18 at 7:44
Cucumber supports parallel execution since v4.0.0. The parallel plugin is no longer needed.
– mpkorstanje
Dec 11 '18 at 7:44
Cucumber supports parallel execution since v4.0.0. The parallel plugin is no longer needed.
– mpkorstanje
Dec 11 '18 at 7:44
add a comment |
I had the same issue (trying enabling parallel in pom but features seem to run in sequence).
While searching I found this bug https://github.com/cbeust/testng/issues/987 claiming that the parallel and threadcount configuration is ignored in maven with testng. I then realized that I had a dependency to testng while I was not using it at all (apart from some assertions that I switched to use junit).
I can see in your pom a dependency to testng. You could try remove the dependency or ensure you use one version having the testng issue fixed and try again.
add a comment |
I had the same issue (trying enabling parallel in pom but features seem to run in sequence).
While searching I found this bug https://github.com/cbeust/testng/issues/987 claiming that the parallel and threadcount configuration is ignored in maven with testng. I then realized that I had a dependency to testng while I was not using it at all (apart from some assertions that I switched to use junit).
I can see in your pom a dependency to testng. You could try remove the dependency or ensure you use one version having the testng issue fixed and try again.
add a comment |
I had the same issue (trying enabling parallel in pom but features seem to run in sequence).
While searching I found this bug https://github.com/cbeust/testng/issues/987 claiming that the parallel and threadcount configuration is ignored in maven with testng. I then realized that I had a dependency to testng while I was not using it at all (apart from some assertions that I switched to use junit).
I can see in your pom a dependency to testng. You could try remove the dependency or ensure you use one version having the testng issue fixed and try again.
I had the same issue (trying enabling parallel in pom but features seem to run in sequence).
While searching I found this bug https://github.com/cbeust/testng/issues/987 claiming that the parallel and threadcount configuration is ignored in maven with testng. I then realized that I had a dependency to testng while I was not using it at all (apart from some assertions that I switched to use junit).
I can see in your pom a dependency to testng. You could try remove the dependency or ensure you use one version having the testng issue fixed and try again.
answered Mar 27 at 16:45
gogogogo
41 silver badge2 bronze badges
41 silver badge2 bronze badges
add a comment |
add a comment |
You can try to remove the testng dependency or to explicitly say to use the surefire-junit
like
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>$surefire.version</version>
<configuration>
<parallel>methods</parallel>
<threadCount>20</threadCount>
<!-- <useUnlimitedThreads>true</useUnlimitedThreads> -->
<includes>
<include>**/JUnitRunner.java</include>
</includes>
</configuration>
<dependencies>
<!-- https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html
- You can also manually force a specific provider by adding it as a dependency
to Surefire itself: -->
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>$surefire.version</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Try this:
https://github.com/rhapsodyman/cucumber4-parallel
add a comment |
You can try to remove the testng dependency or to explicitly say to use the surefire-junit
like
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>$surefire.version</version>
<configuration>
<parallel>methods</parallel>
<threadCount>20</threadCount>
<!-- <useUnlimitedThreads>true</useUnlimitedThreads> -->
<includes>
<include>**/JUnitRunner.java</include>
</includes>
</configuration>
<dependencies>
<!-- https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html
- You can also manually force a specific provider by adding it as a dependency
to Surefire itself: -->
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>$surefire.version</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Try this:
https://github.com/rhapsodyman/cucumber4-parallel
add a comment |
You can try to remove the testng dependency or to explicitly say to use the surefire-junit
like
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>$surefire.version</version>
<configuration>
<parallel>methods</parallel>
<threadCount>20</threadCount>
<!-- <useUnlimitedThreads>true</useUnlimitedThreads> -->
<includes>
<include>**/JUnitRunner.java</include>
</includes>
</configuration>
<dependencies>
<!-- https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html
- You can also manually force a specific provider by adding it as a dependency
to Surefire itself: -->
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>$surefire.version</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Try this:
https://github.com/rhapsodyman/cucumber4-parallel
You can try to remove the testng dependency or to explicitly say to use the surefire-junit
like
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>$surefire.version</version>
<configuration>
<parallel>methods</parallel>
<threadCount>20</threadCount>
<!-- <useUnlimitedThreads>true</useUnlimitedThreads> -->
<includes>
<include>**/JUnitRunner.java</include>
</includes>
</configuration>
<dependencies>
<!-- https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html
- You can also manually force a specific provider by adding it as a dependency
to Surefire itself: -->
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>$surefire.version</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Try this:
https://github.com/rhapsodyman/cucumber4-parallel
edited Aug 15 at 9:08
answered Aug 15 at 8:56
user3617902user3617902
11 bronze badge
11 bronze badge
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53711882%2fparallel-execution-not-happening-with-cucumber-jvm-4-0-0-and-junit-test-runner%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown