Applause Helps Improve Automated Testing Capabilities for Android in Appium

Applause has a goal to enable organizations to test as thoroughly and efficiently as possible, whether or not you’re leveraging Applause’s global community of trained testers.

Our Engineering and QA teams here at Applause use Appium on a regular basis. When we noticed that Appium, the leading solution for automated mobile tests, had built-in support for mjpeg screenshot streaming on iOS but not on Android, this made us pause. We wanted to see if it would be possible to add this feature for Android, so we worked with the Appium team at Sauce Labs to make it happen.

Why Screenshot Streaming?

With automated functional testing for mobile apps, knowing that a test failed is helpful, but it’s better to have visuals that tell the story.

Screenshot streaming, similar to video recordings, captures what is happening in an app over time and makes it possible to get a much clearer picture of what happened during testing. However, screenshot streaming is more interactive and optimizes the performance in the process because the device is pushing data to the client — rather than the client having to repeatedly poll the device for updated information.

In that way, screenshot streaming brings a closer-to-real-time experience than video because you're essentially looking at the test as it happens. This helps the tester detect issues that could be easily missed otherwise, and additionally decreases the time to iterate during test development.

Screenshot streaming brings a closer-to-real-time experience than video because you're essentially looking at the test as it happens.

For example, automatically capturing a streaming of an application process that fails can reveal the user’s precise clicks or touches before the failure. Or streaming images of failed tests for collision detection in a mobile action game can quickly identify problems with an object’s bounding box.

There are an endless number of situations where having a screenshot stream can pinpoint problems within an app, and when it comes to testing, knowing more is always better. In many testing scenarios, having a screenshot stream helps provide the full context.

Appium in Automated Device Testing

Today, Appium is the go-to test automation framework for mobile devices because it allows cross-platform testing on devices and emulators with zero dependencies on the app and the operating system. We use Appium at Applause — and love it.

With Appium, you don’t need to add any SDK or library code to your app. It works by translating WebDriver automation commands into native mobile device commands for iOS through XCUITest, and for Android via UiAutomator2.

The XCUITest driver supports screenshot streaming through an mjpeg server functionality. This enables us to simply open a web browser to the local URL and view a livestream of the device screen, with configurable screenshot quality and framerate through the Appium settings API. This feature was missing from UiAutomator2.

Because screenshot streaming can be such a critical tool for discovering issues during automated functional testing, finding out that this capability was not available for Android devices inspired the Applause Labs team to get our hands dirty (and our code ready) to make this happen.

Having recently built this capability into our fork of the UiAutomator2 repository and wanting to give back to the open-source community, our Applause Labs team worked directly with the Appium team to add this feature to UiAutomator2 with the same configurable settings that were available in XCUITest. We submitted a pull request to be merged into Appium along with changes to the documentation. Screenshot streaming for both iOS and Android devices is now available in the beta release and will be available in the next major release of the Appium platform.

Screenshot streaming for both iOS and Android devices is now available in the beta release.

Better Testing for Everyone

Having screenshot streaming makes Appium’s Android testing capabilities match those available for iOS devices. For us at Applause, simultaneous cross-platform testing of mobile apps is especially valuable because it helps ensure that the testing experience and results are consistent across platforms.

It was a great experience working with the Appium team to add this feature to UiAutomator2 for Android devices. We are happy to be a contributing member of the Appium open-source community: our work together makes automated testing better for everyone.

Next time you are testing an app on an Android device with Appium, give screenshot streaming a try. Share your best app clip with us because we would love to see it in action.


5 Ways To Win With Mobile Automation

Pitfalls to avoid and best practices to consider when taking on automation.

Read '5 Ways To Win With Mobile Automation' Now
Want to see more like this?
Jonathan Zaleski
Sr. Director of Engineering & Head of Applause Labs
Reading time: 5 min

Some Key Considerations for Testing Blockchain

Blockchain technology is changing the ways people think about — and process — secure transactions across different sectors. Transparency and testing are crucial in helping people trust the results. Explore some use cases and quality considerations.

Generative AI Use Is Growing – Along With Concerns About Bias

See the results of Applause’s survey on generative AI use and user sentiment

How to Land Your Dream Software Testing Job

Here’s how to stand out in a competitive yet thriving QA job market

What Is Continuous Testing in DevOps?

Learn about continuous testing benefits, tools and frameworks

Digital Quality as a Service: A Necessary Evolution of Software Testing

Read how Digital Quality as a Service (DQaas) can help organisations to deliver the very best digital experiences.

Creating Seamless B2B Software Experiences for All Users

B2B software companies must ensure they cater to multiple audiences, often with varied needs, to stay ahead in a competitive market.