I am trying to use JsonFormatter
to generate cucumber Json reports with new cucumber 2.0 rc7 but not able to succeed, I understand that it is a child class of Formatter which is exported as a default class.
I could not find any examples in the doc section as well. An example would definitely help the users on how to use/require different formatters with new version.
Thanks,
I used a module : cucumber html reporter https://www.npmjs.com/package/cucumber-html-reporter. Don't know if it's what you're looking for :$
@emy14 I have been using that module but it generates Json reports by passing cucumber command line option -f <JSON:path>
. I want to use JsonFormatter class of cucumber2.0 rc7 and invoke it in my code to generate json reports, thanks for replying though!
@charlierudolph Your insights would help here!
The JsonFormatter
is not currently exposed. It could easily be though. I believe it would just need an update in https://github.com/cucumber/cucumber-js/blob/998e81d9de63c0e73bd5fa496432626557501338/src/index.js. Should be exported in a very similar way to the SummaryFormatter is you'd like to send a PR
@charlierudolph Thanks for the confirmation and the commit :+1: would there be a patch release soon?
Yep I'll try and release today. I'll comment here when it's released
Fix released in v2.0.0-rc.8
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@emy14 I have been using that module but it generates Json reports by passing cucumber command line option
-f <JSON:path>
. I want to use JsonFormatter class of cucumber2.0 rc7 and invoke it in my code to generate json reports, thanks for replying though!@charlierudolph Your insights would help here!