damianszczepanik / cucumber-reporting

HTML reports for Cucumber
GNU Lesser General Public License v2.1
546 stars 402 forks source link

Support for message format (ndjson) produced by cucumber #1027

Open bhreinb opened 3 years ago

bhreinb commented 3 years ago

Hi there,

The cucumber framework produces a number of reports at the end of a test run which are listed here (https://cucumber.io/docs/cucumber/reporting/#built-in-reporter-plugins)

- message
- progress
- pretty
- html
- json
- rerun
- junit
- testng

The output of the json formatter is used to generate the nice html reports that come with this library. Unfortunately though that formatter is been deprecated

The built-in JSON formatter is deprecated and will be removed in a future release.

and the recommendation from cucumber is to upgrade libraries that currently use the output of the json formatter to use the ndjson file generated by the message formatter.

I imagine this to be a major change to the codebase but I'm wondering is their an intention to upgrade this library to support the ndjson file generated by the message formatter. Many thanks in advance and for the great library.

damianszczepanik commented 3 years ago

Don't have plan for that but will be happy to accept PR for that

bhreinb commented 3 years ago

I don't have capacity to take on this task atm however I could be open to doing this at a later point. I doubt a single PR will complete this activity namely I suspect multiple will be required as this is quite a big change.

I got some clarity from cucumber with regards the json formatter in that it won't be removed but it will go into maintenance mode hence the information per this link(https://cucumber.io/docs/cucumber/reporting/#built-in-reporter-plugins) has been updated since I originally created the GitHub issue.

prasanmgc commented 2 years ago

Hi @damianszczepanik , @bhreinb ,

I am currently using multiple cucumber html report and it uses json formatter. Json Formatter is unable to handle large json file. So the only option is to run the tests in smaller chunks.

Did you guys figured out a way to use ndjson for generating HTML report?

nayanab123 commented 3 months ago

Hi @damianszczepanik , Has there been any change in this matter of supporting ndjson reports?

Why I'm interested in this: I'm working on an enhancement to my test suite for which the cucumber message formatter is more suitable than Json formatter. I've been using this tool to generate reports from json for some time now so I wanted to check if it would work with ndjson in the future.

Alternatives I've tried out: I've tried to convert ndjson to json using the standalone cucumber json-formatter and use that result to generate the HTML report. However there is a hiccup with this method as well, since, the converter does not include the start timestamps for testcases in the json, which causes the report generation to fail in case of reruns where there are multiple json files to be combined.