我正在尝试mvn全新安装,但失败并显示以下消息:有测试失败。当我使用IDE运行所有测试时,它们都通过了,我需要跳过测试。
注释处理器已启用,如此处Configuring IntelliJ IDEA
所述-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running dev.renansouza.document.DocumentFlowTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
Running dev.renansouza.document.DocumentControllerTest
Tests run: 6, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 0.058 sec <<< FAILURE!
dev.renansouza.document.DocumentControllerTest.testInvoiceFailed() Time elapsed: 0.039 sec <<< FAILURE!
java.lang.NullPointerException
at dev.renansouza.document.DocumentControllerTest.testInvoiceFailed(DocumentControllerTest.java:35)
dev.renansouza.document.DocumentControllerTest.testInvoiceSuccess() Time elapsed: 0.002 sec <<< FAILURE!
java.lang.NullPointerException
at dev.renansouza.document.DocumentControllerTest.testInvoiceSuccess(DocumentControllerTest.java:45)
dev.renansouza.document.DocumentControllerTest.testSendZipFile() Time elapsed: 0.001 sec <<< FAILURE!
java.lang.NullPointerException
at dev.renansouza.document.DocumentControllerTest.testSendZipFile(DocumentControllerTest.java:57)
dev.renansouza.document.DocumentControllerTest.testSendYmlFile() Time elapsed: 0.001 sec <<< FAILURE!
java.lang.NullPointerException
at dev.renansouza.document.DocumentControllerTest.testSendYmlFile(DocumentControllerTest.java:80)
dev.renansouza.document.DocumentControllerTest.testInvoiceSuccessJWTToken() Time elapsed: 0.002 sec <<< FAILURE!
java.lang.NullPointerException
at dev.renansouza.document.DocumentControllerTest.testInvoiceSuccessJWTToken(DocumentControllerTest.java:102)
dev.renansouza.document.DocumentControllerTest.testJWTTokenRefresh() Time elapsed: 0.001 sec <<< FAILURE!
java.lang.NullPointerException
at dev.renansouza.document.DocumentControllerTest.testJWTTokenRefresh(DocumentControllerTest.java:115)
Running dev.renansouza.document.DocumentEnvironmentTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec
Results :
Failed tests: dev.renansouza.document.DocumentControllerTest.testInvoiceFailed()
dev.renansouza.document.DocumentControllerTest.testInvoiceSuccess()
dev.renansouza.document.DocumentControllerTest.testSendZipFile()
dev.renansouza.document.DocumentControllerTest.testSendYmlFile()
dev.renansouza.document.DocumentControllerTest.testInvoiceSuccessJWTToken()
dev.renansouza.document.DocumentControllerTest.testJWTTokenRefresh()
Tests run: 6, Failures: 6, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.813 s
[INFO] Finished at: 2019-07-09T11:04:27-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project invoice-unpack: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/renan/git/document-unpack/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.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
答案 0 :(得分:0)