FailSafe 插件未并行运行功能文件

问题描述

我已经包含了带有并行方法和线程数 4 的故障安全插件。框架是带有 junit 的黄瓜。我正在尝试与 maven 的故障安全插件并行运行功能。我对不同的环境有不同的配置文件,并使用 maven 使用命令验证目标

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>

我的测试运行器类是这样定义的

@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 {
}   

功能文件夹结构:

folder structure

问题是构建成功并且测试正在运行但不是在并行模式下。

我可以在这里做什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)