Continuous Android testing

Getting my tests to run when Jenkins builds the Android application has been a challenge.  I had this running with Genymotion 1, on a Mac Mini, from a Jenkins agent then the upgrades came.  First Genymotion went to version 2 and the stability dropped.  I had to stop and start things more often.  So I ditched Genymotion and went to the emulator that comes with the Android SDK.  Finally we got new iMacs and they are running Mavericks instead of Mountain Lion.  Nothing worked for a while, time to rebuild.

I built a few images for the emulator and got the emulator working with my application.  Running this bestest macbook pro retina the tests time out.  I used these settings from the appium-discuss group: but it was too slow to run the tests that had been passing with genymotion.  Here is that thread where I posted timings:!searchin/appium-discuss/genymotion/appium-discuss/p0VbkiilPIw/rz2Ry8KppIQJ At this point I’ve decided that the Google emulator is not good.  It seems like the network is way too slow and the UI is just a little slow but I don’t want to waste any more time on this.  So I am left with the real device or going back to genymotion.  Genymotion is €99-299 if I go with that option or $600 or so for a Nexus device and the hassle of having to secure the device at my desk.

Genymotion again:

I rebooted my machine, grabbed genymotion 2.0.3 and ran one of the 1.X images that I had sitting around from the good old days.  I got an error but the emulator fired up very quickly and I was able to run my tests without them failing.  I will need to keep an eye on this to make sure that this solution is stable again.  Our application needs the google apps to fully function so the new images are not what I want to run with.

A common problem that will arise is that the tests will not see a physical device or an emulated one from time to time.  You can verify that this is a problem by running this command and seeing no attached devices:

adb devices

If there are devices these two command usually fix the issue:

adb kill-server
adb start-server

The final step was getting the latest 32-bit (Chrome, why do you hate OSX?) on my laptop and running the jenikns jnlp and binding my job to it.

Next, figure out what is wrong with having the agent run in Mavericks.

Explore posts in the same categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: