October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
CI/CD

Cypress HTML Report with Screenshots: A Complete Mochawesome Workflow

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

To generate one Cypress HTML report containing results and screenshots, configure the Mochawesome reporter to write JSON for each spec, merge those JSON files, and render the merged file with Mochawesome Report Generator. Cypress captures a screenshot automatically when a test fails during cypress run; explicit cy.screenshot() calls add images at chosen points. The combined report is a static HTML artifact you can open locally or publish from CI.

What Cypress provides by default

Cypress is built on Mocha and uses the spec reporter by default. That reporter prints progress to the terminal; it does not create an HTML test-results file. Cypress also bundles teamcity and junit reporters. HTML output therefore requires a compatible reporter or a separate report-generation step. The official Cypress reporter guide documents a Mochawesome workflow that preserves per-spec JSON, merges it, and creates a standalone HTML file containing test results, timing information and test bodies: Cypress reporters documentation.

Do not confuse a test report with code coverage. Cypress coverage tooling can produce an HTML coverage report, but that report answers “which code ran?” A Mochawesome-style report answers “which tests ran, what failed, how long did they take, and what evidence was captured?”

Choose the report shape before installing anything

Need Suitable output Important trade-off
Terminal feedback only Built-in spec reporter No standalone HTML artifact
One local HTML file for all specs Mochawesome JSON + merge + marge Requires a post-run merge step
Rich HTML with screenshots and steps cypress-mochawesome-reporter or allure-cypress Community packages have their own setup and version compatibility; verify current documentation
Hosted browsing and sharing Cypress Cloud or your CI artifact viewer Access and retention depend on the current service and plan
Machine-readable CI results JUnit or another XML/JSON reporter Human-readable screenshots may need separate artifact handling

The Cypress community extension catalog describes cypress-mochawesome-reporter as a zero-configuration Mochawesome reporter with screenshots. It also lists allure-cypress as an HTML reporting option with screenshots and steps (the catalog entry shows Allure 3.12.2 and Cypress 12.17.4 or newer). Those displayed versions can change, so check package documentation and your Cypress version before pinning dependencies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Build one combined Mochawesome HTML report

1. Install the reporter packages

From the directory containing package.json, install the three packages used by the documented workflow:

npm install --save-dev mochawesome mochawesome-merge mochawesome-report-generator

Use a lockfile in CI and verify the package options against the versions you install; reporter CLIs evolve independently of Cypress.

2. Configure Cypress to write JSON per spec

In cypress.config.js, set the reporter to Mochawesome and disable HTML generation at the individual-spec stage. overwrite: false is essential: each spec must produce its own JSON file so that later specs do not replace earlier ones.

const { defineConfig } = require('cypress');

module.exports = defineConfig({
  reporter: 'mochawesome',
  reporterOptions: {
    reportDir: 'cypress/results',
    overwrite: false,
    html: false,
    json: true
  },
  e2e: {
    setupNodeEvents(on, config) {
      return config;
    }
  }
});

The reporter writes result files under cypress/results. Keep this directory separate from cypress/screenshots; the former contains report data, while the latter contains image files.

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

3. Add deliberate screenshots to tests

Cypress supports screenshots in both cypress open and cypress run. A named screenshot can capture the whole application, or an element can be captured by chaining screenshot() to a subject:

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
describe('checkout', () => {
  it('shows the confirmation page', () => {
    cy.visit('/checkout');
    cy.get('[data-cy=place-order]').click();
    cy.get('[data-cy=confirmation]').should('be.visible');
    cy.screenshot('checkout-confirmation');
    cy.get('[data-cy=confirmation]').screenshot('confirmation-panel');
  });
});

During cypress run, Cypress also captures a failure screenshot automatically. That automatic capture does not occur in cypress open. By default, images are saved in cypress/screenshots. Set screenshotsFolder to change the location, and set screenshotOnRunFailure: false only when you intentionally do not want automatic failure images:

module.exports = defineConfig({
  screenshotsFolder: 'artifacts/cypress-screenshots',
  screenshotOnRunFailure: true
});

The cy.screenshot() command is asynchronous and takes approximately 100 ms according to Cypress documentation. The page can change while the image is being captured, so an image taken after a failed command may not represent the exact instant of failure. If reports contain personal or secret data, configure blackout selectors and review artifacts before sharing.

4. Run the tests and merge the JSON files

Run headlessly so failure screenshots are generated, then merge every per-spec JSON file:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npx cypress run
npx mochawesome-merge cypress/results/*.json > cypress/results/merged.json

If your shell does not expand the glob as expected, pass the files using the merge tool’s current CLI syntax. Confirm the command with npx mochawesome-merge --help for the installed version.

5. Render the standalone HTML file

npx marge cypress/results/merged.json --reportDir mochawesome-report

The documented workflow produces mochawesome-report/mochawesome.html. Open that file in a browser, or upload the whole report directory as a CI artifact. Keep the generated directories out of source control unless your project has a specific reason to commit them; Cypress’s organizing guidance treats screenshots and videos as regenerated run artifacts.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

6. Make the workflow repeatable with npm scripts

{
  "scripts": {
    "cy:run": "cypress run",
    "report:merge": "mochawesome-merge cypress/results/*.json > cypress/results/merged.json",
    "report:html": "marge cypress/results/merged.json --reportDir mochawesome-report",
    "test:report": "npm run cy:run && npm run report:merge && npm run report:html"
  }
}

In CI, run the merge and render commands even when tests fail. Most CI systems stop a job after a non-zero test command; configure the report steps as “always run” or use a shell pattern that records the Cypress exit code, creates the report, and then exits with the original status.

How screenshots appear in the report

Mochawesome merges test metadata; screenshot files remain ordinary artifacts unless your reporter integration links or embeds them. Verify the generated HTML and artifact directory in your own pipeline. A report that contains test rows but no images usually means the screenshots were not retained, the reporter was not configured to attach them, or the CI job uploaded only the HTML file and omitted cypress/screenshots.

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

For multiple specs, never use a fixed result filename that later specs overwrite. Cypress processes specs separately, and a final file can otherwise describe only the last spec. Non-overwriting Mochawesome output followed by an explicit merge avoids that failure mode.

CI options: artifacts versus Cypress Cloud

Publish CI artifacts

  • Upload mochawesome-report/ for the browsable HTML report.
  • Upload cypress/screenshots/ so images referenced by the report remain available.
  • Upload cypress/results/ when you need raw JSON for later processing.
  • Use retention and access controls appropriate for screenshots that may contain customer or payment data.

Each CI provider documents its own artifact syntax. Retention is provider- and plan-dependent; do not assume a permanent archive.

Use Cypress Cloud

Cypress says screenshots taken during a run can be viewed in Cypress Cloud without extra work. Cloud can attach screenshots and videos to test results and make them browsable and shareable for the applicable retention period. Check current Cloud plan documentation for access, limits and retention rather than relying on an old number.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common failures

The HTML file is missing

Check that Cypress completed, that cypress/results contains JSON, and that the merge command ran. A failed test command may have prevented later commands; configure CI post-steps to run regardless of test status.

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.

Only one spec appears

Look for overwrite: true or a fixed reporter filename. Set overwrite: false, remove stale result files before a run, and merge the complete directory.

Screenshots are absent

Run with cypress run to obtain automatic failure captures, or add cy.screenshot(). Confirm the configured screenshotsFolder and upload that directory as an artifact.

The image shows a different state than the failure

Screenshot capture is asynchronous. Add an assertion before an intentional screenshot, avoid changing the page immediately afterward, and treat automatic failure images as diagnostic evidence rather than a frame-perfect recording.

CI cannot open the report

Upload the entire report directory, not only a single HTML file, when the generated report references adjacent assets. If the report is intentionally self-contained, verify that your installed generator version actually embeds those assets.

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.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Secrets or private data are visible

Use blackout selectors and test accounts, restrict artifact permissions, and set artifact retention deliberately. Do not publish screenshots containing tokens, personal information or internal URLs.

Or skip the browser setup

If your requirement is simply a clean screenshot of a web page for an artifact, visual check or documentation step, ScreenshotNeo provides a one-request screenshot API and MCP server. It is separate from Cypress test execution: use Cypress for assertions and test reports, and ScreenshotNeo when you need an external page capture without maintaining browser automation.

cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo API documentation for response headers and options. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server exposes take_screenshot, get_page_info and capture_pdf to Claude, Cursor and other MCP clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account.

Practical checklist

  • Choose whether you need one merged report or separate per-spec files.
  • Configure Mochawesome with JSON enabled and overwriting disabled.
  • Run cypress run in CI for automatic failure screenshots.
  • Use explicit cy.screenshot() calls for important checkpoints.
  • Merge JSON only after all specs finish.
  • Publish both the HTML report and screenshot directory.
  • Protect artifacts and review retention settings.
  • Verify package versions and CLI flags whenever dependencies change.

Frequently Asked Questions

Does Cypress generate an HTML report without a plugin?

No. Its default spec reporter writes terminal output. Use a compatible reporter such as Mochawesome, Allure, or another configured format to create HTML.

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

Can I get screenshots while using cypress open?

Yes, with explicit cy.screenshot(). Cypress’s automatic failure screenshot is a cypress run behavior, not a cypress open behavior.

Should I commit Mochawesome reports to Git?

Usually no. Treat reports, screenshots and videos as generated CI artifacts unless your project has a documented archival requirement.

Is Cypress Cloud required for screenshots?

No. You can publish the HTML and image directories through your CI artifact system. Cypress Cloud is an optional hosted way to browse run evidence.

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.

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

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.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.