如何在特定模块中使用测试运行单独的文件夹?如何运行单独的测试?
我的模块:
<modules>
<module>common</module>
<module>foo</module>
<module>bar</module>
</modules>
每个模块有一个2-3测试文件夹。我需要在模块栏中运行测试文件夹“utils”。
我做了限制为球队 “MVN测试”:
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/utils/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>surefire-itest</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>**/utils/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
MVN测试 - 运行,除 “utils的” 所有的测试。 mvn integration-test - 运行所有测试。
现在我只需要启动“utils”。我该如何解决这个问题?