如何在Travis CI上阅读测试结果报告? [英] How to read test result reports on Travis CI?

查看:66
本文介绍了如何在Travis CI上阅读测试结果报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我在Travis上的构建,我希望能够在存在失败的测试时读取测试结果,以查看那些失败的测试的堆栈跟踪.目前,这些报告存储在本地运行测试的计算机上,因此我无法访问报告所在的本地文件.

For my builds on Travis, I want to be able to read the test results when there are failing tests to see the stacktrace of those failing tests. Currently, these reports are stored locally on the machine that runs the tests, so I am not able to access the local files where the reports are.

我也不想通过Amazon S3归档这些文件,因为这似乎太麻烦了.

I also don't want to archive these files through Amazon S3 because that seems like way too much of a hassle.

类似如下的内容:如何从Travis-获取surefire报告CI构建?似乎可以工作,但看起来也很复杂.

Something like : How to get surefire reports form Travis-CI build? seems like it could work, but also seems complicated.

基本上,我希望能够不通过S3而从Travis读取本地测试结果文件.

Basically, I want to be able to read a local test result file from Travis without going through S3.

推荐答案

在控制台上获得有关测试失败的有用输出的最简单方法是使用gradle测试日志记录.

The easiest way to get useful output on the console about failing tests is to use the gradle test logging.

test {
    testLogging {
        events "failed"
        exceptionFormat "short"
    }
}

有关详细信息和更多选项,请参见gradle用户指南中的相应章节:

For details and more options here have a look at the according chapter in the gradle userguide: http://gradle.org/docs/current/dsl/org.gradle.api.tasks.testing.logging.TestLoggingContainer.html

这篇关于如何在Travis CI上阅读测试结果报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆