Testing Android Applications with Access Continuum

  • Updated

Before you Start

Before installing Access Continuum, the following prerequisites should be installed in your environment:

Getting Started

Step 1: Download Continuum for Android

  1. Log into AMP and navigate to the Toolbox tab in your instance of AMP.
  2. Download Access Continuum for Android. It can be found in the Toolbox tab. 
    Continum for Android download in AMP Toolbox
  1. Unzip the file. The src/main/resources/continuum.properties file defines all Access Continuum-specific configuration for this project.

Step 2: Set Up 

  1. Set `mobilePathToAppFile` to the absolute path of the APK you'd like to test
  2. Set `androidAppPackage` to the package name of your Android app, i.e. the value of `applicationId` in your Android app's app/build.gradle file.
  3. Set `androidVirtualDeviceName` to the name of the Android Virtual Device (AVD) you'd like to test against. You can use the Android Virtual Device Manager in Android Studio to create or otherwise get the name of an AVD to use.

Step 3: Testing your Android app with Access Continuum

  1. Start Appium Desktop, and select the 'Start Server' button (For testing with Access Continuum, there's no change needed for this step) 
  2. Start testing using Maven: mvn test 
  3. You should get test results in JSON format with each violation detailed as follows: 

Android Test Results Sample

[{"engineTestId":131,"bestPracticeId":1963,"element":"<android.widget.ImageButton content-desc=\"\" bounds=\"[68,62][16,258]\"...","testResult":0,"attribute":"This ImageButton element does not have a content description"}]


Explanation of Test Results

  • bestPracticeId references the Best Practice number for Android in AMP.
  • element gives you details of exactly which element on the screen was flagged.
  • testResult of 0 means the test did not pass.
  • attribute is a description of what issue was found.

Read more about test results in the "Access Continuum Test Results" article.

Testing Access Continuum Using the Sample Android App

The sample Android app that ships with Access Continuum is a basic native Android app with one activity and two fragments. The activity contains two tabs to switch between the two fragments. One of the fragments is comprised of only accessible components, while the other consists of components that are all not accessible. Each component in both fragments is labeled according to why it passes or fails Continuum's accessibility validation.

Accessible application example  Non-accessible application example

To test this app with the Continuum for Android mobile testing framework:

  1. Open this project in Android Studio.
  2. Choose "Keep All" when you get the message that two modules cannot be loaded.
  3. From the top navigation menu select Build > Build APK(s). This will build the app and create an app-debug.apk file in the app/build/outputs/apk/debug directory.
  4. Copy the absolute path to this app-debug.apk file and paste it into your continuum.properties file in your installation of Continuum for Android (in the src/main/resources directory of that project) as the value for the mobilePathToAppFile attribute. Set androidAppPackage to com.levelaccess.exampleandroidapp.

From here, refer to the README in the Continuum for Android project for more information on subsequent steps.


Was this article helpful?

1 out of 3 found this helpful