To include screenshots and videos in Cypress reports, configure capture in Cypress, choose a reporter for test results, and make your local CI job or Cypress Cloud retain the resulting files. These are separate steps: a reporter can produce console output, JUnit XML, or an HTML report, but it does not turn screenshot or video capture on.
In cypress run, Cypress takes screenshots automatically for test failures; video recording is off by default. Enable it with video: true. Then ensure your report and artifact folders are uploaded or stored somewhere your team can access after the run.
What belongs in a Cypress report?
“Cypress report” can mean either a test-results report or the files that help explain a test result. A reporter formats outcomes such as passed and failed tests. Screenshots and videos are separate artifacts captured by Cypress. A CI system or Cypress Cloud then determines where those files can be viewed later.
- Test results: the reporter’s output, such as the default terminal report, JUnit XML, or a custom HTML report.
- Screenshots: image files saved by Cypress, including automatic failure captures during
cypress run. - Videos: optional recordings of specs during
cypress run. - Retention: the CI artifact upload or Cypress Cloud recording that keeps outputs available after the job ends.
Plan all three parts—capture, reporting, and storage—rather than expecting a reporter setting alone to bundle media into an HTML page.
#1 Best Overall
Configure screenshots and videos
Put capture settings in the project’s cypress.config.js or cypress.config.ts. Cypress’s default screenshot folder is cypress/screenshots, and its default video folder is cypress/videos. Failure screenshots are enabled for cypress run by default; videos are not.
JavaScript configuration
const { defineConfig } = require('cypress');
module.exports = defineConfig({
video: true,
screenshotsFolder: 'cypress/screenshots',
videosFolder: 'cypress/videos',
});
This keeps the documented default artifact locations explicit while enabling recordings. If you omit the folder settings, Cypress uses those default paths. The same options can be placed in a TypeScript config using the project’s existing TypeScript configuration style.
Capture a deliberate screenshot
Use cy.screenshot() when the useful evidence is a particular point in a test rather than only an automatic failure capture. For example:
it('shows the submitted confirmation', () => {
cy.visit('/contact');
cy.get('[name="email"]').type('reader@example.com');
cy.get('button[type="submit"]').click();
cy.contains('Message sent').should('be.visible');
cy.screenshot('contact-confirmation');
});
The file is written under the configured screenshots folder. Cypress’s screenshot API also supports defaults for capture behavior and blacking out selected elements, which can help exclude dynamic or sensitive regions. Avoid capturing credentials or personal data unless your artifact access and retention policies permit it.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesWhat happens in open mode
Do not use cypress open to validate automatic failure screenshots or video recording. Cypress does not automatically capture failure screenshots in open mode and does not record videos there. Run the spec with cypress run when verifying those artifacts.
Rank #2
Choose a reporter for test results
Cypress uses Mocha and defaults to the spec reporter in standard output. It also includes teamcity and junit reporters, and supports locally installed or npm-installed custom reporters.
Use JUnit XML for CI integrations
When a CI test-results feature consumes JUnit XML, configure Cypress to use the built-in reporter:
const { defineConfig } = require('cypress');
module.exports = defineConfig({
reporter: 'junit',
video: true,
});
Confirm the output location and naming expected by the CI system you use; the exact artifact and test-result collection steps differ by provider. Reporter selection does not change where Cypress stores screenshots or videos.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchGenerate a Mochawesome HTML report
Cypress documents a Mochawesome workflow that writes separate JSON reports per spec, merges them, and generates HTML with marge. Install the reporter and companion tools in the project, then configure Cypress:
npm install --save-dev mochawesome mochawesome-merge mochawesome-report-generator
const { defineConfig } = require('cypress');
module.exports = defineConfig({
reporter: 'mochawesome',
reporterOptions: {
overwrite: false,
html: false,
json: true,
reportDir: 'cypress/results',
},
video: true,
});
With this setup, run Cypress and then merge the JSON output and generate HTML:
Rank #3
npx cypress run
npx mochawesome-merge cypress/results/*.json > cypress/results/merged.json
npx marge cypress/results/merged.json --reportDir cypress/results
The generated HTML report presents test results; the screenshots and videos remain separate files in their Cypress artifact folders. Whether the HTML report embeds media is a behavior to verify for the particular reporter setup, not something Cypress’s capture configuration guarantees.
Keep artifacts available after a run
By default, Cypress clears the configured downloads, screenshots, and videos folders before cypress run, including nested files. This prevents artifacts from earlier runs being mistaken for current results, but means those folders are not durable storage.
Retain local files between runs only when needed
To stop Cypress from clearing those folders before a run, set:
module.exports = defineConfig({
trashAssetsBeforeRuns: false,
video: true,
});
Use this only if preserving previous files is intentional. Old screenshots and videos can be confused with current-run evidence, so a cleaner default is often to let Cypress clear the directories and have CI upload the current run’s outputs before the job ends.
Collect files in your CI system
For local-file retention, configure your CI provider to collect the configured report output and Cypress artifact directories after the test command, including when tests fail. The precise UI labels and YAML syntax depend on the provider; the Cypress documentation does not prescribe a provider-specific configuration. Check that the upload step runs on failure as well as success, and that it points to the actual report directory and the configured screenshots and videos folders.
Rank #4
- Run Cypress with
npx cypress run. - Generate any merged report after Cypress exits, if using a JSON-to-HTML workflow.
- Configure the CI job’s artifact or test-results collection to include the report output,
cypress/screenshots, andcypress/videos(or your custom paths). - Set the provider’s failure-handling behavior so artifact collection still executes when Cypress returns a failing exit status.
- Open a failed job and confirm the uploaded files can be downloaded or viewed.
Check the provider’s own documentation for exact retention periods, access controls, and configuration syntax. These vary between CI services.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use Cypress Cloud for recorded runs
Another option is Cypress Cloud: record a run with --record to store run information and artifacts in its interface. Recorded runs can present screenshots, downloadable videos, and CI logs alongside test results. Cloud data controls allow artifacts to be deleted before upload; review the storage and security details against your organization’s requirements. Cypress documents that run configuration is captured except for Cypress environment variables, along with OS environment variables related to CI and Git.
npx cypress run --record
Recording requires opting into the Cloud workflow; merely enabling video locally does not send files there. Keep local CI artifact collection if your team needs a separate copy or uses a provider’s own retention and access controls.
Decide what to capture and where it should live
| Need | Approach | Trade-off to consider |
|---|---|---|
| Quick local diagnosis | Use automatic failure screenshots from cypress run; add cy.screenshot() at important checkpoints. |
Files are local unless another system collects them. |
| Visual record of each spec | Set video: true and retain the videos folder. |
Videos add files to process and retain; compression can reduce file size but takes longer. |
| Machine-readable CI results | Use JUnit XML or the format your CI consumes. | The reporter output is not the screenshot/video storage mechanism. |
| Shareable HTML test report | Use a custom reporter such as the documented Mochawesome workflow. | Merge per-spec results and collect the generated HTML as an artifact; media remains separate unless your report integration explicitly handles it. |
| Central recorded-run view | Run with --record and use Cypress Cloud. |
It is an opt-in hosted destination; review data controls and organizational requirements. |
Video compression is off by default. Enabling compression reduces file size but increases processing time; Cypress writes chapter markers into the MP4 only when compression is enabled. Choose based on the balance your team needs between artifact size and run processing time.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot missing reports or media
No video file appears
- Check that the command was
cypress run, notcypress open. - Confirm
video: trueis in the config used by that run. - Check the configured videos folder and whether the CI job uploads that path.
No failure screenshot appears
- Automatic failure screenshots apply to
cypress run, not open mode. - Check that screenshot capture has not been disabled elsewhere in project configuration.
- Inspect the configured screenshots folder and CI artifact paths; a local file can exist even when the job does not upload it.
Artifacts from a previous run disappear
This is expected with the default pre-run cleanup. If cross-run persistence is required, configure trashAssetsBeforeRuns: false; otherwise, collect the current run’s artifacts before a later run starts.
Recommended Free Tools
The report exists but media is missing
The reporter formats test outcomes; it does not automatically collect Cypress’s image and video directories. Add the artifact paths to the CI upload configuration or use the recorded-run destination you selected.
Cloud has no run to open
Local capture settings alone do not record a run in Cypress Cloud. Run with --record and verify that the command is configured for your team’s Cloud recording setup.
Compression makes CI slower
Video compression adds processing time. If file size is acceptable, leave compression off; if smaller videos are more important, enable compression and account for the extra processing.
Or skip the browser setup
ScreenshotNeo is a separate website screenshot API and MCP server, not a Cypress reporter or a replacement for Cypress’s test-failure artifacts. For standalone URL screenshots, one GET request returns an image or PDF. See the ScreenshotNeo website and API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents using Claude, Cursor, or another MCP client. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.
Frequently Asked Questions
Can Cypress put a screenshot directly inside a JUnit XML report?
The documented Cypress reporter setup treats JUnit output and screenshot files as separate outputs. Whether a downstream CI system displays attachments alongside a test result depends on that system’s integration.
Can I use screenshots without recording videos?
Yes. Failure screenshots are enabled by default in `cypress run`; video recording is a separate, opt-in setting.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Quick Recap
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.

