Questions tagged [mochawesome]

Mochawesome is a NPM package used for Javascript Test reporting.

Mochawesome is a custom reporter for use with the Javascript testing framework, mocha. It runs on Node.js (>=4) and works in conjunction with mochawesome-report-generator to generate a standalone HTML/CSS report to helps visualize your test runs.

Mochawesome can be downloaded from :

https://www.npmjs.com/package/mochawesome

91 questions
2
votes
0 answers

mochawesome: provides empty report.json with error "Failed at the cypress@1.0.0 post_test script"

Followed the below steps mentioned in tutorial: https://dev.to/bushraalam/using-mochawesome-reporter-with-cypress-54pf Installed necessary packages through npm Added pre and post scripts along with combine and generate report Ran test script and…
Meg
  • 55
  • 7
2
votes
1 answer

Getting Error mochawesome-merge error: unknown option: --reportDir

On merging JSON reports through cmd, I am getting error in report.json(converted one) error: unknown option: --reportDir Used below command run mochawesome-merge --reportDir cypress\reports\mochawesome-report >…
sks
  • 21
  • 4
2
votes
1 answer

Configure screenshot folder in Cypress

I am using Cypress as my user interface test automation framework. Currently my folder structure for spec file (logical organization of test files) is: …
trickster
  • 99
  • 2
  • 15
1
vote
1 answer

adding mochawesome reporter in typescript

I am trying to add MochaAwesome reporter in my cypress typescript tests. When I add require('cypress-mochawesome-reporter/plugin')(on); in my cypress.config.ts file, I am getting "Require statement not part of import statement". Have anyone else…
Tarishah
  • 81
  • 11
1
vote
1 answer

Mochawesome does not generate bulk reports

I installed the Mochawesome results reporting add-on to Cypress. The problem is that every time I finish all the tests, I only have the html file with the last one in the reports folder. Do you know how to make a report from the whole set of…
Tomasito
  • 306
  • 2
  • 15
1
vote
0 answers

Cypress.mocha.getRunner().suite.ctx.currentTest.commands; Not Working

CONTEXT: I use cypress 8.7.0. and on support/commands.js I have a function than get the commands foreach execution using Cypress.mocha.getRunner().suite.ctx.currentTest.commands; | function in support/commands.js | Result: This work succesfull…
Jasp402
  • 402
  • 3
  • 12
1
vote
1 answer

Customize Cypress Mochawesome Report

I'm using the cypress-mochawesome-reporter V. 2.3.0 and Cypress 10.4.0 to create html Reports of my Cypress Tests. I'd like to customize this html report and add some additional context like the author of the Test next to the Title and time. My…
1
vote
0 answers

How to set up properly screenshots folder path for cypress-mochawesome-reporter?

My Mochawsome report created under installed cypress-mochawesome-reporter plugin doesn't contain screenshots as their path is wrong and contains not existing directory "screenshotscypress": "cypress/report/screenshotscypress/screenshots/". How to…
vitaliy4us
  • 483
  • 5
  • 21
1
vote
1 answer

TypeError: Cannot set properties of undefined (setting 'err')

I'm working on generating mochawesome report by executing my cypress Test My configuration are like that: Cypress.json { "defaultCommandTimeout": 100000, "reporter": "cypress-mochawesome-reporter", "reporterOptions": { "reportDir":…
1
vote
2 answers

Skip Pending and Skipped tests from HTML report in Cypress

I have written some BDD tests in cypress using cucumber and using below command to run my automation tests: ./node_modules/.bin/cypress-tags run -e TAGS='not @ignore and @bdd',allure=true test:all As I have 1 tests with @bdd tag so it runs it and…
1
vote
2 answers

Getting "Error: Pattern mochawesome-report/*.json matched no report files" error only when test running in github action

I am able to merge and generate reports in my local but when I am running mt test into GitHub action through error ERROR: Failed to merge reports. I never used GitHub action before so maybe I have made a mistake. Any suggestions are welcome. Here is…
Krupal Vaghasiya
  • 536
  • 7
  • 21
1
vote
1 answer

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":…
dawidk09
  • 91
  • 10
1
vote
1 answer

Archiving reports, cypress.json file

I want to store all new and previous reports in my directory. Current behavior Right now after running tests by 'npm run test' previous reports are deleted or appended (when i delete line clean reports in package.json). Desired behavior I want to…
dawidk09
  • 91
  • 10
1
vote
1 answer

How to add mochawesome report generator in webdriverIO?

I've been trying the below in wdio.config.js file on webdriverIO to no avail. I have: reporters: ['dot',['mochawesome',{ outputDir: './Results', reportTitle: 'My Custom Title', showPassed: false, marge: '--saveHtml' }], ], …
1
vote
1 answer

Cypress reporter results filename

I have multiple spec files in integration folder. All these files, I am scheduling to run using single command as node_modules\.bin\cypres run --spec .\cypress\integration\*.spec.js --env configFile=configuration_file I am using mochawsome reporter…