I\'m executing some tests in my Android device by using the following command:
adb shell am instrument -w package.name/android.test.runner.AndroidJU
I had a similar problem (I wanted to have xml test reports for my Jenkins when it runs instrumentation tests on a device). I solved it by implementing the "android-xml-run-listener" (https://github.com/schroepf/TestLab/tree/master/android).
To use it simply add:
androidTestCompile 'de.schroepf:android-xml-run-listener:0.1.3'
to your build.gradle (note the androidTest prefix - this will not add code to your production app!).
To use it, add:
-e listener de.schroepf.androidxmlrunlistener.XmlRunListener
to your am instrument command.
And to retrieve the XML report file, use:
adb pull /storage/emulated/0/Android/data//files/report.xml