Skip to content

Commit fa8f60e

Browse files
Cloud MCP UI Coverage Tools (#6436)
1 parent 29b099a commit fa8f60e

5 files changed

Lines changed: 29 additions & 12 deletions

File tree

docs/cloud/features/cypress-ai-features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Error Summaries are available on all Cypress Cloud plans at no additional cost.
158158

159159
Cloud MCP is a remote server that gives AI assistants a direct window into your application’s health and stability. By connecting your AI coding assistant or AI agent directly to your CI results, it transforms Cypress from a testing tool into a real-time engineering data source—removing the manual overhead that makes testing a bottleneck.
160160

161-
Instead of spending time investigating runs, your assistant uses the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) to independently monitor and analyze recorded run data, including errors, stack traces and test replay links. This makes it easier to reach for Cypress as your tool of choice.
161+
Instead of spending time investigating runs, your assistant uses the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) to independently monitor and analyze recorded run data, including errors, stack traces, test replay links, accessibility violations, and UI Coverage gaps. This makes it easier to reach for Cypress as your tool of choice.
162162

163163
Read the [Cloud MCP documentation →](/cloud/integrations/cloud-mcp)
164164

docs/cloud/integrations/cloud-mcp.mdx

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -259,16 +259,19 @@ Each time the Cloud MCP connection is established, any new tools become immediat
259259

260260
Some tools are relevant for all Cypress Cloud plans (including free), but some others are for **plan-specific data** like flaky test reporting, or **product-specific data** like Cypress Accessibility violation details. These are only available if your organization has subscriptions for the plans and products that would provide the underlying data.
261261

262-
| Tool | Capability | Best Use Case |
263-
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
264-
| `cypress_get_projects` | Lists all projects in your Org. | Helping the agent find the correct `projectId` for subsequent queries. |
265-
| `cypress_get_runs` | Returns run summaries for a project, run URL, or git branch. Summaries include project name, run number, status, run URL, tags, and test status counts. | "Check the status of the last CI run on main" |
266-
| `cypress_get_failed_test_details` | Retrieves attempt details: test name, spec, attempt error and stack trace, and a Test Replay link for quick debugging. Does not return test artifacts. | "Analyze why the checkout test failed in the latest run." |
267-
| `cypress_get_flaky_tests` | Identifies the flaky tests in a run. | "Are these failures regressions or known flakiness?" |
268-
| `cypress_get_accessibility_report` | Returns a high-level accessibility report for a run: violation counts by severity, failing rules with element counts, and the top 5 views sorted by failure count. | "Summarize accessibility violations for the latest run on this branch." |
269-
| `cypress_get_accessibility_views` | Returns paginated views from an accessibility report, sorted by number of failing rules. Use to browse all views beyond the top 5 in the report summary. | "Which pages have the most accessibility failures in this run?" |
270-
| `cypress_get_accessibility_rule_failures` | Returns paginated failing DOM elements for a specific accessibility rule, with CSS selector, view, and failure message. Optionally scope to a specific view. | "Show me all color-contrast failures on the checkout page." |
271-
| `cypress_feedback` | Shares feedback with Cypress directly from your agentic environment. | "Report a bug or request a new MCP feature." |
262+
| Tool | Capability | Best Use Case |
263+
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
264+
| `cypress_get_projects` | Lists all projects in your Org. | Helping the agent find the correct `projectId` for subsequent queries. |
265+
| `cypress_get_runs` | Returns run summaries for a project, run URL, or git branch. Summaries include project name, run number, status, run URL, tags, and test status counts. | "Check the status of the last CI run on main" |
266+
| `cypress_get_failed_test_details` | Retrieves attempt details: test name, spec, attempt error and stack trace, and a Test Replay link for quick debugging. Does not return test artifacts. | "Analyze why the checkout test failed in the latest run." |
267+
| `cypress_get_flaky_tests` | Identifies the flaky tests in a run. | "Are these failures regressions or known flakiness?" |
268+
| `cypress_get_accessibility_report` | Returns a high-level accessibility report for a run: violation counts by severity, failing rules with element counts, and the top 5 views sorted by failure count. | "Summarize accessibility violations for the latest run on this branch." |
269+
| `cypress_get_accessibility_views` | Returns paginated views from an accessibility report, sorted by number of failing rules. Use to browse all views beyond the top 5 in the report summary. | "Which pages have the most accessibility failures in this run?" |
270+
| `cypress_get_accessibility_rule_failures` | Returns paginated failing DOM elements for a specific accessibility rule, with CSS selector, view, and failure message. Optionally scope to a specific view. | "Show me all color-contrast failures on the checkout page." |
271+
| `cypress_get_ui_coverage_report` | Returns a high-level UI Coverage report for a run: overall coverage score, tested and untested element and link counts, and the top 5 riskiest views sorted by most untested interactive elements. | "Summarize UI Coverage for the latest run on this branch." |
272+
| `cypress_get_ui_coverage_views` | Returns paginated views from a UI Coverage report, sorted by most untested elements and links. Use to browse all views beyond the top 5 in the report summary. | "Which pages have the most untested elements in this run?" |
273+
| `cypress_get_ui_coverage_elements` | Returns paginated interactive elements for a run. Filter by tested or untested, and optionally scope to a specific view by name. | "Show me the untested elements on the checkout page in this run." |
274+
| `cypress_feedback` | Shares feedback with Cypress directly from your agentic environment. | "Report a bug or request a new MCP feature." |
272275

273276
## Writing effective prompts
274277

@@ -300,7 +303,11 @@ To get the most out of Cloud MCP, follow these three principles:
300303

301304
> "Pull the Cypress Cloud Accessibility report for the latest run on this branch. List any critical or serious violations grouped by rule, and tell me which views are most impacted."
302305
303-
For more a deeper exploration of working with Cloud MCP's accessibility tools, read our guide [Cypress Accessibility - Work with AI agents](/accessibility/work-with-ai-agents).
306+
For a deeper exploration of working with Cloud MCP's accessibility tools, read our guide [Cypress Accessibility - Work with AI agents](/accessibility/work-with-ai-agents).
307+
308+
### The UI Coverage Triage
309+
310+
> "Using Cypress Cloud, pull the UI Coverage report for the latest run on this branch. Tell me the overall coverage score, list the views with the most untested elements, and show me the specific untested elements on the riskiest view."
304311
305312
## FAQs
306313

@@ -355,3 +362,4 @@ Alternatively, use [this feedback form](https://share.hsforms.com/2NWNpyi5KSZmG4
355362
- [Recording Cloud Runs](/cloud/features/recorded-runs)
356363
- [Cypress AI](/cloud/features/cypress-ai-features)
357364
- [cy.prompt()](/api/commands/prompt)
365+
- [Cypress Accessibility - Work with AI agents](/accessibility/work-with-ai-agents)

docs/ui-coverage/get-started/introduction.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,6 @@ UI Coverage provides an interactive, visual map of test coverage for your applic
157157
- **Flexible configuration**: Customize and fine-tune UI Coverage to suit specific needs and scenarios like ignoring views or elements or grouping similar elements together.
158158
- **Configurable CI Integration**: The [Results API](/ui-coverage/results-api) allows you to programmatically control your CI pipeline's behavior based on UI Coverage scores.
159159
- **Run-specific configuration**: Use [Profiles](/ui-coverage/configuration/profiles) to apply different configuration settings based on run tags, enabling team-specific reporting and optimized settings for different run types.
160+
- **AI agent integration**: Use [Cypress Cloud MCP](/cloud/integrations/cloud-mcp) to query coverage scores, identify untested views, and generate tests directly from your AI coding assistant.
160161

161162
Read more about how it works in the [Core Concepts](/ui-coverage/core-concepts/interactivity) section.

docs/ui-coverage/guides/address-coverage-gaps.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ The generated code will use your existing patterns for navigating and interactin
4545

4646
This test can be copied directly into your spec file at the suggested location, and from there you can continue writing the test locally.
4747

48+
:::tip
49+
If you use an AI coding assistant, [Cypress Cloud MCP](/cloud/integrations/cloud-mcp) lets your agent pull UI Coverage data directly into your editor. You can ask it to identify the untested elements on a specific view and write targeted tests for them — combining Cloud data with your local code in a single workflow.
50+
:::
51+
4852
### Write tests for specific elements
4953

5054
Focus on creating tests that interact with the specific untested elements or pages identified in the coverage reports. For example:

docs/ui-coverage/guides/identify-coverage-gaps.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ describe('UI Coverage Scan', () => {
3838

3939
Once 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.
4040

41+
:::tip
42+
If you use an AI coding assistant, you can query UI Coverage data directly from your editor using [Cypress Cloud MCP](/cloud/integrations/cloud-mcp). Ask your agent to pull the report, identify the riskiest views, and drill into specific untested elements — without opening a browser tab.
43+
:::
44+
4145
### Overall Score
4246

4347
The 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](/ui-coverage/core-concepts/interactivity) 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.

0 commit comments

Comments
 (0)