gpt4 book ai didi

maven - SureFire JUnitCore 和 JUnit4 Runners 之间有什么区别

转载 作者:行者123 更新时间:2023-12-04 18:05:50 24 4
gpt4 key购买 nike

Maven surefire 有

它们有什么区别?

我注意到,属性 excludedGroups 在 surefire-junit47 中有效,但在 surefire-junit4 中无效为什么?

  <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>2.18</version>
</dependency>
</dependencies>
<configuration>
<excludedGroups>my.com.IntegrationDB</excludedGroups>
</configuration>

</plugin>

最佳答案

首先,我不会手动定义 surefire-junitXXX。最好让 surefire 完成它的工作。此外,文档摘录:

(TestNG/JUnit47 provider with JUnit4.8+ only) Excluded groups. Any methods/classes/etc with one of the groups specified in this list will specifically not be run. For JUnit, this parameter forces the use of the 4.7 provider This parameter is ignored if the suiteXmlFiles parameter is specified.

另请参阅组:

http://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html#Using_JUnit_Categories

关于maven - SureFire JUnitCore 和 JUnit4 Runners 之间有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26889336/

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