View Mobile Results for Espresso Testing in Developer Hub
Not for use with personal data
Requires:
AxeDevToolsLibrary- axe DevTools Mobile API Key
- Developer Hub Project ID
Developer Hub Projects
When you create a project in axe Developer Hub, you will get a unique Project ID that you'll use to push test results to Developer Hub. In addition to this project ID, you will also need an axe DevTools Mobile API Key to send results. Learn how to Get an axe DevTools Mobile API Key.
Setup
- Install the
axeDevToolslibrary - Use the example below as a reference to implement axe in your tests.
- Use the
startSessionfunction - Copy/paste your axe DevTools Mobile key into <DEQUE_APIKEY>.
- Copy/paste the Project ID into <DEVHUB_PROJECT_ID>.
- Use the
axe.startSession(apiKey = "<DEQUE_APIKEY>", projectId = "<DEVHUB_PROJECT_ID>")
Note: Your results will be posted to both the axe Devtools Mobile Dashboard and axe Developer Hub. The Mobile Dashboard will eventually be retired in favor of Developer Hub, but during the transition, you can access your results in both places.
Full Example
class ExampleTest {
private val axe = AxeDevTools()
init {
// Connect using an API key
axe.startSession(apiKey = "DEQUE_API_KEY", projectId = "<DEVHUB_PROJECT_ID>")
}
@Before
fun setup() {
// Pass the information registry to axe DevTools
axe.setInstrumentation(InstrumentationRegistry.getInstrumentation())
// Optional: Add tags or utilize other customization features here
axe.tagScanAs(setOf("Team A"))
}
@Test
fun foobar() {
// Scan the app for accessibility issues and upload to the dashboard
axe.scan()?.uploadToDashboard()
axe.tearDown()
}
}