Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

117
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda