1

For the CI testing of my Android App I wrote some unit tests and let them run via gradle from the terminal. They all produce the typical junit XML output files in the build/test-results folder like that:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="my.App.Here" tests="123" skipped="0" failures="0" errors="0" ...>
 <testcase name="testABC" classname="..." time="..."/>

And this is what I need. However, some tests have to be instrumented tests and when I run the tests (e.g. via ./gradlew :core:connectedCheck ) I only get human readable output.

These files are also in a different folder in build/reports/androidTests/connected and contain of html and css files. However no machine readable XML file is in sight.

I found some third party scripts and tools but I was hoping for a simple configuration of my gradle file or something similar.

Any ideas on how can I get the XML output of Instrumented Tests?

Tobias Reich
  • 4,952
  • 3
  • 47
  • 90

1 Answers1

0

The XML report for instrumented tests is located in <path_to_your_project>/<module_name>/build/outputs/androidTest-results/connected/.

See the Android documentation for a list of all test report locations.

Johan Boberg
  • 3,491
  • 1
  • 22
  • 17