Back to Resources


Posted June 26, 2017

Why Automated Testing is Critical to Your Mobile Applications


For even the most battle-hardened developer, the world of mobile development can be fraught with pitfalls and unseen dangers. No longer is the developer simply responsible for producing bug-free and fault-tolerant code—now they must deploy those solutions into an environment with:

  • An ever-increasing number of devices, each with a unique set of special features

  • Software updates and compatibility considerations

  • The need to continue to support new versions, while maintaining the old

In this environment, the use of automated testing becomes an absolute necessity. Let’s look at what automated testing of mobile applications entails, and talk about what steps you can take to bootstrap your automated testing strategy, so you can return to the reason you started coding in the first place: engineering solutions to the world’s problems through code.

What is Automated Testing?

Automated testing refers to the automated execution of test scenarios against a code base. In the case of mobile testing, these scenarios can be run against the application on emulators or real devices, or preferably on both.

By automating these tests, they can be run periodically, or whenever new code is added to a project to ensure that existing functionality continues to work and that new functionality works as expected.

The creation of automation will require an initial investment of time, but the dividend is paid out as increased testing efficiency, faster time to deployment, and comprehensive test coverage with minimal human interaction.

How Can I Automate Testing on a Mobile Device?

For years, quality assurance professionals have relied on Selenium to automate tests for websites. Appium grew from the Selenium project as a way to test mobile applications. Appium was designed around several core principles.

Among the most important of these principles:

  • The user should be able to test their application using the native code

  • The user should not be compelled to use a specific language or technology for their application

There are other solutions available for testing, such as Robotium, UIAutomator, and Espresso, but Appium is the framework of choice for many developers in the industry.

What Aspects of Mobile Applications Should be Tested?

As an automation tool, Appium allows you to simulate user interactions with the mobile application, and validate the content of the response, as well as the performance of the response.

In addition to testing the logic and responsiveness of your application, you may also want to pay attention to:

  • Impact of the application on device battery life

  • Memory requirements on the device for installation and operation

  • Network data requirements

What Devices Should I Purchase?

Perhaps one of the biggest obstacles to performing comprehensive and thorough application testing is the cost involved in procuring multiple devices and maintaining these in a state which allows for effective testing. (Unless you have an unlimited budget and a staff of folks willing to maintain all the devices for you, I would recommend a different approach.)

A device cloud allows you to create an automated test suite, and then set up the execution of those tests against installations of your application on a collection of devices with different platforms, devices and versions.

One such example of this is the SauceLabs Real Device Cloud, which offers everything from Google Nexus 6P to the iPad Mini 4, with additional devices being added all the time.

What Are Your Next Steps?

Obviously, an article of this size can only go so far in introducing you to the merits of automated testing and helping to clarify concepts and identify potential tools. If you would like to find out more information on the topics listed above, I would recommend the following links.

The Website provides download links for Appium itself, as well as comprehensive documentation around how to run tests in different environments.

Appium for Android by Nishant Verma is a GitHub publication which includes step-by-step tutorials for automating tests on mobile devices.

SauceLabs Real Device Cloud introduces SauceLabs device cloud, lists their supported devices, and links you to their testing portal.

Mike Mackrory is a Global citizen who has settled down in the Pacific Northwest - for now. By day he works as a Senior Engineer on a Quality Engineering team and by night he writes, consults on several web based projects and runs a marginally successful eBay sticker business. When he’s not tapping on the keys, he can be found hiking, fishing and exploring both the urban and the rural landscape with his kids. Always happy to help out another developer, he has a definite preference for helping those who bring gifts of gourmet donuts, craft beer and/or Single-malt Scotch.

Jun 26, 2017
Share this post
Copy Share Link
© 2023 Sauce Labs Inc., all rights reserved. SAUCE and SAUCE LABS are registered trademarks owned by Sauce Labs Inc. in the United States, EU, and may be registered in other jurisdictions.