Shift Accessibility Left in Your Native Android Development
In a previous blog post, my colleague Chris McMeeking explained how an accessibility subject matter experts or native mobile testers can use our WorldSpace Attest product to test an Android native application, including any third party application. If you’re not familiar with Attest, it’s an automated testing toolkit for HTML, iOS and Android that enables developers to test for accessibility.
In this article, we will explore how a developer can use the Attest API to perform accessibility testing on a native application that is currently under development, using Android Studio. The most cost-effective way to ensure the quality of your application is to catch as many accessibility defects as early as possible. To do this, I’ll demonstrate how you can improve your mobile accessibility testing process with the Attest API and how it can be integrated with the IDE in three simple steps.
Follow along here in my recorded walk-through if you’d like:
Step 1: Get Access to the Attest libraries and configure build.gradle file
First step, you will need to configure your repository section in the build.Gradle file by providing the location URL of libraries along with the credentials. To do this, fill the repositories section of application’s gradle file with the server details from where Attest libraries can be downloaded.
Since Attest is a licensed product, you will have access to the credentials after procuring the product. In addition to this configuration, add required dependencies in the same gradle file.
Step 2: Build the project
Once you have build.gradle file configured properly, you can build the project to get the required dependent libraries including Attest modules. You can find these added libraries under “External Libraries” section of the project.
Step 3: Create an object of UI class and call .isAccessible method
Finally, create a unit test case and test your user interface object elements for accessibility standards. To analyze the UI file for accessibility violations you will need to create an object of UI class in your unit test and call is.Accessible() method to analyze the object code for any potential accessibility violations.
Run the unit test case either using emulator or the actual Android mobile device and see the list of accessibility issues in the console of the IDE.
Issue details will have all the information required to identify and fix the accessibility issue thrown by the API. Developers may fix the issue based on the description provided and re-run the unit test case to see if it is fixed or not. The Attest license also comes with a well-documented API for users so that they may configured standards, custom rule sets, and reporting modules. Additionally, Deque also provides excellent customer support.
By testing for accessibility bugs early in your native mobile development and not after the delivery date, you will ensure a cost-effective software development lifecycle (SDLC). Additionally, testing accessibility defects in production will prevent a lot of frustration for development teams by reducing the number of cycles between production, development, and test teams. That’s the power of having automation integrated in the right stage of the software production life cycle. If you have any questions about the product or you would like to see Attest for Android in action, contact us for a demo!