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.
- Library documentation can be found at docs.deque.com.
- Learn more about Deque and axe DevTools Mobile here.
- Clone the repository
- Grab an API key from the settings page
- In
app/build.gradle
, add your API Key in theAXE_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.
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:
-
Project's build.gradle: Add
maven { url "https://repo1.perfectomobile.com/public/repositories/maven" }
to repositories section. Addclasspath 'com.perfectomobile.instrumentedtest.gradleplugin:plugin:+'
to dependencies section. See Configure the project for Perfecto section -
app/build.gradle: Add
id 'com.perfectomobile.instrumentedtest.gradleplugin'
to plugins section. -
Update the prewritten
configFile.json
if needed. See Android configuration parameters -
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.
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:
-
Install the
saucectl
command line interface. See Using the saucectl CLI -
Add your Sauce Labs credentials to your
.bash_profile
or.zshenv
. Be sure to load the changes by runningsource .filename
. See Associate your Credentials -
Update the prewritten
.sauce/config.yml
See Configuring Your Espresso Tests -
Run a test on Sauce Labs from the terminal:
./gradlew app:assembleDebug && ./gradlew app:assembleAndroidTest && ./saucectl run
Reach out to us, we'd love to help!