Use Storybook stories as repeatable visual test cases: capture each story, compare its rendered pixels with an approved baseline, and review any differences before they reach your main branch. Storybook calls these visual tests. They reveal appearance changes, but do not replace tests for component behavior, accessibility, or end-to-end workflows.
What Storybook screenshot tests check
A screenshot test renders a story in a browser and compares the result with a previously accepted image baseline. It can reveal changes in layout, color, sizing, or other visible details. Storybook describes visual tests as comparisons of rendered pixels against known baselines: Storybook visual testing documentation.
As an Amazon Associate I earn from qualifying purchases.
The story is the test case: it captures a component in a particular state and configuration. A useful suite represents the states your team cares about, not just each component’s default appearance.
Recommended Free Tools
Build a representative set of stories
Before enabling visual tests, make sure the stories cover the meaningful visual surface of your library. Include variants and important content states, such as long labels, empty states, validation messages, or expanded controls when those are part of the component’s intended use.
#1 Best Overall
- Keep each story focused on one state or configuration so a difference is straightforward to diagnose.
- Use realistic content where text length, wrapping, or density affects appearance.
- Include high-impact variants and states rather than creating snapshots for every arbitrary combination.
- Keep stories stable: avoid time-dependent content or state that changes unpredictably between runs.
Storybook presents stories as reusable testing cases in its testing overview. Treating them as deliberate cases makes failures easier to review than taking screenshots of a loosely specified, changing page.
Choose a visual testing workflow for your Storybook version
For a managed visual-testing workflow, Storybook’s documented integration uses Chromatic. The setup command and compatibility below come from Storybook’s version 8 documentation: it requires Storybook 7.6 or higher and gives this command to install the addon:
npx storybook@latest add @chromatic-com/storybook
That versioned guide also describes connecting a Chromatic account and project, with setup configuring the project identifiers. See Storybook’s version 8 visual testing guide. Check the instructions for the Storybook version installed in your project before running the command; Storybook 9 documents an integrated testing-widget workflow, so setup details are not universal across versions. See Storybook’s version 9 visual testing guide.
Free tools Windows power users keep installed
One-click scans. No signup required.
The version 8 addon route is not evidence that the same command or setup applies unchanged to every later release. Confirm current compatibility and instructions in the documentation for your installed version.
Set baselines, run checks, and review changes
- Connect the project. Follow the setup path for your Storybook release and link the project to the managed visual-testing service if using the Chromatic integration.
- Run the first visual build. Its snapshots establish the initial baselines. Review this reference state carefully: later runs judge differences against it.
- Run visual checks during development. Use Storybook’s visual-testing panel or widget as documented for your version to see the results while iterating.
- Run checks in CI. Configure the visual check on pull or merge requests. Storybook recommends requiring the check in your Git provider so unreviewed UI changes cannot merge.
- Inspect every flagged difference. If the change is intended, approve it and update the baseline. If it is not, fix the component or story and run the check again.
In Storybook 9’s documented workflow, accepted baselines in the addon sync to the cloud so collaborators working on branches share them. The available controls and review details depend on the workflow and Storybook version, so use the matching guide: version 9 visual testing.
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
Pick the test that matches the failure you want to catch
| Test type | What it checks | When it helps |
|---|---|---|
| Visual tests | Rendered pixels compared with image baselines | Finding changes to appearance, such as layout, color, size, or contrast. |
| DOM or HTML snapshots | Markup output | Detecting structural changes. A markup difference is not the same as checking what users see and can be noisy for visual concerns. |
| Component or interaction tests | Component behavior and user interactions | Checking that controls and component logic behave as intended. |
| Accessibility tests | Accessibility-related issues | Checking accessibility alongside appearance; a screenshot alone cannot establish that a component is accessible. |
| End-to-end tests | Behavior across a workflow or running application stack | Testing cases that depend on the wider app. Storybook stories can also be imported into Playwright or Cypress end-to-end tests. |
Storybook distinguishes these testing purposes in its testing overview. A clean visual result only answers whether the rendered appearance changed; it does not establish that behavior or accessibility is correct.
When to use a custom screenshot assertion
A custom assertion can suit a team that needs to control its own browser and image-comparison plumbing, but it also means maintaining that setup. Storybook’s test-runner documentation demonstrates a postVisit hook that waits for page readiness, captures a Playwright page screenshot, and compares it with jest-image-snapshot: Storybook test-runner documentation.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchThat example is an implementation option, not a recommendation for every project. Before adopting it, account for browser execution, snapshot maintenance, and compatibility as Storybook and project dependencies change.
Check the status of the legacy test runner
For Vite-based Storybook projects, Storybook’s current testing guide points to the Vitest addon. Storybook’s integration listing warns that official support for @storybook/test-runner has ended and suggests that Vite users consider the Vitest integration. The legacy runner is based on Jest and Playwright; consult Storybook’s compatibility table before relying on it for a particular Storybook version.
Decide between managed visual testing and custom plumbing
Compare approaches against the project and the way the team reviews changes, rather than choosing on the word “screenshot” alone:
Rank #3
- Browser execution: decide whether a hosted cloud workflow or a self-managed browser fits your environment and maintenance capacity.
- Review and CI: consider whether built-in baseline review and pull-request checks meet the team’s needs, or whether custom screenshot assertions are justified.
- Compatibility: verify the Storybook version and build setup against the selected integration’s current support information.
- Coverage: choose visual tests for appearance, and add behavior, accessibility, or end-to-end tests where those are the risks.
- Approval workflow: ensure someone reviews intentional changes before baselines are updated, so an unintended regression is not simply accepted as the new reference.
Or skip the browser setup
If your goal is to capture a page rather than build a Storybook baseline-review workflow, ScreenshotNeo offers a website screenshot API and MCP server for developers. One GET request can return a PNG, JPEG, WebP, or PDF. This does not replace Storybook’s story-based visual testing; it is an alternative for capturing web pages without setting up a browser yourself.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesExample cURL request, with the API options documented at ScreenshotNeo docs:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots per month with no card, and paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot visual test failures
The addon command or setup does not match the project
Cause: The instructions may target a different Storybook release or build setup. The version 8 guide states a minimum of Storybook 7.6, while version 9 documents an integrated widget workflow.
Fix: Check the installed Storybook version and follow its versioned setup guide. For a legacy test-runner setup, verify the compatibility table rather than assuming it supports the project’s version.
A visual difference appears after a change
Cause: The rendered output differs from the accepted baseline. The change could be intentional or a regression.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Fix: Inspect the affected story and pixel difference. Approve and update the baseline only when the UI change is intended; otherwise fix the component or story and rerun the check.
The initial baseline does not represent the intended UI
Cause: The first visual build becomes the reference for later comparisons, so an unreviewed initial state can make future results misleading.
Fix: Review the first snapshots before treating them as approved baselines. Correct the story or rendered UI as needed, then establish the reference the team actually intends to preserve.
A screenshot passes but a component is still broken
Cause: Visual tests check appearance, not all behavior, accessibility, or workflow requirements.
Fix: Add the corresponding component or interaction, accessibility, or end-to-end test for the failure you need to catch; use the Storybook testing overview to distinguish these test purposes.
Best Value
A check is not preventing an unreviewed change from merging
Cause: Running a check in CI does not by itself mean the Git provider requires it before merge.
Fix: Configure the visual check as a required status check in the repository’s pull- or merge-request rules, as Storybook recommends in its version 8 visual testing guide.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Frequently Asked Questions
Do Storybook screenshot tests replace end-to-end tests?
No. They compare the appearance of rendered stories; Storybook stories can also be used in Playwright or Cypress end-to-end tests for workflows that need them.
Can screenshot tests prove a component is accessible?
No. Screenshots show rendered appearance, not whether accessibility requirements are met. Run accessibility checks separately.
Which Storybook version does the documented Chromatic addon setup support?
Storybook’s version 8 visual-testing page says the @chromatic-com/storybook addon requires Storybook 7.6 or higher. Check the documentation for your installed version because setup guidance differs by release.
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.
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 →




