How to generate cypress mocha report?

Install mocha using - npm i mocha

Install mochawesome using - npm i mochawesome

Install mochawesome-merge using - npm i mochawesome-merge

Install mochawesome-report-generator using - npm i mochawesome-report-generator

After installing above npm, it will add below  dependencies in package.json file

"dependencies": {
    "cypress-multi-reporters""^1.5.0",
    "mocha""^9.1.1",
    "mochawesome""^6.2.2",
    "mochawesome-merge""^4.2.0",
    "mochawesome-report-generator""^5.2.0"
  }

Add below options in cypress.json file

"integrationFolder""cypress/integration",
  "video"false,
  "screebsgotsFolder""cypress/reports/mochareports/assets",
  "screenshotOnRunFailure"true,
  "reporter""cypress-multi-reporters",
  "reporterOptions": {
    "reporterEnabled""mochawesome",
    "mochawesomeReporterOptions": {
      "reportDir""cypress/reports/mocha",
      "quite"true,
      "overwrite"true,
      "html"true,
      "json"true,
      "timestamp""mmddyyyy_HHMMss"
    }
  }

Comments

Popular posts from this blog

For Get Dynamic data & USe it into Postman Body parameters

API Automation Testing Script to check Response

Login through Data Driven Testing in selenium

Which dependencies needed in pom.xml while doing automation through selenium?

Download Java(JDK) & Eclipse IDE for selenium

What is data driven testing?

How to extract all the links in selenium?