问题描述
我正在尝试使用maven surefire插件从
测试类:
public class AcceptanceTests {
@Test
public void test(){
System.out.println("This should run");
}
@Test
public void test2(){
System.out.println("This should be excluded");
}
}
POM文件:
<profile>
<id>acceptanceTests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${argLine} -Dspring.profiles.active="PROFILE" -Dparameter.add=true
</argLine>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng/acceptance-tests.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</profile>
SuiteXMLFile:
<!DOCTYPE suite SYstem>
<suite name="ACCEPTANCE-TEST-SUITE">
<test name="ACCEPTANCE-TESTS">
<classes>
<class name="acceptanceTests.AcceptanceTest" />
</classes>
</test>
</suite>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)