Add a guide/example on setup with multiple-cucumber-html-reporter
See original GitHub issueHey guys,
I just started using cypress-cucumber-preprocessor
at work and it’s a great tool (thanks for that!), but the thing that I am missing is the possibility to also generate a nice html report at the end of a test run.
The README file says that it should work fine with multiple-cucumber-html-reporter, but I did not manage to make it work. Any chance you might add a guide or an example on this?
Thanks in advance!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Add a guide/example on setup with multiple-cucumber-html ...
Hey guys, I just started using cypress-cucumber-preprocessor at work and it's a great tool (thanks for that!), but the thing that I am...
Read more >multiple-cucumber-html-reporter - npm
Multiple Cucumber HTML Reporter is a reporting module for Cucumber to parse the JSON output to a beautiful report. The difference between all ......
Read more >Multiple Cucumber HTML reporter in Cypress
– To generate the final html report just execute your test cases and Refresh the project. This module converts Cucumber's JSON format to...
Read more >Automated HTML Reports with Cypress 10+ & Cucumber? Repo
Repo: https://github.com/JoanEsquivel/cypress- cucumber - ... AUTOMATE your TESTS REPORTS with CYPRESS 10+ & CUCUMBER | HTML Report.
Read more >multiple-cucumber-html-reporter Code Examples - Snyk
To help you get started, we've selected a few multiple-cucumber-html-reporter examples, based on popular ways it is used in public projects. Secure your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Firstly configure package.json to generate cucumber.json files when cypress is run - see https://github.com/TheBrainFamily/cypress-cucumber-preprocessor#output
install the multi-html-reporter into your project
npm install multiple-cucumber-html-reporter --save-dev
write a helper script to invoke the reporter as described in https://github.com/wswebcreation/multiple-cucumber-html-reporter#cucumber-js-3x - so copy the code block shown above this as a separate js file in your project - report.js, for example
make sure the jsonDir in this helper points to the directory you told the plugin to write the cucumber json files to in package.json
run the features
npx cypress run --spec "cypress/integration/*.feature"
check there are a bunch of json files in the folder you specified
run the reporter
node report.js
open index.html in the output folder
``> In addition to what @JoaoPedroVarella is looking for, I am looking for including Metadata in my html report but so far, I have not been able to do it in MacOS. Anyone who has tried including all metadata for Mac?
I started to handle it in this way, I save the cypress run as json, my cypress/plugins/index.js:
Then I consume this json for generating the html report, for this case I added this to my report generator js:
It’s only a way that I tried, it’s more like a poc. But maybe it’s helpful.
The things that I didin’t get from cypress run is os version and more device details.
Report looks like this: