Fast-Forward Android Instrumentation Tests

Modern mobile app development demands faster release cycles — a particularly tough task when you’re developing for Android.

As we all know, different combinations of Android versions, devices and screen sizes make testing Android apps exhausting and time-consuming. And the more elaborate a project, the longer it takes to receive test results, which will eventually kill your productivity.

Today, we’ll reveal two great ways to cut down on test duration and speed up Android development. 🚀


Test Parallelization — Multiple Emulator at once

Test parallelization is the way to go when you want to make sure that your app runs on all sorts of Android versions & devices. Instead of testing your app on just one particular emulator, test parallelization lets you run multiple emulators at the same time. This way you get valuable test results by testing different API levels & screen sizes in the same amount of time. Test parallelization truly is a great way to expose device-specific bugs faster.

Testing on multiple emulators in parallel

Benefits of test parallelization:

  • Test across multiple API levels + screen sizes
  • Save time compared to testing in sequence
  • Expose device-specific bugs early on

Test Sharding — Built for Speed! 🚤

That’s right. Test sharding is all about speed & getting you the test results as fast as possible without the endless waiting. It divides your test suite evenly into smaller “shards” that run on separate emulators with the same API & screen size. Just imagine a supermarket opening two additional cash registers to prevent giant waiting queues. Likewise, you’ll get through the test suite way quicker by splitting the heavy lifting among multiple emulators.

Speed up instrumentation tests with test sharding

Benefits of test sharding:

  • Super fast test execution
  • Prompt test results
  • Time-saving

We tested an app with a huge test suite consisting of over 18,000 tests using Nevercode. We activated test sharding with a few clicks and ran 3 emulators at once. As a result, we cut down the test duration from over 2 hours to just 45 min (see graph below).

Conclusion 💡

Test parallelization and test sharding have an incredible value for all Android developers. They allow you to speed up the entire development process by reducing the overall test duration & waiting times. You’ll be able to test more, test faster and release Android apps with confidence.

The good part is that you don’t have to set up everything from scratch. With Nevercode as your continuous integration & delivery platform, you can use these features out of the box and so automate your entire development process with just one tool.