I have an Android test project that I'd like to link into Hudson, but I haven't found a way to output the test results as XML instead of text. Does anyone know if there's an easy way to do this already?
-Dan
I have an Android test project that I'd like to link into Hudson, but I haven't found a way to output the test results as XML instead of text. Does anyone know if there's an easy way to do this already?
-Dan
FYI, for anyone else who happens to stumble on this question. I've created a new TestRunner that you can use in your Android test projects that will output your test results in XML readable by Hudson (and probably any other CI app). You can read about it here: http://droiddudes.com/2010/04/07/athenatestrunner/ or just grab it from here: http://github.com/dwatling/athena
I should have added this answer awhile ago.
I've been using https://github.com/jsankey/android-junit-report for close to a year now and that has worked much better than Athena or anything else I've found.
We had similar problem in our company. We checked all the available open-source solutions and none of them was really perfect. So we developed and just open-sourced a solution for it. I still do not say an "ultimate" one but certainly much better than either athena or the python reporter or any after-test analysis. You can find it here: http://code.google.com/p/the-missing-android-xml-junit-test-runner/
It provides:
Instead of analysing java source code (as in athena) or analysing the output (the python script), we extended android instrumentation runner. So we get all the benefits of using standard command line options for test selection, coverage enabling etc. - all described here: http://developer.android.com/guide/developing/testing/testing_otheride.html#RunTestsCommand.
We were able to successfully run the code using standard test rules with coverage analysed by emma, all nicely reported in Jenkins.
Nevermind. I found this question instead: How to Generate Android Testing Report in HTML Automatically
As another follow-up, I've come up with a "decent" solution. When running my instrumentation tests, I had to use the '-r' option (e.g. adb shell am instrument -w -r com.myApp/android.test.InstrumentationTestRunner > tests-out.txt) and write my own parser to convert the output into XML format accepted by Hudson.
It isn't perfect as it doesn't provide timing, nor does it provide log output messages, but at least I now have Hudson reporting on my Android tests.