In order to help mobile app developers with testing apps for the Android ecosystem at scale, LinkedIn announced that Test Butler, a new suite of tools that run large scale UI testing for Android, is now an open-source project.
Today, mobile app developers face a few challenges. As mobile platforms grow, developers need to put a strong focus on making sure their apps are high-quality for their users. A common way to ensure this is to do adequate automated testing, according to Drew Hannay, a staff software engineer at LinkedIn who also led the Test Butler project.
(Related: When wearables go bad)
Test Butler provides a solution for emulator stability and device controls, but it only requires a single line of code to set up, and it handles all the permissions so an app doesn’t need to include them. It also aims to solve some of the “problems of stabilizing an Android emulator as well as providing test authors with easy utilities for modifying common device settings,” said Hannay.
Test Butler includes an Android library that test code can depend on, and it also includes an Android app APK that can be installed on an Android emulator before running tests. Features include signature-level permissions, disable crash and “App Not Responding” dialogs, as well as other enhancements to help with testing tasks.
Test Butler can also solve some of the problems associated with automated testing. The key to writing useful automated tests is to first make sure they are reliable, said Hannay. For mobile apps, this can be difficult since running tests on an emulated Android device means that things are “out of your direct control,” he said.
“If the Android emulator is unstable, or some other app running on the emulator crashes in the background, it can cause tests to fail randomly,” said Hannay. “Fixing this instability often requires a very deep knowledge of how the Android OS works, as well as adding many ‘dangerous’ permissions to the app.”
Test Butler is open source, and Hannay said he believes that any Android developer running automated tests can benefit and contribute to the code on GitHub. Since Test Butler is now open source, he said the community can adopt it as a standard way to increase the reliability of automated tests and the quality of Android apps.