Cypress Documentation Source

repository·main·Indexed 21 days ago

https://github.com/cypress-io/cypress-documentation

The official source files and build configuration for the Cypress documentation website. Built with Docusaurus 3 and TypeScript, the repository includes custom Remark plugins for generating tabbed code examples (TypeScript/JavaScript, E2E/Component Testing) and a pipeline for producing LLM-optimized markdown and JSON content.

Tokens
396.4K
Snippets
1.2K
Records
1.8K
Agent score
74%

What's inside cypress-io/cypress-documentation

  1. What is UI Coverage?

    main

    UI Coverage is a feature in Cypress Cloud that provides a visual map of which interactive elements (buttons, inputs, links, and controls) your Cypress tests exercise and which they miss.

    Unlike code coverage, which tracks which lines of source code were executed, UI Coverage measures whether the actual user-facing interactive surface of your application is being tested. It works by analyzing the DOM snapshots captured by Test Replay during your recorded runs.

    Key benefits include:

    • Visualizing untested surface: View a single coverage score and per-view scores to rank pages by risk.
    • Identifying exact gaps: Locate specific untested elements via inspectable DOM snapshots.
    • Discovering missing flows: Find untested links that lead to pages your suite never visits.
    • Automating gap closure: Use Test Generation or the Cypress Cloud MCP to create tests for missing coverage.
    • CI/CD Integration: Use the Results API to fail CI or block pull requests when coverage drops.
  2. Overview of Cypress products and solutions

    main

    Cypress is a quality platform designed for modern web applications, providing tools for end-to-end, component, and accessibility testing. The platform scales from local development to CI/CD environments through several distinct products:

    • Cypress App: A free, open-source, locally installed application used for writing and running tests.
    • Cypress Cloud: A paid service designed for CI integration. It provides test recording, analytics, flaky test management, and smart orchestration (parallelization) to make CI runs faster and more reliable.
    • UI Coverage: A premium solution that provides a visual overview of test coverage across all pages and components, identifying untested areas of the application.
    • Cypress Accessibility: A premium solution that performs accessibility checks during normal test runs to detect barriers for users with disabilities without requiring extra code changes or performance penalties.
  3. What is Cypress Accessibility?

    main

    Cypress Accessibility provides organized, visual, and actionable accessibility reports powered by Axe Core® by Deque Systems. It performs detailed accessibility checks against every step of every test recorded to Cypress Cloud, with zero impact on test execution speed or flakiness.

    Key features include:

    • Visual Triage: Debug violations using interactive DOM snapshots.
    • Regression Tracking: Filter for newly-introduced issues related to specific commits and monitor historical scores.
    • Automated Reporting: Automatically generates reports for every unique state (distinct DOM structures) reached during end-to-end or component testing.
    • CI Integration: Use the Results API to enforce accessibility standards and block pull requests that fail to meet your policies.
  4. Introduction to Cypress Cloud

    main
    Cypress Cloud is a companion service to the open-source Cypress app designed to manage test quality and orchestration. It records test runs to provide features like Test Replay, flake detection, parallelization, and analytics across your CI environment. It helps teams reduce CI costs, speed up feedback loops, and improve debugging efficiency by providing a centralized place to track quality trends and decide if a release is ready to ship.
  5. Key features of Cypress Cloud

    main

    Cypress Cloud provides orchestration and analytics for CI test results. Key features include:

    • Test Replay: Record and replay test executions for zero-configuration debugging.
    • Smart Orchestration: Parallelize test suites, use Spec Prioritization to rerun failed specs first, and enable Auto Cancellation on failures.
    • Flake Detection: Manage and diagnose unreliable (flaky) tests.
    • Branch Review: Compare test results (failures, flakiness, etc.) between source and base branches in pull requests.
    • Integrations: Connect with GitHub, GitLab, Bitbucket, Slack, Jira, and Microsoft Teams.
    • Test Analytics: Track trends and regressions over time. Use the Data Extract API to pull important metrics.
    • Cypress Cloud MCP: Connect AI coding assistants to your application's health and stability data.
  6. Cloud MCP Pricing, Limits, and Security

    main

    Pricing & Availability

    • Cost: Cloud MCP is free for all Cypress Cloud plans, including the Starter plan.
    • Availability: Generally available as of May 20th, 2026.
    • Requirements: No minimum Cypress App version is required.

    Usage Limits

    • Rate Limit: 100 tool requests per hour across all plans.
    • Data Retention: Data availability follows your existing Cypress Cloud test recording and retention policies.
    • Increases: Contact support@cypress.io to request higher limits.

    Security & Privacy

    • Privacy: Cypress cannot see your AI conversation, chat history, or context window. Cypress only receives the specific inputs required for a tool call (e.g., getRuns(projectId: 100, runNumber: 45, limit: 10)).
    • Data Usage: Cypress does not train LLMs on your data. Test results, stack traces, and replay links are used only to fulfill the specific request.
    • Access Control:
      • Read-only: Cloud MCP cannot modify test code or delete runs.
      • User-scoped: The agent can only access data that your specific Cypress Cloud user has permission to see.
      • Opt-in: The integration must be enabled in the Cypress Cloud Integrations page.
  7. Strategies for accessibility testing in Cypress

    main

    Accessibility testing in Cypress can be approached in two primary ways:

    1. Accessibility Scans (Automated): Using tools to automatically detect violations of rules like WCAG (e.g., color contrast, missing labels, or incorrect HTML structure).

      • In-test plugins: Community-driven plugins like cypress-axe that run within your test execution.
      • Cypress Accessibility: A commercial solution in Cypress Cloud that runs scans outside the test context as tests are recorded, avoiding test performance overhead.
    2. Explicit, Application-Specific Tests (Manual/Assertion-based): Writing specific Cypress assertions and using specialized locators to test functionality relevant to assistive technology (e.g., keyboard navigation or checking accessible names).

  8. Key features of Cypress Accessibility and UI Coverage

    main

    Cypress provides specialized tools for accessibility and coverage:

    Cypress Accessibility

    • Accessibility Checks: Add thousands of checks to existing tests with no setup or performance penalty.
    • Run-level reports: Detailed reports of accessibility issues found during runs.
    • Results API: Integrate accessibility results into CI.
    • Branch Review: Compare reports against a baseline to see only new violations.

    UI Coverage

    • Visualize Coverage: A visual overview of test coverage across pages and components.
    • Results API: Integrate coverage data into CI.
    • Branch Review: Compare runs to identify newly introduced elements or reductions in coverage.
  9. Visualize parallelization in Cypress Cloud

    main

    Cypress Cloud provides several views in the Specs tab to help you analyze parallelized runs:

    • Timeline View: Charts spec files relative to each other chronologically to show how they ran across machines.
    • Bar Chart View: Visualizes the duration of spec files relative to each other.
    • Machines View: Charts spec files by the specific machines that executed them, helping evaluate machine contribution.
  10. Key features of Cypress App

    main

    The Cypress App is the local development tool designed to shorten the testing loop. Key features include:

    • Time Travel: Hover over commands in the Command Log to see snapshots of the application at each step.
    • Debuggability: Use Developer Tools and readable error messages/stack traces to debug failures.
    • Automatic Waiting: Cypress automatically waits for commands and assertions to pass before moving on, eliminating the need for manual wait or sleep commands.
    • Spies, Stubs, and Clocks: Control and verify the behavior of functions, timers, and server responses.
    • Network Traffic Control: Stub and test network requests and edge cases without a live server.
    • Cypress Studio & Studio AI: Record user interactions to generate E2E tests and use AI to recommend assertions.
    • Cross Browser Testing: Run tests in Firefox, Chrome, Edge, and Electron locally or in CI.
  11. Explore Enterprise Reporting insights and tabs

    main

    Enterprise Reporting organizes insights into several specialized tabs to help govern your test program across all projects in an organization:

    • Overall Usage: Tracks test utilization, concentration across projects, and trends over time.
    • Test Results: Provides status rates (pass/fail) at three levels of granularity: runs, specs, and individual tests.
    • Test Setup: Monitors configuration metrics, such as the ratio of end-to-end tests to component tests, suite size changes, use of Cypress smart orchestration, and Cypress version distribution.
    • Test Execution: Analyzes environment details, including browser usage consistency, execution time changes, and average failure/error rates.
    • Flaky Tests: Tracks flaky test occurrences and rates. Using the flake rate (% of runs that are flaky) allows for direct comparison between projects regardless of run volume.
    • UI Coverage: Monitors trends in UI coverage scores to detect improvements or drift.
    • Cypress Accessibility: Tracks accessibility score trends, severity breakdowns, and rule-specific violations (e.g., weekly average violations per rule).
    • Raw Data: Provides examples of granular data that can be used for programmatic integration.
  12. What is Cloud AI and cy.prompt?

    main

    Cloud AI

    Cloud AI provides capabilities within Cypress Cloud (like Test Intent Summaries and Error Summaries) and within the Cypress App (via Studio AI and cy.prompt) when connected to Cloud.

    cy.prompt

    cy.prompt is a command used for AI-driven test execution and self-healing.

    • Execution Count: Every time cy.prompt runs (in open or run mode), it counts as one execution. If a test suite has 3 cy.prompt commands, one run of that suite consumes 3 executions.
    • AI Self-healing: cy.prompt can automatically fix a step if the target element has changed since the last run by using cached selectors or generating new ones via AI.
    • Usage Tracking: Monitor your consumption on the Billing & Usage page in Cypress Cloud.