我可以在maven surefire插件中使用Group和ExcludedGroup吗?
我可以用一个类别注释一个测试类以供包含,然后用另一个类别注释某些测试方法以供排除吗 我尝试了以下方法,但它只是使用组来包含测试类。然后surefire甚至不考虑测试类中带有“excludedGroups”注释的方法我可以在maven surefire插件中使用Group和ExcludedGroup吗?,maven,junit,categories,surefire,Maven,Junit,Categories,Surefire,我可以用一个类别注释一个测试类以供包含,然后用另一个类别注释某些测试方法以供排除吗 我尝试了以下方法,但它只是使用组来包含测试类。然后surefire甚至不考虑测试类中带有“excludedGroups”注释的方法 <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <executions> <
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>surefire-integration-tests</id>
<phase>test</phase>
<configuration>
<!-- Include these classes -->
<groups>my.test.category.IncludeTheseClasses</groups>
<!-- Exclude these test methods -->
<excludedGroups>my.test.category.IgnoreTheseMethods</excludedGroups>
</configuration>
</execution>
org.apache.maven.plugins
maven surefire插件
surefire集成测试
测试
my.test.category.IncludeTheseClasses
my.test.category.ignore这些方法
并包含标记,而不是类
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>surefire-integration-tests</id>
<phase>test</phase>
<configuration>
<!-- Include these classes -->
<groups>my.test.category.IncludeTheseClasses</groups>
<!-- Exclude these test methods -->
<excludedGroups>my.test.category.IgnoreTheseMethods</excludedGroups>
</configuration>
</execution>