我试图使用正式documentationhttps://cucumber.io/docs/guides/parallel-execution/#junit,中描述的Junit并行运行黄瓜特性文件,但在我的项目中,我使用Gradle而不是Maven,并且不知道如何实现这个部分:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
</configuration>
</plugin>发布于 2021-12-27 13:53:54
Gradle不支持类级别以下的并行执行。因此,对于Gradle和JUnit 4,您不能并行运行Cucumber。
对于Gradle和JUnit 5,这不是一个问题,因为JUnit 5将处理并行执行。但是,您必须使用黄瓜JUnit引擎:
https://github.com/cucumber/cucumber-jvm/tree/main/junit-platform-engine
https://stackoverflow.com/questions/70495792
复制相似问题