【发布时间】:2017-10-10 21:01:18
【问题描述】:
我想包含/排除 JUnit 分类测试。我在公共模块中定义了一个标记接口StressTest。我在 moduleA 中引用 StressTest。我在 root pom.xml 中有以下 maven-surefire-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<excludedGroups>com.mycompany.project.common.utils.StressTest</excludedGroups>
</configuration>
</plugin>
运行 mvn test 时,我在构建另一个模块时得到以下信息。
Unable to load category: com.mycompany.project.common.utils.StressTest
我应该在哪里写我的StressTest 接口?
【问题讨论】:
标签: java maven unit-testing testing junit4