Get the AxeDevTools Gradle Plugin

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard

Add the library into your UI tests

Not for use with personal data

Setup

Requires:

Sample Application

You can download our sample application on GitHub to see a working example of the Axe DevTools Mobile library implemented within a simple UI test. Add your Deque credentials and follow the README to begin scanning. This application is inaccessible to showcase Axe DevTools Mobile's implementation steps and accessibility issue detection.

Implementation

Make sure there is Internet permission in AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

In your application's build.gradle file, add:

android {
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        
        //For Espresso Tests:
        exclude 'META-INF/AL2.0' 
        exclude 'META-INF/LGPL2.1'
    }
}

Add the Gradle Plugin

To integrate our plugin into your existing tests, find our most recent release and update this as well in your build.gradle file.

Groovy (build.gradle):

plugins {
    ...
    id 'com.deque.android' version '1.0.0'
}

Kotlin DSL (build.gradle.kts):

plugins {
    ...
    id("com.deque.android") version "1.0.0"
}

Using Artifactory

Axe DevTools Mobile customers can utilize Deque's private Artifactory for library management. For complete details, please view the instructions for using Artifactory.

Stay Up to Date

Double-check that your version of axe DevTools Mobile for Android is up to date, to ensure you have the latest rules and features. It does not automatically update, so you should check for a new version periodically. See How to Update axe DevTools Mobile for Android for details.

What's next?

Next, configure your automated Espresso or UIAutomator test suite to scan for accessibility issues. For a quick start, use Auto Scan to identify accessibility issues automatically as your existing test suite runs. For more granular control and customization in your tests, set up for Targeted Testing.