VOOZH about

URL: https://www.javacodegeeks.com/2017/06/optimizing-android-test-automation-development.html

โ‡ฑ Optimizing Android Test Automation Development - Java Code Geeks


Now that we are a few weeks away from Google I/O, and we understand that the complex Android landscape is becoming, even more, complex letโ€™s explore a way Android teams can optimize and plan their test automation across the different platforms and devices.

In the past, Iโ€™ve written about the need to connect the 3 layers:

  • Application under test
  • Test code itself
  • Device/OS under test

I related back to my old patent that I jointly submitted years ago in the days of J2ME and also wrote a chapter about it in my newly published book (The Digital Quality Handbook)

๐Ÿ‘ Image

Problem Definition

Android OS families support different capabilities and the gap is growing from one Android SDK to the next. As an example, Android devices older than 6.0, cannot support Android Doze for battery usage optimization, or cannot support App Shortcuts (see below example from Google Photos app). These diffs introduce a challenge to Dev and test team that innovate and take advantage of these features since the test code that shall run against these features and devices needs to be turned only towards devices can actually support it.

๐Ÿ‘ Image

How can teams sustain a test automation suite that runs specifically on the right devices per supported features?

Proposed Approach

While I donโ€™t have a bulletproof, magic pill to address all challenges that may occur as a result of the above problem, I can surely recommend an approach as described below.

Important to note, that being aware of the problem, is a step toward resolving it ��

Assess Your App and DUT:

  • Map the different features that your app supports or requires the users to grant permissions for
  • Examine your device test lab and filter the devices that support and does not support these specific features

To manage the above, teams can leverage the following:

๐Ÿ‘ Image

  • Use an existing ADB command that extracts from a connected device/s the supported feature
    • ADB SHELL
      • PM LIST FEATURES

After running the above command, you will get an output that looks like the below โ€ฆ

๐Ÿ‘ Image

Compare The Outputs

Once you know your DUTโ€™s capabilities, as well as your App, features to be tested, you can run a simple output comparison and see what can and canโ€™t be tested โ€“ From that point, the optimization should be mostly manual โ€“ you will setup your test execution and CI in the lab accordingly. While it isnโ€™t simple enough, it still offers a sustainable approach + awareness to both dev and test team that can be useful throughout the development, debugging and testing activities. In the below visual you can see a capabilities diff between a Samsung Note 5/Android 7.0 (left column) and an older  Samsung running Android 5.x device capabilities (right column). An immediate diff out of a larger list that I have shows the fingerprint functionality that is supported on the Note 5 but not on the other Samsung device. Such insight should be used when planning the feature testing across these 2 devices (this is just one example).

๐Ÿ‘ Image

Bottom Line

As Google continues to innovate and add more features, the existing devices and test framework will find it hard to close the gaps and thatโ€™s a challenge that teams need to be aware of, plan for, and optimize so their release vehicles and velocity remain solid.

Happy Optimization!

Reference: Optimizing Android Test Automation Development from our JCG partner Eran Kinsbruner at the MOBILE TESTING BLOG blog.
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Thank you!

We will contact you soon.

๐Ÿ‘ Photo of Eran Kinsbruner
Eran Kinsbruner
June 16th, 2017Last Updated: June 16th, 2017
0 96 2 minutes read

Eran Kinsbruner

Eran is Director, mobile evangelist at Perfecto with 20 years of software development and testing experience especially in the mobile space. An author of the โ€œDigital Quality Handbookโ€, patent holder, blogger, speaker and thought leader
Subscribe

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Back to top button
Close
wpDiscuz