mvn clean test执行时编译失败,遇到问题: There are test failures,并且错误并未展示到allure报告中。
具体错误如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project autocasb: There are test failures.
发现原因:测试代码时遇到错误,它会停止编译。
解决方法:需要在pom.xml的插件<maven-surefire-plugin>里添加以下配置,使得测试出错不影响项目的编译。
<testFailureIgnore>true</testFailureIgnore>
再次执行mvn clean test
Allure报告展示错误: