Cypress-cucumber-preprocessor: Add a guide/example on setup with multiple-cucumber-html-reporter

Created on 3 Dec 2019  路  4Comments  路  Source: TheBrainFamily/cypress-cucumber-preprocessor

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 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!

Most helpful comment

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

Screenshot 2020-02-26 at 20 08 18

All 4 comments

Anyone? :)

Someone knows how to resolve this one?

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

Screenshot 2020-02-26 at 20 08 18

Anyone know how to generate cucumber-json reports with screenshot and also cucumber html reports with screenshot please, I would be very grateful?
of the suggestions that I have read, none have generated the cucumber-json report, nor the html with screenshots.

please

Was this page helpful?
0 / 5 - 0 ratings