haim-io / cypress-image-diff

Visual regression test with cypress
MIT License
251 stars 62 forks source link

Unable to generate JSON REPORT under Folder cypress-image-diff-html-report #206

Closed aks12250 closed 8 months ago

aks12250 commented 8 months ago

Hi,

I have just started using cypress-image-diff plugin. Plugin seems to be working, taking screenshots and able to compare. But it is not generating the JSON REPORT. I have already added the options available to generate the JSON report in the cypress-image-diff.config.js. Still JSON REPORT is not being able to generate after executing the test. I have followed the the whole documentation and specially for JSON report: Integration: https://cypress.visual-image-diff.dev/getting-started/cypress-integration

JSON report: https://cypress.visual-image-diff.dev/getting-started/custom-config-file/json_report

// My current cypress-image-diff.config.js file: const config = { FAILURE_THRESHOLD: 0.0, FAIL_ON_MISSING_BASELINE: false, JSON_REPORT: { FILENAME: 'cypress_visual_report', OVERWRITE: true, }, }; module.exports = config;

It is generating the HTML report as I'm also using Cypress-Image-diff-HTML-Report. Please see below the folder structure and files it is generating after executing the test. image

When I run "cypress-image-diff-html-report generate" or "cypress-image-diff-html-report start", it gives error "no json report found": [cypress-image-diff-html-report]: Cannot find any report json in this directory \cypress-image-diff-html-report

I'm eventually looking to generate Cypress Image Diff HTML Report out of JSON Report: https://cypress.visual-image-diff.dev/getting-started/reporting/cypress-image-diff-html-report

This is an urgent need. Appreciate any assistance here.

-Akshay

aks12250 commented 8 months ago

NVM, I just saw an recently closed issue related to this: https://github.com/uktrade/cypress-image-diff/issues/204. And I having the same thing.

I tried running the test in headless mode (open mode) and it works.

Please ignore this as it's an expected behavior.

Cheers!