'FailSafe plugin is not running feature files in parallel
I have included failsafe plugin with parallel methods and threadcount 4. And framework is cucumber with junit. I'm trying to run features in parallel with failsafe plugin of maven. i have different profiles for different environments and use maven verify goal with command
verify -D environment=int
<profile>
<id>int</id>
<activation>
<property>
<name>environment</name>
<value>int</value>
</property>
</activation>
<properties>
<env.info>int</env.info>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<configuration>
<systemPropertyVariables>
<Env>${env.info}</Env>
</systemPropertyVariables>
<parallel>methods</parallel>
<threadCount>3</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
<includes>
<include>**/TestRunner*.java</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
My test runner class is defined like this
@RunWith(Cucumber.class)
@CucumberOptions(features = {"src/test/resources/feature/"},
glue = {"com.stepdefinition"},
plugin = {"pretty",
"html:target/report.html",
"json:target/json/report.json",
"rerun:target/rerun.txt"},
tags = "@continuousDataloggerLineChartInt or @trendLineChartInt or @standardDataloggerLineChartInt",
dryRun = false
)
public class TestRunner {
}
features folder structure:
issue is build is successful and tests are running but not in parallel mode.
what can I do here?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|