在运行 mvn test 出错
错误提示:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project ssm-demo: There are t
est failures.
[ERROR]
[ERROR] Please refer to C:UserslxIdeaProjectsssmdemotargetsurefire-reports for the individual test results.
项目目录
test
package model;import org.junit.*;
import org.junit.Assert.*;
public class HelloWorldTest {
@Test
public void sayHi(){
Assert.assertEquals("Hello world!",new HelloWorld().sayHi());
}
}
回答:
原来还是maven 得配置问题:
在 pom.xml <project>标签下添加
<build>
<plugins> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
原文链接:
https://blog.csdn.net/gwd1154...
以上是 在运行 mvn test 出错 的全部内容, 来源链接: utcz.com/p/180421.html