Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk6 min

How to Use Argos CI for Storybook Visual Testing

Argos CI adds visual regression review to Storybook browser tests. Choose the Vitest or Test Runner route that fits your setup, capture the states that matter, and upload screenshots from CI.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Argos CI captures Storybook stories during browser tests in your CI pipeline, uploads the screenshots, and shows visual changes for review. For a current Storybook project already using Storybook’s Vitest integration, Argos identifies its Vitest plugin as the recommended route; projects on the Storybook Test Runner can use Argos’s Test Runner integration instead. Check compatibility against your installed versions before choosing commands, since the supported version combinations can change.

Choose the integration that matches your Storybook project

Argos visual regression testing treats each captured story as a visual checkpoint associated with a baseline. When a later CI run produces a different image, Argos presents the change for review rather than requiring you to compare screenshots manually. Argos’s current visual-diff documentation recommends the Storybook Vitest integration for projects using that path, while its documentation also covers the Storybook Test Runner and legacy workflows. See Argos’s Storybook visual-diff documentation and its changelog for the current integration guidance.

As an Amazon Associate I earn from qualifying purchases.

Project situation Route to investigate What to check
Your project uses Storybook’s Vitest integration Argos’s @argos-ci/storybook Vitest plugin path Confirm the plugin and your Storybook/Vitest versions are compatible, then follow the current Argos documentation.
Your project already uses the Storybook Test Runner, or an older setup that depends on it Argos’s Test Runner integration Confirm the documented package versions and runner configuration still match your project.

Do not select a path based on a copied version number alone. Argos’s Test Runner example below comes from its guide published October 29, 2024; use it as a concrete recipe for that workflow, not as a universal setup for every current Storybook installation. Read the Argos Test Runner guide.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set up the Storybook Test Runner route

This route builds and serves Storybook, runs the Test Runner against it, captures each visited story in a post-visit hook, and uploads the resulting screenshots to Argos. The published Argos guide installs the CLI, Storybook SDK, and Test Runner, then supplies an Argos token to the CI workflow as ARGOS_TOKEN. Adapt package versions and workflow syntax to the compatibility guidance for your project.

  1. Install the packages

    The guide’s package set is @argos-ci/cli, @argos-ci/storybook, and @storybook/test-runner. Add them using your package manager and verify the supported versions for your Storybook release.

  2. Capture each visited story

    In .storybook/test-runner.ts, configure the Test Runner’s postVisit hook to call argosScreenshot(page, context). This lets Argos associate the browser page with the story context as the runner visits stories. Use the exact import and hook shape in the linked Argos guide for your installed package versions rather than guessing at a current API.

  3. Build, serve, test, and upload in CI

    In GitHub Actions or your CI provider, build the static Storybook, serve that build while the Test Runner executes, then run the Argos CLI upload step. Make ARGOS_TOKEN available to the workflow through a secret or equivalent protected environment variable; do not commit the token in the repository.

    What’s actually slowing this PC down?

    Pick the symptom - the matching free tool is one click away.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
    Sale
    HTML and CSS: Design and Build Websites
    • HTML CSS Design and Build Web Sites
    • Comes with secure packaging
    • It can be a gift option
  4. Review the result

    After upload, open the Argos check or pull-request link to inspect changed regions against their baselines and review whether each difference is intentional. The Argos product page describes checks that link reviewers to diffs in pull requests: Argos CI.

Use the Vitest integration for projects on that path

For projects using Storybook’s Vitest integration, Argos documents the @argos-ci/storybook Vitest plugin as its recommended Storybook visual-testing path. Because the exact setup depends on current Storybook and Vitest versions, follow the live Argos integration documentation for its install instructions, configuration, and supported combinations. Avoid transplanting Test Runner hook code into a Vitest setup: they are separate test paths.

Capture more than the default render when needed

Cover themes, viewports, or locales with story modes

Argos documents modes that let a team capture a story across configurations such as themes, viewports, or locales. This can broaden visual coverage without creating a separate manually duplicated story for every configuration. Choose modes that represent real supported UI states; an unnecessarily large matrix increases the number of captures that reviewers must interpret.

Rank #3
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • 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

Capture a state after an interaction

If the defect-prone UI appears only after interaction, an initial-render screenshot is not enough. Argos’s Vitest integration supports taking a screenshot at a chosen point in a story’s play function. Put the capture after the interaction and any required state update so the image represents the state you intend to protect. Argos documents this capability in its Storybook visual-diff guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Separate screenshot diffs from live preview deployment

Argos can also deploy a built Storybook to a live pull-request preview URL. That is a separate workflow feature from capturing and comparing screenshots: use the diff for targeted visual regression review, and a preview build when reviewers need to browse the proposed Storybook interactively. See Argos Deploy documentation for the preview workflow.

Troubleshoot common setup failures

  • No screenshots appear after the run: Check that the browser test path actually invokes the Argos capture integration, that the upload step runs after tests, and that the CI job can reach the built Storybook.
  • Upload is rejected or missing project association: Verify that the CI environment provides the expected ARGOS_TOKEN and that the value is available to the job performing upload. Keep it in CI secrets rather than source control.
  • Runner cannot load Storybook: Confirm the static build completed and that the server is running at the URL the Test Runner uses before tests start. Ensure the serving process remains alive until the run completes.
  • Stories are skipped or fail before capture: Inspect the browser test output and Storybook build first. A capture hook cannot produce a useful baseline for a story that does not render or whose test fails before reaching the hook.
  • Installation instructions do not match your project: Recheck the current Argos docs against the installed Storybook, Vitest, and Test Runner versions. The Test Runner article is dated October 29, 2024, and package compatibility is version-dependent.
  • Images differ on every run: Identify changing content or nondeterministic state in the story, such as time-dependent text or remote data, and make the rendered state stable before treating diffs as meaningful. Argos’s documentation describes the capture workflow; it does not establish a universal fix for every source of nondeterminism.

Performance and review considerations

The browser-based capture work runs as part of your own CI tests, so total job time depends on your Storybook build, browser execution, number of stories and modes, and the CI environment. Keep the capture matrix focused on supported themes, viewports, locales, and interaction states that matter to the product. Baselines and diffs are most useful when changes are reviewed deliberately rather than auto-accepted without checking the affected UI.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For one-off webpage screenshots or screenshot capture outside Storybook’s regression workflow, ScreenshotNeo is a website screenshot API and MCP server for developers. It does not replace Argos’s story baselines, CI comparisons, or pull-request visual-diff review.

One GET request returns a PNG, JPEG, WebP, or PDF; for example, this cURL request saves a WebP screenshot of Stripe:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. It accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify page verdict and billing status in headers. An MCP server exposes screenshot and PDF tools to Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

Frequently Asked Questions

Does Argos replace Storybook’s browser tests?

No. The documented integrations capture screenshots as part of Storybook browser testing; they add visual comparison and review to that workflow.

Can Argos publish a browsable Storybook for a pull request?

Yes. Argos documents a separate deployment feature for a live Storybook preview URL; it is distinct from screenshot capture and diffing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.