To run visual testing with Storybook, install the official @chromatic-com/storybook addon, connect a Chromatic project, create a baseline from your stories, then review screenshot differences after UI changes. Add the check to CI so visual changes are surfaced before a pull request or merge is approved.
What Storybook visual testing checks
A Storybook story is a reproducible example of a component or UI state, and visual testing compares its rendered appearance with an accepted screenshot baseline. A difference is a signal to review—not proof by itself that the change is a bug. Storybook documents this route through Chromatic, its cloud visual testing service, using the official addon. Storybook’s visual testing documentation describes the workflow.
As an Amazon Associate I earn from qualifying purchases.
- Visual test: detects changes in rendered appearance by comparing snapshots.
- Render test: checks that a story renders without an error.
- Interaction test: uses a story’s
playfunction to simulate actions and assert behavior. It answers whether the UI behaves as expected, not whether its pixels match a baseline. See Storybook’s interaction testing guide. - Accessibility and markup snapshot tests: separate test types; neither should be described as visual regression testing.
Use visual checks for appearance changes and interaction tests for behaviors such as opening a menu, submitting a form, or displaying an error state. They complement one another.
Set up visual testing with Chromatic
- Install the official addon. From the project directory, run
npx storybook@latest add @chromatic-com/storybook. The Storybook guide identifies this as the official addon maintained by the Storybook maintainers. See the setup instructions. - Start Storybook and connect the project. Open Storybook and find the Visual Tests panel. If you are using the Vitest addon, look for the Visual Tests section in the testing widget. Sign in to Chromatic, then select an existing project or create one.
- Run the first visual test build. This initial run creates baseline snapshots for the project’s stories. Those accepted snapshots are the reference for subsequent runs.
- Run checks after UI changes. Use the Run button in the expanded testing widget or the Visual Tests addon panel. The stories are sent to Chromatic’s cloud service for snapshot comparison and visual-change detection.
- Review each reported difference. Open a highlighted story and inspect the changed pixels in context. If the new appearance is intentional, accept it as the new baseline. If it is unexpected, correct the story or component and run the checks again.
- Make the check part of CI. Configure authentication using the Chromatic project token, then run visual tests in your CI workflow. Use the pull-request or merge-request check to surface errors and changes awaiting review before merge. Storybook recommends checking during development as well as in CI.
Decide whether a visual change is a regression
Do not accept every diff automatically. Compare the changed image with the intended design and the story’s purpose. A changed label, spacing, color, or component state might be an intentional update; it might also expose a broken style or unexpected state. The right response depends on the product change, not simply on the existence of a diff.
#1 Best Overall
- Intentional change: verify the new appearance is correct, then accept the updated baseline.
- Unexpected change: fix the component or story, then rerun the visual test.
- Unclear change: inspect the story and its relevant state before accepting or rejecting it. A screenshot comparison identifies what changed; it does not decide whether the change is correct.
Run checks locally and in CI
Local runs help catch visual changes while developing. CI runs provide a pre-merge check so changes can be reviewed in the pull or merge request. Use both where they fit your team’s workflow: local checks shorten the feedback loop, while CI ensures the proposed change is checked before it is merged.
Keep the project token in CI authentication configuration rather than committing credentials to source control. The documented workflow uses that token to authenticate the visual test build and surfaces changes or errors through the code-hosting check.
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
Choose the right Storybook test runner
Do not copy older @storybook/test-runner setup instructions into a new project without checking compatibility and current support. The official addon listing says official support for Storybook Test Runner has ended and points Vite-based projects toward Storybook’s Vitest integration. It lists different compatible test-runner package versions for Storybook 6, 7, 8, 9, and 10, so check your installed Storybook version against the current listing before adding packages: the Storybook Test Runner addon listing.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →For story interaction tests, Storybook’s current guide describes running them with the Vitest addon through the Storybook UI, editor, CLI, or CI. Visual regression coverage described here uses the Chromatic addon; interaction assertions remain a separate concern.
Rank #3
Or skip the browser setup:
ScreenshotNeo is a website screenshot API, not a replacement for Storybook’s story-based visual regression workflow. For a one-off page capture, one GET request returns an image or PDF. The request below saves a WebP screenshot of Storybook’s documentation page; replace the URL with the page you need to capture.
Quick Recap
Best Value
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
ScreenshotNeo API documentation
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://storybook.js.org/docs -o shot.webp
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, failed loads, and cache hits are not billed. Its MCP server lets AI agents using Claude, Cursor, or another MCP client take screenshots. The Free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 screenshots. Sign up for 1,000 free screenshots a month, with no card required.
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.




