{
  "doc": {
    "id": "ui-coverage/guides/identify-coverage-gaps",
    "title": "Identify coverage gaps | Cypress UI Coverage Documentation",
    "description": "Learn how to identify coverage gaps with Cypress UI Coverage to ensure quality of your application.",
    "section": "ui-coverage",
    "source_path": "/llm/markdown/ui-coverage/guides/identify-coverage-gaps.md",
    "version": "24a73f8a97175663aaffd3b016289fb2a523a4ea",
    "updated_at": "2026-05-14T20:17:33.301Z",
    "headings": [
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#identify-coverage-gaps",
        "text": "Identify coverage gaps",
        "level": 1
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#run-tests",
        "text": "Run Tests",
        "level": 2
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#example-automated-sitemap-based-testing",
        "text": "Example: Automated Sitemap-Based Testing",
        "level": 3
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#review-coverage-reports",
        "text": "Review Coverage Reports",
        "level": 2
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#overall-score",
        "text": "Overall Score",
        "level": 3
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#views",
        "text": "Views",
        "level": 3
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#view-drilldown",
        "text": "View Drilldown",
        "level": 4
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#untested-links",
        "text": "Untested links",
        "level": 3
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#referrer-drilldown",
        "text": "Referrer Drilldown",
        "level": 4
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#untested-elements",
        "text": "Untested elements",
        "level": 3
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#view-drilldown",
        "text": "View Drilldown",
        "level": 4
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#configure-ui-coverage",
        "text": "Configure UI Coverage",
        "level": 2
      },
      {
        "id": "ui-coverage/guides/identify-coverage-gaps#next-steps",
        "text": "Next Steps",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#run-tests",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Run Tests",
      "heading_level": 2,
      "content_markdown": "## Run Tests\n\nTo identify coverage gaps, you need to first run and record Cypress tests to the Cloud. If you're new to Cypress, refer to the [Cypress documentation](/llm/markdown/app/end-to-end-testing/writing-your-first-end-to-end-test.md) to get started with writing tests.\n\n### Example: Automated Sitemap-Based Testing\n\nIf your project lacks existing Cypress tests, a common approach is to understand test coverage from a sitemap or an array of target URLs. These URLs can be used to perform light interactions and capture the initial gaps in testing. Below is an example of how to automate this process by using a sitemap:\n\n```\ndescribe('UI Coverage Scan', () => {  it('Checks ui coverage with the sitemap.xml', () => {    cy.request('https://<YOUR_WEBSITE>/sitemap.xml').then((response) => {      const xmlString = response.body      const parser = new DOMParser()        (loc) => loc.textContent    })    Cypress._.each(URLs, (URL) => {      cy.visit(URL)    })  })})\n```\n",
      "section": "ui-coverage",
      "anchors": [
        "run-tests"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 179
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#example-automated-sitemap-based-testing",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Example: Automated Sitemap-Based Testing",
      "heading_level": 3,
      "content_markdown": "### Example: Automated Sitemap-Based Testing\n\nIf your project lacks existing Cypress tests, a common approach is to understand test coverage from a sitemap or an array of target URLs. These URLs can be used to perform light interactions and capture the initial gaps in testing. Below is an example of how to automate this process by using a sitemap:\n\n```\ndescribe('UI Coverage Scan', () => {  it('Checks ui coverage with the sitemap.xml', () => {    cy.request('https://<YOUR_WEBSITE>/sitemap.xml').then((response) => {      const xmlString = response.body      const parser = new DOMParser()        (loc) => loc.textContent    })    Cypress._.each(URLs, (URL) => {      cy.visit(URL)    })  })})\n```\n",
      "section": "ui-coverage",
      "anchors": [
        "example-automated-sitemap-based-testing"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 132
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#review-coverage-reports",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Review Coverage Reports",
      "heading_level": 2,
      "content_markdown": "## Review Coverage Reports\n\nOnce your tests have recorded to Cypress Cloud, you can analyze the coverage reports to identify gaps. Click on the runs in your project in [Cypress Cloud](https://on.cypress.io/cloud) to access the UI Coverage reports. This report provides a visual representation of your application's test coverage, highlighting tested and untested elements.\n\nIf you use an AI coding assistant, you can query UI Coverage data directly from your editor using [Cypress Cloud MCP](/llm/markdown/cloud/integrations/cloud-mcp.md). Ask your agent to pull the report, identify the riskiest views, and drill into specific untested elements — without opening a browser tab.\n\n### Overall Score\n\nThe first metric to review is the **overall coverage score**. This score is calculated by comparing the number of tested elements to the total number of [interactive elements](/llm/markdown/ui-coverage/core-concepts/interactivity.md) in your application. A higher score indicates better coverage, while a lower score indicates areas that need additional testing. The score will display on the runs page and within individual runs.\n\n### Views\n\nWithin a run's **UI Coverage** tab, you'll find a **Views** section. Views represent different pages or components of your application. Each view in the list displays the URL or component path, the number of snapshots, the number of untested and tested elements in that view, and the coverage score.\n\n#### View Drilldown\n\nClicking into a view shows a detailed breakdown of the tested and untested elements within that view. You can use this information to inspect the DOM snapshot of the element using your browser's developer tools and understand the context of any coverage gaps. The view includes:\n\n*   **Untested Elements**: A list of interactive elements that were not interacted with during the test run.\n*   **Tested Elements**: A list of interactive elements that were interacted with during the test run.\n*   **DOM Snapshot**: A full-page, inspectable DOM snapshot of the view as it appeared during the test run. Tested elements highlight as green, while untested elements highlight as red.\n*   **Snapshot Navigation**: Navigate between snapshots to see the state of the view at different points during the test run.\n*   **Snapshot Coverage Score**: The coverage score for the specific snapshot based on the number of tested elements.\n*   **Test Replay**: A link to the Test Replay for the specific snapshot.\n*   **URL** and **Viewport size**: Metadata for the view.\n\n### Untested links\n\nIn the **UI Coverage** tab, the **Untested links** section lists all the links not interacted with during the test run. This can help you identify pages of your application that are not being visited and tested. Use this to identify unvisited pages and prioritize testing.\n\n#### Referrer Drilldown\n\nClicking a referrer link redirects you to the referrer's view, where the untested link is highlighted in red.\n\n### Untested elements\n\nThe **Untested Elements** section in the **UI Coverage** tab lists all interactive elements not interacted with during the test run. This can help you identify specific elements that are not being tested across views. Use this information to prioritize testing for these elements.\n\n#### View Drilldown\n\nClicking into an untested element's view shows a detailed breakdown of the element, including the element's selector, the number of times the element was interacted with, and the views without interactions. You can use this information to inspect the DOM snapshot of the element using your browser's developer tools and understand the context of any coverage gaps.\n",
      "section": "ui-coverage",
      "anchors": [
        "review-coverage-reports"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 741
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#overall-score",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Overall Score",
      "heading_level": 3,
      "content_markdown": "### Overall Score\n\nThe first metric to review is the **overall coverage score**. This score is calculated by comparing the number of tested elements to the total number of [interactive elements](/llm/markdown/ui-coverage/core-concepts/interactivity.md) in your application. A higher score indicates better coverage, while a lower score indicates areas that need additional testing. The score will display on the runs page and within individual runs.\n",
      "section": "ui-coverage",
      "anchors": [
        "overall-score"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 83
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#views",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Views",
      "heading_level": 3,
      "content_markdown": "### Views\n\nWithin a run's **UI Coverage** tab, you'll find a **Views** section. Views represent different pages or components of your application. Each view in the list displays the URL or component path, the number of snapshots, the number of untested and tested elements in that view, and the coverage score.\n\n#### View Drilldown\n\nClicking into a view shows a detailed breakdown of the tested and untested elements within that view. You can use this information to inspect the DOM snapshot of the element using your browser's developer tools and understand the context of any coverage gaps. The view includes:\n\n*   **Untested Elements**: A list of interactive elements that were not interacted with during the test run.\n*   **Tested Elements**: A list of interactive elements that were interacted with during the test run.\n*   **DOM Snapshot**: A full-page, inspectable DOM snapshot of the view as it appeared during the test run. Tested elements highlight as green, while untested elements highlight as red.\n*   **Snapshot Navigation**: Navigate between snapshots to see the state of the view at different points during the test run.\n*   **Snapshot Coverage Score**: The coverage score for the specific snapshot based on the number of tested elements.\n*   **Test Replay**: A link to the Test Replay for the specific snapshot.\n*   **URL** and **Viewport size**: Metadata for the view.\n",
      "section": "ui-coverage",
      "anchors": [
        "views"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 296
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#view-drilldown",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "View Drilldown",
      "heading_level": 4,
      "content_markdown": "#### View Drilldown\n\nClicking into a view shows a detailed breakdown of the tested and untested elements within that view. You can use this information to inspect the DOM snapshot of the element using your browser's developer tools and understand the context of any coverage gaps. The view includes:\n\n*   **Untested Elements**: A list of interactive elements that were not interacted with during the test run.\n*   **Tested Elements**: A list of interactive elements that were interacted with during the test run.\n*   **DOM Snapshot**: A full-page, inspectable DOM snapshot of the view as it appeared during the test run. Tested elements highlight as green, while untested elements highlight as red.\n*   **Snapshot Navigation**: Navigate between snapshots to see the state of the view at different points during the test run.\n*   **Snapshot Coverage Score**: The coverage score for the specific snapshot based on the number of tested elements.\n*   **Test Replay**: A link to the Test Replay for the specific snapshot.\n*   **URL** and **Viewport size**: Metadata for the view.\n",
      "section": "ui-coverage",
      "anchors": [
        "view-drilldown"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 228
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#untested-links",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Untested links",
      "heading_level": 3,
      "content_markdown": "### Untested links\n\nIn the **UI Coverage** tab, the **Untested links** section lists all the links not interacted with during the test run. This can help you identify pages of your application that are not being visited and tested. Use this to identify unvisited pages and prioritize testing.\n\n#### Referrer Drilldown\n\nClicking a referrer link redirects you to the referrer's view, where the untested link is highlighted in red.\n",
      "section": "ui-coverage",
      "anchors": [
        "untested-links"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 92
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#untested-elements",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Untested elements",
      "heading_level": 3,
      "content_markdown": "### Untested elements\n\nThe **Untested Elements** section in the **UI Coverage** tab lists all interactive elements not interacted with during the test run. This can help you identify specific elements that are not being tested across views. Use this information to prioritize testing for these elements.\n\n#### View Drilldown\n\nClicking into an untested element's view shows a detailed breakdown of the element, including the element's selector, the number of times the element was interacted with, and the views without interactions. You can use this information to inspect the DOM snapshot of the element using your browser's developer tools and understand the context of any coverage gaps.\n",
      "section": "ui-coverage",
      "anchors": [
        "untested-elements"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 141
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#view-drilldown",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "View Drilldown",
      "heading_level": 4,
      "content_markdown": "#### View Drilldown\n\nClicking into an untested element's view shows a detailed breakdown of the element, including the element's selector, the number of times the element was interacted with, and the views without interactions. You can use this information to inspect the DOM snapshot of the element using your browser's developer tools and understand the context of any coverage gaps.\n",
      "section": "ui-coverage",
      "anchors": [
        "view-drilldown"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 80
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#configure-ui-coverage",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Configure UI Coverage",
      "heading_level": 2,
      "content_markdown": "## Configure UI Coverage\n\nWhile UI Coverage is designed to work seamlessly out of the box, there are instances where custom configuration may be necessary to address unique application structures, testing requirements, or edge cases. Refer to the [Configuration Guide](/llm/markdown/ui-coverage/configuration/overview.md) to learn how to customize UI Coverage to address these common needs:\n\n*   **Filtering**: Exclude specific elements or views from coverage reports.\n    *   [Element Filters](/llm/markdown/ui-coverage/configuration/elementfilters.md): Exclude specific elements from coverage reports.\n    *   [View Filters](/llm/markdown/ui-coverage/configuration/viewfilters.md): Exclude specific views from coverage reports.\n*   **Grouping**: Group similar elements together for easier analysis.\n    *   [Elements](/llm/markdown/ui-coverage/configuration/elements.md): Specify selectors to uniquely identify elements, even when they lack stable identifiers across snapshots.\n    *   [Element Grouping](/llm/markdown/ui-coverage/configuration/elementgroups.md): Group similar elements together for easier analysis.\n    *   [Views](/llm/markdown/ui-coverage/configuration/views.md): Group views together based on defined URL patterns.\n*   **Defining Attribute Patterns**: Define patterns for identifying and grouping elements by attributes.\n    *   [Attribute Filters](/llm/markdown/ui-coverage/configuration/attributefilters.md): Specify patterns for attributes and their values that should not be used for identifying and grouping elements.\n    *   [Significant Attributes](/llm/markdown/ui-coverage/configuration/significantattributes.md): Define selectors to prioritize above the default attributes Cypress uses for the purpose of identification and grouping.\n",
      "section": "ui-coverage",
      "anchors": [
        "configure-ui-coverage"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 237
    },
    {
      "id": "ui-coverage/guides/identify-coverage-gaps#next-steps",
      "doc_id": "ui-coverage/guides/identify-coverage-gaps",
      "heading": "Next Steps",
      "heading_level": 2,
      "content_markdown": "## Next Steps\n\nBy leveraging these tools and techniques, you can effectively identify test coverage gaps. Next, read our guide on [addressing coverage gaps](/llm/markdown/ui-coverage/guides/address-coverage-gaps.md) to ensure a robust and reliable application.\n",
      "section": "ui-coverage",
      "anchors": [
        "next-steps"
      ],
      "path": "/llm/json/chunked/ui-coverage/guides/identify-coverage-gaps.json",
      "token_estimate": 41
    }
  ]
}