gpt4 book ai didi

java - 如何在 maven-surefire-plugin 中设置并行测试

转载 作者:行者123 更新时间:2023-11-30 10:04:04 25 4
gpt4 key购买 nike

所有测试立即运行并加载计算机

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<includes>
<include>**/*CucumberRegressionRunner.java</include>
</includes>
<parallel>all</parallel>
<useSystemClassLoader>false</useSystemClassLoader>
<perCoreThreadCount>false</perCoreThreadCount>
<forkCount>2.5c</forkCount>
<reuseForks>true</reuseForks>
<threadCount>2</threadCount>
</configuration>
</plugin>

我不想运行所有包,我只需要并行运行 2-5 个测试

最佳答案

作为this post的回答描述,您可以为测试创建一个应该并行运行的执行和一个不应该并行运行的测试执行。

关于java - 如何在 maven-surefire-plugin 中设置并行测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56055074/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com