Cypress

Visual testing for Cypress

Argos adds visual regression testing to Cypress. Register the Argos task, call cy.argosScreenshot() in your tests, and every pull request gets its visual changes diffed against the baseline from your Git history and reviewed on GitHub. Open source, and free for personal projects.

Setup

Set up Argos with Cypress

5 steps, then every pull request gets a visual check. The quickstart covers every option.

Step 1

Install the SDK

The Cypress SDK adds the cy.argosScreenshot() command and a task that uploads the screenshots.

Terminal
npm i --save-dev @argos-ci/cypress
Step 2

Add the command

Import the support file to register cy.argosScreenshot(). With TypeScript, also add @argos-ci/cypress/support to the types of your tsconfig.json.

cypress/support/e2e.js
import "@argos-ci/cypress/support";
Step 3

Register the Argos task

The task uploads the screenshots once the run is over. Register it in component too if you visual-test components.

cypress.config.js
const { defineConfig } = require("cypress");
const { registerArgosTask } = require("@argos-ci/cypress/task");

module.exports = defineConfig({
  e2e: {
    async setupNodeEvents(on, config) {
      registerArgosTask(on, config, {
        // Upload to Argos on CI only.
        uploadToArgos: !!process.env.CI,
      });
    },
  },
});
Step 4

Capture screenshots

cy.argosScreenshot() waits for fonts, images and aria-busy to settle and hides carets and scrollbars before it captures.

cypress/e2e/homepage.cy.js
it("homepage", () => {
  cy.visit("http://localhost:3000/");
  cy.argosScreenshot("homepage");
});
Step 5

Run it in CI

Set ARGOS_TOKEN to your project token, or use GitHub Actions OIDC and skip the secret.

.github/workflows/argos.yml
- uses: cypress-io/github-action@v6
  with:
    start: npm start # serves your app
  env:
    ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
Compared

What Argos adds over image snapshot plugins

Cypress has no visual assertion of its own. Teams usually start with a plugin such as cypress-image-snapshot, which compares against images in the repository.

TopicImage snapshot pluginsArgos
BaselinesImage files committed to the repositoryPicked from your Git history, nothing committed
Updating a baselineRe-run in update mode, then commit the imagesApprove the change in the review UI
Stable capturesUp to you: waits, cy.clock(), hiding elementsBuilt in: waits for fonts, images and aria-busy, hides carets and scrollbars
Several viewportsOne cy.viewport() and one capture per sizeviewports captures every size in one call
ReviewDiff images in the run's artifactsA diff viewer on every pull request, with comments and a GitHub check
CostFreeFree for personal projects, Pro at $100/month

Sources: Cypress visual testing guide, checked October 2026.

Why Cypress teams use Argos

Screenshots that don't flake

Before each capture, the SDK waits for fonts, images and aria-busy to settle, hides carets and scrollbars and pins sticky elements, so the same page gives the same pixels on every run.

The verdict lands on the pull request

Argos posts a GitHub check you can make required. Reviewers open the diffs from it, approve or request changes, and the check follows their verdict.

Several viewports per call

cy.argosScreenshot(name, { viewports }) captures each size, so responsive layouts take one line.

Learn more

A threshold you set

threshold runs from 0 to 1 (default 0.5): the higher it is, the less sensitive the comparison.

Learn more

Mask what changes on every run

data-visual-test="blackout" masks dynamic content, transparent hides it and keeps its space.

Learn more

Cypress visual testing FAQ

How do I add visual testing to Cypress?

Install @argos-ci/cypress, import @argos-ci/cypress/support in your support file, register the Argos task in cypress.config.js, and call cy.argosScreenshot(name) in your tests. Run Cypress in CI with ARGOS_TOKEN set and Argos posts the visual changes on the pull request. See the Cypress quickstart.

Which Cypress versions are supported?

Cypress 12 to 15.

Does it work with component testing?

Yes. Register the Argos task in the component section of cypress.config.js as well, and call cy.argosScreenshot() in your component tests.

Do I need a plugin like cypress-image-snapshot?

No. cy.argosScreenshot() replaces it: Argos stores the baselines and compares the screenshots, so nothing is committed to your repository and changes are reviewed on the pull request.

How much does it cost?

Argos is free for personal projects up to 5,000 screenshots a month. Pro is $100 a month with 35,000 screenshots included, then $0.004 per screenshot.

Keep reading

Cypress visual regression testing guide

Plugins, services and the setup that holds up in CI.

Learn more

Argos vs Percy

The other service Cypress teams often compare.

Learn more

How to fix flaky visual tests

Every root cause of a flaky screenshot, and its fix.

Learn more

Supercharge your product quality

See every change your team and your agents make. Review with confidence, and merge faster.