Skip to content

dequelabs/axe-devtools-android-sample-app

Repository files navigation

Android Sample App for axe DevTools Mobile by Deque

A sample application built solely to showcase axe DevTools Android automated espresso test implementation. It is non-functional and made inaccessibly by design.

Get started with a free trial today.

Helpful Links


Getting Started:

  1. Clone the repository
  2. Grab an API key from the settings page
  3. In app/build.gradle, add your API Key in the AXE_DEVTOOLS_APIKEY variable
android {
    def AXE_DEVTOOLS_APIKEY = "YOUR_API_KEY_HERE"
    
}

Once you add the API Key you are ready to start scanning the application using the espresso tests.

You can see accessibility testing in action through the ExampleEndToEndAccessibilityTest Espresso test or any other test in the androidTest folder. The androidTest folder contains examples of Jeptpack Compose, XML and UiAutomator. You can kick it off from Android Studio, or through an automated service such as Perfecto, Sauce Labs, etc.

Note:

  • This project is set to use the Android Gradle plugin version 7.3.1. Running the project with newer, or older, JDK versions may require you to update the Gradle plugin version accordingly. Please refer to Android's Updating the Gradle Plugin documentation for more.

Perfecto

If you have an account with Perfecto, you can run the automated tests of this application by using our prewritten Perfecto configuration file configFile.json that shards the tests across any two available devices. Follow the steps below to get started:

  1. Project's build.gradle: Add maven { url "https://repo1.perfectomobile.com/public/repositories/maven" } to repositories section. Add classpath 'com.perfectomobile.instrumentedtest.gradleplugin:plugin:+' to dependencies section. See Configure the project for Perfecto section

  2. app/build.gradle: Add id 'com.perfectomobile.instrumentedtest.gradleplugin' to plugins section.

  3. Update the prewritten configFile.json if needed. See Android configuration parameters

  4. Run a test on Perfecto from the terminal: ./gradlew perfecto-android-inst -PconfigFileLocation=configFile.json -PcloudURL=demo.perfectomobile.com -PsecurityToken=$SECURITY_TOKEN where cloudURL should reflect your Perfecto cloud URL and securityToken should reflect your Perfecto's security token.

Reach out to Perfecto Support for any assistance.

Sauce Labs

If you have an account with Sauce Labs, you can run the automated tests of this application by using our prewritten Sauce Labs configuration file .sauce/config.yml. Follow the steps below to get started:

  1. Install the saucectl command line interface. See Using the saucectl CLI

  2. Add your Sauce Labs credentials to your .bash_profile or .zshenv. Be sure to load the changes by running source .filename. See Associate your Credentials

  3. Update the prewritten .sauce/config.yml See Configuring Your Espresso Tests

  4. Run a test on Sauce Labs from the terminal: ./gradlew app:assembleDebug && ./gradlew app:assembleAndroidTest && ./saucectl run

Have a Question? Found a bug?

Reach out to us, we'd love to help!

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages