days
1
2
hours
2
3
minutes
3
9
seconds
5
5
The answer to Android developers' prayers

LinkedIn open sources Test Butler, an Android app testing tool

Gabriela Motroc
Test Butler

Internet connection by smart phone image via Shutterstock

As the new LinkedIn app was launched, the California-based tech giant realized that their testing environment was unreliable, which meant that tests failed occasionally. This is where Test Butler comes into play.

Drew Hannay, staff software engineer at LinkedIn, revealed that the tech giant has found a way to solve one major problem that kept appearing when they tested the new LinkedIn Android app; it’s called Test Butler and it’s a tool which promises to make it easier for Android developers to find usability issues in their software.

According to the blog post, UI testing on Android can be tricky because “tests could depend on being run in a certain order, or depend on some shared application state that may not be reset between tests.” Android developers may have witnessed first-hand the instability of the emulator; Espresso tests cannot run reliably if animations are disabled.

There are a few reasons why tests may fail: WiFi turns off all of a sudden, the emulator CPU may randomly go to sleep or the device changes orientations due to rogue accelerometer data. Espresso UI tests will fail if a system app crashes on the emulator in the background, and there have been cases at LinkedIn where tests failed because the lock screen on the emulator got randomly triggered, Hannay claimed. All these problems affected the way Android developers perceived LinkedIn’s tests.

SEE ALSO: LinkedIn open sourcing optimization tool for Hadoop and Spark

Why do Android developers need Test Butler?

Test Butler comes with an Android library that developers’ test code can depend on, and a companion Android app APK that they can install on the Android emulator before running tests. This tool offers features such as signature-level permissions, disable crash and App Not Responding (ANR) dialogs, disable animations, lock screen, WiFi, CPU. It can also help handle other testing tasks that require extra permissions for your app, Hannay revealed, such as enable/disable WiFi, change device orientation, set location services mode and set application locale.

Test Butler has been released under the Apache 2.0 license and the code is available on GitHub.

Author
Gabriela Motroc
Gabriela Motroc is editor of JAXenter.com and JAX Magazine. Before working at S&S Media she studied International Communication Management at The Hague University of Applied Sciences.

Comments
comments powered by Disqus