今天接着昨天做项目对进度做时,发现执行mvn install无法成功
总是会报如下的错误:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.698 s
[INFO] Finished at: 2020-11-15T16:58:47+08:00
[INFO] Final Memory: 11M/217M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project CRMSystem: There are test failures.
[ERROR]
[ERROR] Please refer to G:\Language Proctice\java\pro\20201109\CRMSystem\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
有些纳闷,网上查了一下资料也无果
不过好在最后终于解决了问题,解决方案如下:
1.检查test包下是否有测试类没有方法
2.若有这种情况,在当前测试类中加上一个方法,并使用@Test注解
本文讲述了作者在项目开发中遇到的Maven测试问题,通过检查测试类方法和添加测试用例解决,提供了解决步骤和关键技巧。
606

被折叠的 条评论
为什么被折叠?



