From the course: Android App Development: Accessibility

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Automated tests for accessibility

Automated tests for accessibility - Android Tutorial

From the course: Android App Development: Accessibility

Start my 1-month free trial

Automated tests for accessibility

- The accessibility testing framework was developed by Google to check for accessibility issues on Android applications. It's just a library you can import in your code that runs a set of checks for each item in the view hierarchy and reports any problems if found. This library is very good to be plugged into instrumented tests. That is, your acceptance or your Y tests. The accessibility testing framework has integrations with Espresso and Roboletric. Since you will be using this while the app is running, the chance that this contains false positives is very low. For your project, you can take two strategies in regards to accessibility violations in your tests. The first one, which I recommend, is to make sure that when the accessibility checks fail, you also fail the build. That means people shouldn't be able to commit code with accessibility problems. In order to prevent people from getting blocked, you can set up a list of violation suppressions. This way, people will have to…

Contents