测试没有使用' surefire' Maven的插件

时间:2016-11-23 16:45:19

标签: java testng maven-3 maven-plugin maven-surefire-plugin

我正在使用TestNG在Eclipse中运行我的测试。我在我的pom.xml文件中设置了maven-surefire-plugin。 在运行  mvn clean install'时,我收到此错误并且测试不会运行。即使我手动尝试使用TestNG在Eclipse中运行测试,测试也会被跳过并且不会运行。不确定是什么问题。

On running 'mvn clean install'[![][1]] 2

1 个答案:

答案 0 :(得分:0)

最有可能必须将testng.xml(代表$ {TestSuite}参数的真实文件)指定为模板XML文件,如下所述:

http://testng.org/doc/eclipse.html#eclipse-listeners

enter image description here