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. Custom config file

JSON_REPORT

Below are the options available to generate the JSON report

  • FILENAME: custom name for the json report file, default to report_[datetime].json in which [datetime] will be replaced with a timestamp. (ie. report_29-08-2023_233219.json)

  • OVERWRITE: set to false if you don't want to overwrite existing report files, default to true. If a duplicate filename is found, the report will be saved with a counter digit added to the filename. (ie.custom_report_name_1.json)

💢 Default value: { FILENAME: 'report_[datetime].json', OVERWRITE: true }

// cypress-image-diff.config.js
const config = {
  JSON_REPORT: { 
    FILENAME: 'cypress_visual_report',
    OVERWRITE: false,
  }, 
};

module.exports = config;
PreviousCOMPARISON_OPTIONSNextCYPRESS_SCREENSHOT_OPTIONS

Last updated 1 year ago