WindowsmacOSLinux

Where Does Cypress Save Screenshots and Videos?

Cypress writes screenshots to cypress/screenshots and videos to cypress/videos inside your project, wiping both each run.

Last updated

Cypress puts failure screenshots in cypress/screenshots and per-spec recordings in cypress/videos, both relative to your project root. Screenshots nest further by spec path and test name, with (failed) appended on failure captures.

The gotcha that bites everyone once: every cypress run wipes both folders first. Anything you want to keep must be copied out or uploaded before the next run. Set trashAssetsBeforeRuns to false to stop the clearing, or redirect the folders with screenshotsFolder and videosFolder in cypress.config.

Where Cypress stores this, by platform

Windows
<project>\cypress\screenshots and <project>\cypress\videos

Screenshots nest as {screenshotsFolder}/{spec path}/{test name}.png. Videos record one file per spec during cypress run only, never during cypress open. Both folders are emptied before each run unless trashAssetsBeforeRuns is false.

macOS
<project>/cypress/screenshots and <project>/cypress/videos

Same layout as Windows. Override with screenshotsFolder and videosFolder in cypress.config.js. Disable failure screenshots with screenshotOnRunFailure false, or video entirely with video false.

Linux
<project>/cypress/screenshots and <project>/cypress/videos

Same layout, and the same pre-run wipe applies in CI. Archive the folders as pipeline artifacts before the next job starts, or point them at a mounted volume outside the workspace.

Frequently asked questions

My Cypress screenshots disappear between runs. Why?

Cypress empties the screenshots and videos folders before every cypress run. That is the trashAssetsBeforeRuns default. Copy artifacts out in CI, or set trashAssetsBeforeRuns to false in cypress.config if you want them to accumulate.

How do I change where Cypress saves screenshots?

Set screenshotsFolder and videosFolder in cypress.config.js to any paths you like, relative or absolute. Manual cy.screenshot() calls nest under the screenshots folder by spec path unless you pass a custom filename.

Notice an outdated path? Let us know.