5

Has anyone managed to get Jenkins to use the Genymotion android VM, instead of the super-slow android-emulator?

The Genymotion is actually faster than a real device on my dev machine, so would be ideal for running CI tests.

Thanks for any ideas.

Simon

sipickles
  • 1,507
  • 1
  • 17
  • 28
  • 1
    Genymotion behaves exactly like a simple device. Si you can use ADB to manage it. Do you have a precise problem on your use case? – eyal-lezmy Aug 12 '13 at 10:29
  • I found a tutorial how to integrate Genymotion on Jenkins here: http://blog.genymobile.com/genymotion-jenkins-android-testing/ – Christopher May 22 '14 at 08:24
  • See this new (official) article regarding jenkins and genymotion 2.5 http://www.genymobile.com/genymotion-jenkins-integration/ – Dori Jul 02 '15 at 11:44

3 Answers3

4

If you start the genymotion on the CI server and let it always running, then it will work fine. Although if you want to wake it up just for you tests, and shut id down afterwards, then yes, you will miss some stuff with genymotion till now.

The Jenkins Android emulator plugin was useful in that matter and there is still no equivalent with genymotion. Genymotion is still not scriptable enough to be run on command line, ideally headless.

Nevertheless, on our projects at the job, we recently switched to genymotion, start an "emulator", let it run always on the CI server and everything works fine. And it was really worth it, we cut our build times by a factor of 2, and we don't face any memory problem that was so common on the real emulator, even with HAX enabled.

A jenkins plugin would be welcome from Genymotion. I think they have it on their roadmap already.

Snicolas
  • 36,854
  • 14
  • 106
  • 172
  • 1
    You can find how to start the genymotion emulator on command line [here](http://stackoverflow.com/q/18396344/693752) – Snicolas Aug 25 '13 at 16:45
  • How do you get Genymotion to start with the Jenkins user? VirtualBox only works for the default system admin, not for Jenkins! – IgorGanapolsky Jan 31 '14 at 19:32
2

You can start a player with an already configured instance like this:

/Applications/Genymotion.app/Contents/MacOS/player --vm-name "Galaxy Nexus - 4.2.2 - API 17 - 720x1280"

Note that it is not headless.

To get the list of configured instances use VBoxManage:

$ VBoxManage list vms
"Galaxy Nexus - 4.2.2 - API 17 - 720x1280" {56d8e3aa-ecf8-483e-a450-86c8cdcedd35}

You can use either the name (in quotes) or the id with --vm-name

k s
  • 862
  • 8
  • 9
  • This won't work for the Jenkins logged in user, as he doesn't have access to the vm's. – IgorGanapolsky Jan 31 '14 at 19:32
  • I believe it did take some manipulation of users/rights but we had a Jenkins job working on a MacBook. I'm not longer associated with the project this came from so I'm not sure what the current state is, especially with all the changes GenyMotion has made since last fall. – k s Feb 04 '14 at 19:45
  • Yeah, the main problem is that Jenkins runs under it's own unix user account. That account is usually different from VirtualBox accounts that MacBook users download Genymotion under. – IgorGanapolsky Feb 04 '14 at 19:51
0

you can use x86 version of the emulator. Genymotion is basically a x86 version emualtor, that is why it is faster than Android arm version emulator.

Dave
  • 11
  • 2