Android Accessibility Testing in Android Studio
axe DevTools Mobile Analyzer enables accessibility testing on any Android application built with any technology.
Requires:
- Android Studio
- App to test running API 24 or higher
- App to test installed on a physical device or emulator
- Username and Password for the axe DevTools Mobile Dashboard
The instructions below assume your Android Studio environment is already set up. If you are new to Android Studio, check out this introductory guide to get set up for app development.
Get Started
Let's walk through the first-time setup for accessibility testing using axe DevTools Mobile Analyzer Project in Android Studio.
1. Download the axe DevTools Mobile Analyzer Project from Deque's Artifactory
-
Login to Deque's Artifactory: agora.dequecloud.com
Note: When the page loads, do not search for a package. Return to this page and move on to the next step. -
Click this link to download the axe DevTools Mobile Analyzer project: axe-devtools-android-uiautomator-v0.1.0.zip
If the file doesn't automatically start downloading, click the download button next to "URL to file" from the Agora site.
-
Once the zip file is finished downloading, extract the files to the desired location on your computer.
-
Open the root folder in Android Studio by selecting
File
→Open
and selecting the project's folder.
2. Setup the Project
-
From Android Studio, in the project navigator pane, expand
app
, expandsrc
, then expandAccessibilityScan
. The folders withinAccessibilityScan
should expand automatically, but if they don't go ahead and expand those too. -
Double-click the file
RunScan
to open it. Replace the text "YOUR_API_KEY_HERE" with your axe DevTools Mobile API Key.
3. Prepare Your Device / Emulator
- To run a scan, your Device or Emulator should be connected to Android Studio. If running a device, you'll need to enable Developer settings.
- Next, the app you'd like to test must be installed on the emulator/device and running at the time of the scan. If you have access to the source code, you can run the app on an Android Emulator, or a physical device directly.
4. Run An Accessibility Scan
-
With the app running, select the green double-arrow icon next to
RunScan
. This will kick off the accessibility scan against the app that is running. -
You can find your scan on the axe DevTools Mobile Dashboard.
Repeat this for each screen you want to test.
Run into an error with Gradle?
The project is setup for Android Gradle plugin 8.1.1, if the app under test does not support version 8, follow our guide to change to a supported version.
You're Done!
Congratulations, you've successfully set up axe DevTools Mobile Analyzer. Visit the axe DevTools Mobile Dashboard to see your scans.
Questions? Visit Frequently Asked Questions