Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

116
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda