Building reliable and comprehensive automated test coverage helps ensure your application is working as expected. In mabl, you can review a web application’s test coverage and determine which pages need more coverage on the browser coverage dashboard: Coverage > Browser tests.
This article explains how mabl measures coverage for web apps:
The browser coverage dashboard
Crawling the app
When you create a new application, mabl runs a link crawler test to check for potentially broken links in your application. The output of the link crawler tests serves as the basis for calculating test coverage in your web application.
Calculating total coverage
The browser coverage dashboard automatically filters test coverage metrics by web application. To calculate total coverage, mabl divides the number of pages in the application that are covered by mabl tests by the total number of pages in the application.
mabl updates coverage metrics roughly every 12 hours. If you aren’t seeing any test coverage metrics, or the metrics look incorrect, check out the article on how to troubleshoot browser coverage metrics.
Measuring coverage by page
A web application can have thousands of distinct URLs with very small differences in content displayed for each URL. For this reason, mabl uses a process called “URL clustering” to calculate and report coverage in terms of common pages in your web application.
URL clustering
mabl clusters URLs that share the same page template into one group to represent one page of a web application.
For example, in the mabl web app, the insights page has a different URL for each workspace:
app.mabl.com/workspaces/83hd632h9a-w/insights
app.mabl.com/workspaces/uvg9eh2n56-w/insights
dev.mabl.com/workspaces/qn243lf97h-w/insights
qa.mabl.com/workspaces/bv82bfnv75-w/insights
preview-env-445.mabl.com/workspaces/cd64lhaj32-w/insights
The URLs in this group all display different insights, but they share the same page template. To calculate coverage, mabl clusters these URLs into one group to represent one page of the application. mabl indicates distinct URL variations for a page with a wildcard: [*]
. For example, the URL for the insights page takes the following form: /workspaces/*/insights
The Application pages table
The Application pages table shows the pages in your application with a screenshot from the most recent link crawler run and detailed metrics.
The Application pages table
By default, mabl reports coverage metrics for the last two weeks. If a test or test step visits a specific page but never runs in the cloud due to an upstream test failure or conditional logic, it is not included in these totals. If you aren’t seeing any data for a given application, or the metrics look incorrect, see the article on troubleshooting browser coverage metrics.
Reviewing coverage by page
For more information on how to review coverage in the Application pages table, see the article on filtering coverage data.
Excluded pages
If your team configures exclusions on the browser coverage dashboard, mabl excludes these paths from coverage metrics.
Adding paths to the exclusion list
Exclusions apply to all applications in a workspace.
Excluded path | /workspaces |
Does exclude |
https://app.mabl.com/workspaces https://app-fake.mab.com/workspaces
|
Exclusions can contain wildcards - [*]
- to match anything in one directory.
Excluded path | /workspaces/*/settings |
Does exclude |
https://app.mabl.com/workspaces/abc/settings https://app.mabl.com/workspaces/xyz/settings
|
Does not exclude | https://app.mabl.com/workspaces/abc/configuration https://app.mabl.com/workspaces/xyz/123/settings |
Exclusions are inclusive of subdirectories.
Excluded path | /workspaces |
Does exclude |
https://app.mabl.com/workspaces https://app.mabl.com/workspaces/xyz/settings
|
Does not exclude |
https://app.mabl.com/workspaces-preview https://app.mabl.com/preview/workspaces
|
Note
Excluding pages on the browser coverage dashboard does not stop the link crawler test from visiting these pages.