Coverage in Unit vs UI Testing

Link to Coverage in Unit vs UI Testing copied to clipboard

Using axe DevTools in your unit and/or UI tests can provide a significant advantage in catching accessibility issues early and reliably when they arise. Both unit and UI tests have their advantages depending on the use case of your application. The benefits of each are laid out below to help you determine the best approach for your app and team.

Unit Tests in axeDevToolsUIKit

  • Unit tests can run without interacting with the server.

  • The screen is not rendered when running unit tests. As a result, the view hierarchy may differ from what a user would experience when using your app. You may see the differences in reported results for UI tests.

UI Tests in axeDevToolsUIKit

  • UI tests need to interact with the server to perform accessibility scans. Learn more about security and data in axe DevTools

  • The screen is fully rendered when running UI tests. Accessibility issues found with UI tests are the closest to the user's experience while using the app.