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

43 questions
3
votes
1 answer

How to view cy.log() output in mochawesome HTML report

I want to view the output of cy.log() command in mochawesome HTML report. Below is the code /// describe("Cypress File Upload", function() { it("File Upload test", () => { …
Khadija
  • 43
  • 4
2
votes
1 answer

How to create basic plain test report in Cypress

I need help with connecting an additional reporter to Cypress tests. I am looking for a basic, really plain (HTML) report with only names of tests and statuses (Fail/Pass). Later I will send it via email. I found Mochawesome, but this is too…
harmider
  • 304
  • 4
  • 14
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
  • 45
  • 6
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
  • 3
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
  • 79
  • 2
  • 15
1
vote
0 answers

Ability to do run test suite in single npm script to generate both testrail and mochawesome reports

Currently I have two separate scripts: "p1_testRail": "cypress run -r cypress-testrail-accumulative-reporter {arguments} {test_suites} --headless" "p1_mochawesome": "cypress run -r cypress-multi-reporters {arguments} {test_suites} --reporter…
Meg
  • 45
  • 6
1
vote
0 answers

Mocha reporters don't support parallel mode, does one exist?

We're using Mocha 8.0 and are running it with the parallel feature. Mochawesome reporter completely crashes in that mode. And the couple of very simple reporters like json or spec, well they don't do enough for us. We are looking for html output…
Dmitri R117
  • 1,412
  • 15
  • 13
1
vote
0 answers

Inject cypress-image-snapshot diff images to Mochawesome reports

I am using Cypress along with the Mochawesome reporter and the cypress-image-snapshot library. The cypress-image-snapshot library creates screenshots of visual regressions any time a test fails. I am trying to see if there is a way of injecting…
lukas
  • 464
  • 1
  • 4
  • 18
1
vote
0 answers

why mochawesome-merge is adding command path in generated ,json file?

when I execute command : npx mochawesome-merge ./cypress/report/heec-report/*.json>./cypress/report/report.json then it generate report.json , but it add a line "C:\E2E_Automation\node_modules\mochawesome-merge\bin\mochawesome-merge.js? on top…
Shailendra
  • 361
  • 3
  • 10
1
vote
1 answer

Can I add cypress screenshot in mocha awesome html report

Im able to generate mocha awesome html report everything fine, but I want to add screenshots in html report im taking cypress screenshot but want to add in html report. Is there any way I can add them?
Mehran Shafqat
  • 204
  • 4
  • 13
1
vote
3 answers

Cypress - addContext() is keeping previous failure count and adding it to each 'it' scenario in mochawesome report

In my mochawesome-report addContext() is keeping previous count and adding it to each 'it' scenario, in case of a test case failure, I'm adding 'someValue' as context to the test case. So if 2nd test case fails then value is getting printed twice.…
Kushal
  • 3,106
  • 4
  • 16
  • 35
0
votes
0 answers

Mochawesome not refreshing the tests

I have an issue in refreshing the html and json files from Mochawesome The setup is with Selenium/NodeJs Any idea will be welcome! packaje.json file: explanation line ("test": "mocha tests.js --reporter mochawesome && concurrently "http-server -a…
A B
  • 63
  • 2
  • 8
0
votes
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…
0
votes
0 answers

Is there a way to skip Pending spec json file creation in mochawesome?

Scenario- There are 10 cases in Cypress, out of which 9 are running on Chrome and 1 on electron. Code eg- cypress.run({ browser: 'electron' }); const {totalFailed} = await cypress.run({ browser: argv.browser }); So first command will run only 1 case…
0
votes
0 answers

cypress logs are not displayed in Mochaawesome reporter

HTML report is generated but the report doesnot have cypress logs. package.json cypress.json can anyone please help me as soon as possible.. I don't know where I am missing... Mochawesome report
1
2 3