Deploy to multiple devices and junit report testing

157 views
Skip to first unread message

Manfred Moser

unread,
Sep 2, 2011, 12:52:01 PM9/2/11
to android...@googlegroups.com
Hi!

I recently implemented automatic deployment of the apk to all attached devices (and or emulators) for the Maven Android Plugin as well as Junit report xml creation for instrumentation test runs being created on the build machine rather than the device.

Both those have come in extremely handy for developing on tablet and phone in parallel and would probably be good enhancements for the adt tools directly. 

Feel free to peek at the source and pull in whatever is useful. 

Here is blog post about using it


manfred

Raphaël Moll

unread,
Sep 4, 2011, 4:05:00 PM9/4/11
to android...@googlegroups.com
This is pretty neat!
It would be pretty good if we had something similar directly in ADT. I do work around it by having a somewhat hairy bash script that uses adb to find emulators, deploy, etc., but do have the issue of lacking a report file.

What I like to do is setup a bunch of AVDs with a specific name patterns (e.g. qa_*) and automatically create emulators for these and test on these. It's interesting since it means I can prepare those using snapshots, and load them with emulator -no-snapshot-save to keep the environment pristine between test runs. (Disclaimer: snapshot support is partially broken since R12.)
If you don't use snapshots, you can use -wipe-data to get clean emulator sessions, but then you hit the usual roadblock that is the lockscreen. You can get around that sending a "menu" press (e.g. http://stackoverflow.com/questions/2332948). That could be an interesting option to your deploy command.

HTH
R/

Manfred Moser

unread,
Sep 7, 2011, 12:03:41 PM9/7/11
to android...@googlegroups.com
Thanks for the suggestion. Btw the Android Emulator Plugin for Hudson/Jenkins can already create AVD's based on parameters and more.. 

It would be great if you could create a ticket with the specific suggestion on the maven android plugin issue tracker


I will pick it up from there.. and of course it is all open source so a pull request with the implementation would be awesome too ;-) 

manfred


Reply all
Reply to author
Forward
0 new messages