Add visual regression testing by mounting a component in its Cypress component test, making its state deterministic, asserting that the intended UI is ready, and then calling a visual-testing integration to capture and compare it with an approved baseline. Cypress can capture screenshots, but comparison and baseline review require a plugin or service.
What visual testing adds to a component test
A component can pass its functional assertions while its font, spacing, colors, icon, or other styling has regressed. Visual testing adds a separate check: capture a rendered page or element, compare the image with an approved baseline, and review any difference above the configured threshold. Cypress states, “Cypress does not perform image comparison itself.” Cypress’s visual testing guide explains the distinction.
A failure screenshot is useful for diagnosing a failed test, but it is not by itself a visual regression assertion. For component tests, the advantage is focus: mount a single component in a chosen state, which narrows the likely source of a visual difference. This does not replace end-to-end coverage of how the component works with the rest of the application. Cypress component testing documentation
The implementation pattern
- Choose a comparison integration. Cypress supplies screenshot capture through
cy.screenshot(), not image comparison. Select a compatible visual plugin or hosted service for baselines, diffs, and review. - Mount the component in a meaningful state. Use the component test that owns that UI state, with fixed props and fixture data. Useful checkpoints include an error, selected, expanded, or completed state.
- Make inputs deterministic. Stub changing API data, dates, and other sources of variation. Fix the viewport and render environment where possible.
- Assert readiness. Use an ordinary Cypress assertion to confirm the intended content or state is visible before capturing. A snapshot taken during loading or animation can record an intermediate frame.
- Call the integration’s capture-and-compare command. Follow that provider’s current setup and command instructions; names and configuration are not universal across integrations.
- Review the result. If the change is unintended, fix the UI. If it is intentional, approve the new baseline through the chosen tool’s workflow.
A skeleton example shows where the capture belongs, but visualTool.snapshot() is deliberately illustrative, not a Cypress command. Replace it with the command documented by your selected integration:
Recommended Free Tools
#1 Best Overall
- DUAL-SIDED DESIGN FOR COMPREHENSIVE TESTING : Measure visual acuity at two standard distances with our all-in-one vision screener. The Snellen chart accurately tests vision at 6 feet, while the Rosenbaum chart is designed for near testing at 14 inches. This versatility makes it perfect for both distance and close-up vision screening in various environments
- ULTRA-PORTABLE & DURABLE POCKET-SIZE DESIGN : Experience ultimate convenience with our compact 6.5" x 3.5" eye exam chart. Its handheld size easily fits in any shirt pocket, medical bag, or glove compartment. Crafted from high-quality, washable plastic, it's built to resist wear and tear, ensuring a non-reflective surface for accurate readings for years to come
- INCLUDES RED & GREEN COLOR VISION TEST : Go beyond standard acuity testing. This pocket vision screener features dedicated red and green color bars on the Snellen chart side. This allows for a simple yet effective color vision test, providing a more complete preliminary eye assessment in a single, portable tool
- BUILT-IN PUPIL GAUGE & PRACTICAL APPLICATIONS : This isn't just a standard eye chart; it's a multi-functional diagnostic tool. The integrated pupil gauge (pupilometer) on the Rosenbaum side enables quick and easy pupil size measurement, a crucial feature for medical professionals, students, and first responders
- IDEAL FOR PROFESSIONALS & HOME USE : A vital tool for a wide range of users. Optometrists, school nurses, and medical students will find it indispensable for quick screenings. Its simplicity also makes it perfect for parents to monitor children's vision at home, or for offices to conduct basic employee vision tests
it('renders the selected state', () => {
cy.mount(<PlanCard plan={plan} selected />);
cy.get('[data-testid="plan-card"]')
.should('be.visible')
.and('have.attr', 'aria-selected', 'true');
// Replace with your integration's documented snapshot command.
visualTool.snapshot('plan-card-selected');
});
Use cy.screenshot() when you need an image for debugging, not as a substitute for the comparison command. Cypress’s screenshot command documentation describes its capture behavior.
Choose a local plugin or hosted service
Cypress’s visual-testing guide, last updated September 20, 2026, groups options into self-managed plugins and hosted services. Local plugins generally keep baselines in your infrastructure and compare images in your environment; your team manages rendering consistency, updates, and diff review. Hosted services commonly manage baseline storage and approvals, and may provide browser or viewport rendering and pull-request review. Those conveniences trade off against subscription cost and service-managed infrastructure.
Rank #2
- Eye Chart
- Near Vision Reading Test Plastic Chart
- The card should be illuminated with lighting typical of that used for comfortable reading
- Then try reading the next smaller block of text. (Remember: no squinting!)Go to the smallest block of text you feel you can see without squinting, and read that passage aloud
- Continue reading successively smaller blocks of print until you reach a size that is not legible. Record the “J” value of the smallest block of text you can read (example: “J1”).
| Option | What Cypress’s guide describes |
|---|---|
| Applitools Eyes | AI-assisted Visual AI; component and end-to-end support. |
| Argos | Screenshots with CI and pull-request review. |
| Chromatic | Captures a UI archive during Cypress tests, then renders and diffs it in Chromatic’s cloud. |
| Happo | Full-page and component snapshots rendered across browsers and sizes. |
| LambdaTest SmartUI | Cypress SDK captures compared across browsers and resolutions. |
| Percy from BrowserStack | DOM snapshots rendered across browsers and responsive widths, with review and approval. |
| Sauce Labs Visual | Official plugin, automatic baselines, region ignoring, and DOM capture. |
| SmartBear VisualTest | Full-page, element, and multi-device captures. |
| Wopee.io | Visual validation with platform-managed baselines. |
| Cypress Image Diff | Listed by Cypress as an actively maintained self-managed plugin. |
| Cypress Image Snapshot | Listed by Cypress as an actively maintained self-managed plugin. |
| Cypress Visual Regression | Listed by Cypress as an actively maintained self-managed plugin. |
| Visual Regression Diff | Listed by Cypress as an actively maintained self-managed plugin. |
| Pixeleye | Described by Cypress as a self-hostable visual review platform with a Cypress integration. |
These descriptions reflect Cypress documentation, not a hands-on comparison. Before adopting a tool, verify its current setup, supported Cypress version, price, and terms. The separate Cypress plugin catalog can change more frequently than the guide.
How to decide
- Infrastructure: decide whether baselines and comparison must stay in your environment or may be provider-managed.
- Comparison approach: compare local pixel-based review with cloud rendering or AI-assisted comparison where offered.
- Review workflow: check how baselines are approved and whether diffs fit your CI and pull-request process.
- Coverage: verify the browsers, viewport widths, and component-test support your project needs.
- Total effort: weigh subscription cost against the time your team will spend maintaining comparison infrastructure and reviewing changes.
There is no universal best choice: budget, security requirements, framework, and cross-browser needs determine the fit.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Rank #3
Make snapshots stable and useful
Wait for the intended state
Assert that the expected UI has appeared before capturing. Disable or finish transitions and animations if they make timing inconsistent. Cypress notes that action-command animation settings do not prevent a screenshot from catching an animation elsewhere on the page.
Control data, time, and environment
- Use fixtures and
cy.intercept()to serve stable API responses. - Use
cy.clock()when dates, timers, or countdowns affect the rendered result. - Use the same browser and operating-system environment for baseline generation and comparison; pin browser versions where possible.
- Set a fixed viewport. Operating system, browser, display scaling, and fonts can change pixels even when application code has not changed. A hosted service may standardize its rendering environment.
Capture the visual contract, not every test
Choose meaningful shared components and states rather than snapshotting every test. Prefer an element-level capture when the component itself owns the visual contract; capture a full page when page layout is what you need to protect. Mask only small, uncontrollable regions such as third-party widgets rather than widening the tolerance for the whole image.
Rank #4
Pair image comparison with accessibility checks
A matching image cannot establish that text meets a defined color-contrast standard. Cypress presents accessibility testing as a companion for criteria that baseline-image equality cannot assess. Cypress accessibility testing guide
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting visual component tests
- The test passes but no regression is detected: confirm that the integration’s comparison command runs;
cy.screenshot()alone only captures an image. - The baseline contains a loading state: assert the expected content or state before capture, and stub network responses that otherwise arrive unpredictably.
- Images differ across runs without code changes: check browser and OS consistency, viewport, device scaling, fonts, time-dependent content, animations, and third-party widgets.
- A change produces a large diff: compare the baseline, current capture, and highlighted difference. Check for a changed viewport or rendering environment before treating the result as a UI defect.
- An intentional UI change keeps failing: review and approve a replacement baseline using the selected tool’s documented process; do not simply increase tolerance for the entire image.
- The provider command or setup does not work: check that the integration supports your Cypress version and component-testing setup, then use its current official installation instructions. Commands are provider-specific.
Or skip the browser setup
For a screenshot API rather than a Cypress baseline-comparison integration, ScreenshotNeo can capture a URL with one GET request. It does not replace the Cypress component-test workflow above: use a comparison integration when you need component-state baselines and diffs. ScreenshotNeo accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. It also offers an MCP server with screenshot, page-info, and PDF tools for AI agents. Plans include 1,000 shots per month free with no card, and paid plans start at $5 for 3,000 shots.
Example cURL request; see the ScreenshotNeo API documentation for parameters and response details:
Best Value
- Front: Proportional spacing
- Back: MassVAT format
- Patti Pics Symbols
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://example.com
-o shot.webp
Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




