我在maven项目中使用Travis,由于输出错误很大,我只想查看最后50行输出,如:mvn -q clean verify | tail -n 50
然而,即使我的一些测试用例失败了,代码仍然以状态0存在,除非我在本地运行测试,否则我无法真正判断构建是否失败。
Tests run: 106, Failures: 0, Errors: 2, Skipped: 0 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:verify (default) on project easyshare-api: There are test failures. [ERROR] [ERROR] Please refer to /home/travis/build/au-easyshare/easyshare-api/target/failsafe-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 The command "mvn -q clean verify | tail -n 50" exited with 0.
处理这个问题的最佳方法是什么?理想情况下,当测试用例增加2-3倍时,解决方案仍然有效。
提前感谢!
发布于 2016-11-09 12:48:51
我更改了application.properties以获得更短的输出,并删除了tail -n 50。这解决了我的问题:
spring.jpa.generate-ddl = false spring.jpa.show-sql = false
https://stackoverflow.com/questions/40498540
复制相似问题