LironEr / cypress-mochawesome-reporter

Zero config Mochawesome reporter for Cypress with screenshots and videos
MIT License
159 stars 49 forks source link

Add OverWrite flag in reportOptions to archive reports #56

Closed nischaytv closed 2 years ago

nischaytv commented 2 years ago

Is your feature request related to a problem? Please describe. I need to Archive my reports with timestamps, i tried "overwrite": false in reporterOptions but it didn't work. as it is removing output folder before running tests

image

If you can stop removing output folder and control it with the help of overwrite flag, it will be great image

LironEr commented 2 years ago

even with this option, every time the report will be generated it will have the same name so it will still override

I can suggest an alternative solution: create cypress.config.js file

module.exports = {
  reporter: 'cypress-mochawesome-reporter',
  video: false,
  reporterOptions: {
    reportDir: `reports/${new Date().toISOString()}`,
  },
};

run cypress:

cypress run --config-file cypress.config.js

This will create a new folder for each run

What do you think?

LironEr commented 2 years ago

oh got it, ignore my last comment.. as it can be a temporary solution.

I will fix overwrite flag behavior

LironEr commented 2 years ago

Fixed in v2.4.0