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
1
vote
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
  • 373
  • 6
  • 18
1
vote
2 answers

How to handle Iframe content using webdriverIO js and mocha

I want to be able to click on Agree button to give my consent for cookies on a website, I know how to do this in selenium webdriver, however, I have no idea on how to do this using js and mocha as I am trying to learn any help is appreciated. I…
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
  • 55
  • 7
1
vote
0 answers

Add screenshots for passing cypress tests in mochawesome report

I want to add screenshots for passing tests in the mochawesome html report. I have managed to add screenshots for a failing test in the html report via the following and was wondering if this could be updated to support screenshots for passing…
snipa4
  • 11
  • 1
  • 3
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
  • 431
  • 5
  • 14
1
vote
2 answers

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
  • 422
  • 2
  • 5
  • 16
1
vote
1 answer

Name of the mochawesome report is not saving as expected (even though 'reportFilename' in cypress.json is changed)

i am using mochawesome for my cypress tests. This is my cypress.json file { "viewportWidth": 1440, "viewportHeight": 800, "defaultCommandTimeout": 8000, "reporter": "mochawesome", "reporterOptions": { "reportDir":…
user10251019
1
vote
1 answer

Why does an exported module error report that a defined function "is not a function"

This is where I define my functions and export them using module.exports class GITHelper extends Helper { addLatestReport(){ simpleGitPromise.addRemote(date,remote); return simpleGitPromise.add('.') .then( (addSuccess) => { …
user6499789
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 Bhalaik
  • 3,349
  • 5
  • 23
  • 46
0
votes
0 answers

Cypress: The html report generated does not show the steps but shows random code in the mochawesome report

"pretest": "rm -r ./cypress/reports/*.html & rm -r ./cypress/reports/*.json ", "posttest": "npm run merge-report && npm run generate-fullreport", "test": "npm run cypress-test || npm run posttest", "cypress-test": "cypress run --spec…
0
votes
0 answers

GitHub action is missing the JSON report after the Cypress tests finish

I am trying to setup a GitHub workflow for executing the Cypress tests in parallel using the cypress-split package to split up the tests. My GitHub repository is also part of a GitHub Enterprise organization (not sure if it is relevant, but wanted…
t3stI0
  • 68
  • 1
  • 7
0
votes
0 answers

How to hide code from mochawesome report?

I use the selenium web driver together with mochawesome. I would like to disable the display of code in the report, but I can't figure out how to do it. I added the --no-code to the script as described in the documentation, but the code is still…
PavelB
  • 3
  • 2
0
votes
0 answers

Getting blank page using HTML publisher in Jenkins

I am using Jenkins to run Cypress tests and using using Mochawesome to generate reports. I am able to generate json and html results files. From the reports folder I am able to link to my test results html file and view them in the browser. But…
Scott Floyd
  • 76
  • 1
  • 9
0
votes
2 answers

Cypress Mochawesome report showing file twice

I'm running Cypress 12.13.0 with mochawesome-report-generator 6.2.0, mochawesome-merge 4.3.0 and mochawesome 7.1.3, although I've had this problem for a few versions of Cypress. I'm using bamboo to run a powershell script to run all of the files and…
Corey Snow
  • 225
  • 2
  • 15
0
votes
0 answers

How can I convert a merged mochawesome JSON file (300KB) into a CSV/Excel file in Cypress

How can I convert my merged mochawesome JSON report into a CSV/Excel file? The merged JSON report is approximately 300KB and was generated using the following commands in a GitHub Actions workflow: Run Cypress E2E Tests - name: Cypress end-to-end…