Exporting results from Android instrumentation tests in jUnit XML format

119 views
Skip to first unread message

Cristina Yenyxe Gonzalez Garcia

unread,
Oct 15, 2021, 11:59:53 AM10/15/21
to Chromium-dev
Hello,

I'm working on integrating the execution of multiple Chromium test suites with GitLab CI, to display passed/failed tests in a friendly manner, for instance when someone creates a pull request.

So far, this works fine with component unit tests running on Android, via a combination of --gtest-output:xml + --app-data-file-dir + --app-data-file.
I haven't been able to find an equivalent for Android instrumentation tests though. Looking at the code in LocalDeviceInstrumentationTestRun, it seems to be able to pull JSON results, screenshots and a bunch of other stuff, but XML reports don't seem to be on the list. Is that so or can I make this work somehow?

Thanks,
Cristina

郑则

unread,
Nov 5, 2021, 2:28:43 PM11/5/21
to Chromium-dev, c.gon...@eyeo.com
Hi, Cristina, 

I guess you are referring to "chrome_public_test_apk", which you probably need:
```
autoninja -C out/debug chrome_public_test_apk
out/debug/bin/run_chrome_public_test_apk
```

you could see the code inside `run_chrome_public_test_apk`. It is using adb instrumentation command.

Thanks,
Jun
Reply all
Reply to author
Forward
0 new messages