How to read test result reports on Travis CI?

Caren picture Caren · Feb 19, 2015 · Viewed 10.2k times · Source

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.

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

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

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

Answer

Rene Groeschke picture Rene Groeschke · Feb 19, 2015

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"
    }
}

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