Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
Cypres - mochawesome reports - reportDir

I am trying to implement dynamic path to mochawesome reports for different browsers e.g for example, for chrome it is supposed to be cypress/reports/chrome/mocha

This is my cypress.json configuration for reporter

 "reporter": "cypress-multi-reporters",
"reporterOptions": {
    "reporterEnabled": "mochawesome",
    "mochawesomeReporterOptions": {
        "quiet": true,
        "overwrite": false,
        "html": false,
        "json": true

    }
},

And this is how I'm trying to run tests with custom reporterDir

"cypress run --spec cypress\\integration\\filter\\*.js --browser chrome --headless --config-file config.json --config videosFolder=cypress\\videos\\chrome downloadsFolder=cypress\\downloads\\chrome --reporter mochawesome --reporter-options reportDir=cypress/reports/chrome/mocha"

but it doesnt work. Reports are saved under path from cypress.json. I tried different syntax many times but I just can't make it work. I need it because my tests will be launched on many browsers and I want to make reports directory well organised.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I ended up with https://www.npmjs.com/package/@bahmutov/cypress-extends - plugin responsible for extending cypress configuration file so I have created one for each browser with its own path for reports, videos and downloads and now I'm launching scripts like that "cypress run --spec cypress\\integration\\*.js --browser chrome --config-file config_BROWSER.json". I have also deleted multi-reporters plugins because I realized I don't need it.

Cypress.json

"reporter": "mochawesome",
  "reporterOptions": {
    
          "quiet": true,
          "overwrite": false,
          "html": false,
          "json": true,
  }

config_chrome.json

{
"extends": "./cypress.json",

"reporter": "mochawesome",
"reporterOptions": {
        "reportDir": "cypress/reports/chrome/mocha"   
    },

"videosFolder": "cypress/videos/chrome",
"downloadsFolder": "cypress/downloads/chrome"}

and then config_edge.json and config_firefox.json - similar to chrome but with different paths

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!