igniteram / protractor-cucumber-typescript

e2e kickstarter test framework which consists of protractor, cucumber frameworks using typescript lang!
MIT License
196 stars 170 forks source link

Consolidate report not getting generated on trying to run the multi capabilities #28

Closed Balajiiguru closed 7 years ago

Balajiiguru commented 7 years ago

Hi Ram,

Thanks for such a wonderful project.

When i try to run the feature using multicapbilities,the report getting genrated only for last completed instance.Lets's say if I am running the feature file in Chrome and IE using multi capbilities,the last creted report overide the previous report so either chrome or IE run HTML report alone available in cucumber.reporter html.Is it possible to create consolidated report for multicapbilities?

Same problem exist if i run the multiple features files with option shardTestFiles: true and with maxInstances>1 in conf.js.

igniteram commented 7 years ago

Apologies for the late reply, yes it is possible to create consolidated reports when you are using multiCapablities or sharding your tests.

You can make use of cucumber's custom formatters, If you use json formatter it would generate individual json files for each feature , In your case on for Chrome and other for IE. protractor-cucumber-framework generates a unique PID for each of these files. More details you could find here - multiCapabilties protractor

Now, you can use any html to json reporter to generate html reports. I hope this helps you out!

igniteram commented 7 years ago

Since this is for a specific scenario & more of a support question, closing this issue. You could also raise a PR to add this example in this repo!

Balajiiguru commented 7 years ago

Hi Ram,Thanks a lot for the update.I gave a try on implementing cucumber's custom formatters but not able to succeed in using those geneated JSON for HTML generation.It would be really helpful if you add an example for the multi capabilities report generation.