Cypress Image Diff Documentation
  • Migrate from v1 to v2
  • Getting started
    • Cypress integration
      • Typescript
      • Javascript
      • Browserstack
      • Cypress < v10
    • cy.compareSnapshot command
    • Custom config file
      • ROOT_DIR
      • FAILURE_THRESHOLD
      • RETRY_OPTIONS
      • FAIL_ON_MISSING_BASELINE
      • COMPARISON_OPTIONS
      • JSON_REPORT
      • CYPRESS_SCREENSHOT_OPTIONS
      • REPORT_DIR
      • SCREENSHOTS_DIR
      • NAME_TEMPLATE
    • Reporting
      • JSON report
      • Cypress Image Diff HTML Report
      • Legacy HTML Report
    • Client options
    • Running tests
    • Contributing
    • Publishing
Powered by GitBook
On this page
  1. Getting started
  2. Reporting

Cypress Image Diff HTML Report

PreviousJSON reportNextLegacy HTML Report

Last updated 1 year ago

From Cypress Image Diff version 2, Cypress Image Diff HTML Report is the recommended HTML report over the . Cypress Image Diff HTML Report generates a beautiful HTML report out of a , and offers extensive features:

  • Update baseline screenshots

  • Toggle between different screenshot inspector modes: carousel, slider, and mirror

  • Select your preferred colour scheme

Once you've done the , these quick command lines will be helpful:

  • cypress-image-diff-html-report start: to serve the HTML report out of a generated JSON file in an interactive mode, where you can update the baseline screenshots.

  • cypress-image-diff-html-report generate: to generate and write to disc the HTML report in case you just want to view the static report.

Or you could integrate the report programmatically:

import { start } from 'cypress-image-diff-html-report'

;(async () => {
  await start({
    configFile: 'custom.config.js',
    serverPort: 3000
    // ...
  })
})()

for more details about how to use Cypress Image Diff HTML Report.

If you run the generate command, this following folder structure will be expected:

    .
    ├── cypress-image-diff-html-report
        ├── cypress-image-diff-html-report.html
        ├── report_[datetime].json
Legacy HTML report
JSON file
integration part
See here