Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessibility test automation on Android

I recently started looking into automating accessibility testing on Android. There isn't much information out there on the web. Has anyone explored this or are currently doing this? If so, can you share your ideas/approach?

Seems like Android's uiautomator relies on Accessibility features working but it doesn't support testing Accessibility. If it relies on Accessibility features, does that mean that basic validation like accessible label exists, etc. can be done by just executing UI tests using uiautomator?

This is a new area for me so any information could be helpful.

like image 506
Kshah Avatar asked Aug 10 '26 16:08

Kshah


1 Answers

Here's a great introduction to Accessibility testing in Android. It basically boils down to:

  • Manually test your app for visual issues with Accessibility Scanner
  • Turn on TalkBack and manually test your app to find hearing impaired issues
  • To find font scaling and layout issues, use Large Text
  • Definitely lint check, but make sure that 'Image without contentDescription' is set to Severity = Error
  • Any/all accessibility issues you find or that are reoccurring, write an Espresso test to fail when that accessibility issue is violated in the future
  • For automation, you'll also need to consider how to perform visual validation of certain screen artifacts and audio analysis if hearing impaired functionality is a requirement.

Also, I recommend watching this presentation from GTAC 2015 on accessibility testing for some great context on the topic.

For automated tests that check for accessibility, I'd very much recommend starting with issues that can be identified in elements that are shared across screens (menus, layouts, themes, custom controls). While they won't catch the one-off errors that will occasionally pop up, they'll address issues that happen everywhere in your app, a 'prioritize by volume' approach if you will.

Also, if your team uses Android Studio then you definitely want to push for the ability to write Espresso tests that reside with the code. QA are part of the development process, period. Getting access to a subfolder where your tests reside shouldn't be a problem unless there some legal bologna to deal with. For instance, split out the 'androidTest' folder as a submodule where you have pull/push rights as a tester, but only read rights to the rest of the app so you can compile and run yourself. If you're writing Appium tests, it may be harder to ask your dev team to run them as part of their own BVT/smoke test process during builds, but not unheard of.

As for visual analysis and audio injection/confirmation, these are advanced capabilities that you'll probably need to use some service or commercial tool for.

Best of luck!

like image 147
Paul Bruce Avatar answered Aug 13 '26 08:08

Paul Bruce



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!