Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project demo2: There are test failures.

报错

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project demo2: There are test failures.

问题原因:

单元测试出现错误,高版本IDEA在运行项目单元测试时会首先初始化,调用test方法,如果你写的单元测试代码有问题,就会直接提示你某个单元测试有问题,就会报上面的错误

解决办法:

maven的插件test禁用掉即可

 

 

posted @ 2023-01-07 13:18  kuailest  阅读(149)  评论(0编辑  收藏  举报