Cypress · Browser testing end to end

How does video recording work in Cypress?

EasyvideosartifactsciUpdated Oct 2026
Quiz this track

Short answer

Set video to true in the config to record a video during cypress run. Videos go to videosFolder and help diagnose failures that are hard to reproduce from a screenshot alone.

Video records the browser during a headless run. It is useful when a failure depends on sequence or timing, because a screenshot only shows one frame. Recording has a cost in CPU, disk and CI time, so enable it deliberately rather than for every local run.

ts
import { defineConfig } from "cypress";

export default defineConfig({
  video: true,
  videoCompression: 32,
  videosFolder: "cypress/videos",
  e2e: {
    baseUrl: "http://localhost:3000",
  },
});
Video is recorded for run-mode executions; higher compression produces smaller artifacts.

Practical guidance

  • Enable video for CI failures, not necessarily for every local run
  • Upload only failed-run videos to keep artifact storage manageable
  • Compression reduces size but can soften small UI details
  • A video is a diagnostic aid, not a replacement for assertions or logs
  • Cypress Cloud can retain run artifacts and playback when configured

If a test fails only in CI, the video plus the command log and screenshot usually reveal whether the app was slow, a request failed, or the wrong element was clicked. Keep the failing job's artifacts long enough to investigate.

Video does not capture the operating-system desktop or native dialogs. It records the browser content that Cypress controls.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1How do you enable video recording?
  2. 2Why might you disable video locally?
  3. 3Where are videos written?
  4. 4Does video capture native OS dialogs?

Say it in the interview

Video is enabled in the Cypress config and recorded during run mode. I use it for failures that are hard to understand from one frame, especially timing-related ones in CI. I usually record on CI and upload only failed-run videos to keep artifacts small. Video is a diagnostic, so I still rely on assertions and the command log to define correctness.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Cypress mock interview and get scored feedback on depth, clarity and confidence.