Advanced Automation

Link to Advanced Automation copied to clipboard

With axe DevTools for Mobile, you can have complete accessibility testing at every step of the development lifecycle. Catch accessibility issues with automation before they are added to the codebase.

Automation setup can be found in the getting started pages for axeDevToolsUIKit.xcframework and axeDevToolsXCUI.xcframework.

This section will discuss features available to you to customize your automation experience. You'll also find examples of integrating axe DevTools into your favorite testing frameworks within the left-side navigation.

With the axeDevTools UIKit framework, scans can be sent to the dashboard then saved locally. axeDevTools XCUI allows scans to be saved locally or sent to the dashboard. Save scans locally to generate session reports utilizing the axe DevTools Reporter CLI tool.

Custom Configuration

Supported within:
axeDevTools UIKit framework axeDevTools XCUI framework

Utilize some of the available features within the setUp method to customize your testing experience.

override func setUp() {
	axe?.configuration.ignore(rule: AxeRuleId.ConflictingTraits.toString())

Update Build Status

Supported within:
axeDevTools UIKit framework axeDevTools XCUI framework

As mentioned above, axe DevTools is available throughout your CI/CD pipeline. To fail a build and keep an issue from being merged, you will want to fail a test when accessibility issues are found.

axeDevToolsUIKit Example

Unit Tests UI Tests

Within unit tests:

let vc = HomeViewController()
let result = try axe?.run(onViewController: vc)

XCTAssertEqual(result?.failures.count, 0)

within UI tests:

let result = try? axe?.getResult(key)

XCTAssertEqual(result?.failures.count, 0)

axeDevToolsXCUI Example

UI Tests
let result = try XCUIApplication())

XCTAssertEqual(result.failures.count, 0)