Tag Archives: First semester of junior year

Failed to execute goal org.apache.maven . plugins:maven-surefire-plugin :2.12.4:test

Today and yesterday, when I was doing the project and making progress, I found that MVN install could not succeed
always reported the following error:

[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.

some puzzled, looked up the information on the Internet but no result

Fortunately, the problem was finally solved and the solution was as follows:
2. In this case, add a method to the current test class and use the @test annotation