Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android unit tests with Jenkins on a headless machine

I'm gathering information to set up a Jenkins CI server on a headless machine for Android unit testing. But as Android unit tests require an emulator to run, a graphical environment seems required, or is it possible to run an emulator in non-graphical mode? The wiki entry on the Jenkins Android Emulator plugin is also not very enlightening on this matter, it states:

If you have build slaves running headless (e.g. Linux servers that don't run an X server), it is recommended to take advantage of Jenkins' Xvnc Plugin. With this plugin enabled, you can run multiple Android emulators in parallel on a headless slave, while keeping the "Show emulator window" option enabled.

Does this imply that emulators can be run on a headless machine with the "Show emulator window" option disabled??

If a graphical environment is required the easiest solution most sources speak of is by using the Xvnc plugin which uses an Xvnc server to provide an X instance. But if I understand correctly this Xvnc server must run on another machine with X available, or does it run on the headless machine providing an X instance from there?

like image 458
nkr1pt Avatar asked Apr 27 '11 08:04

nkr1pt


1 Answers

As the author of that plugin, I can tell you yes: you can run emulators on a headless machine, without a graphical environment — just uncheck the "Show emulator window" option.

This is the equivalent of running the Android emulator with the "-no-window" option on the command line.

I will update the wiki to make this clearer; thanks for bringing it up.

like image 104
Christopher Orr Avatar answered Oct 14 '22 02:10

Christopher Orr