I am using Protractor with Cucumber (js). I would like to generate report files just like with the Cucumber-JVM version. I have seen examples when using Protractor with Jasmine, but practically nothing with Cucumber.
How do you generate reports when using this configuration?
The final goal is to publish this report in Jenkins, or anywhere else if they are directly generated in HTML.
Thanks!
With the latest version of protractor (from version 1.5.0), you can now generate a JSON report. When I asked this question about 7 months ago that feature was not there.
All you need to do is add this to your protractor-config.json file.
resultJsonOutputFile: 'report.json'
Where report.json is the location of the output file.
Once you have that, you can use protractor-cucumber-junit (https://www.npmjs.com/package/protractor-cucumber-junit), cucumberjs-junitxml (https://github.com/sonyschan/cucumberjs-junitxml) or something similar to transform the JSON file into a valid XML file that Jenkins can display.
$ cat report.json | ./node_modules/.bin/cucumber-junit > report.xml
Hope this helps.