Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 666 Bytes

json-formatter.md

File metadata and controls

18 lines (13 loc) · 666 Bytes

← Back to documentation

JSON formatter

JSON reports are natively supported through configuration. This is sufficient for almost everyone and you should think twice before reading any further. You do however have the option to manually convert messages into JSON reports using the following executable. The JSON formatter consumes messages from stdin and outputs its report to stdout, like shown below.

$ npx cucumber-json-formatter < cucumber-messages.ndjson
{
  ...
}

Alternatively you can redirect the output to a new file.

$ npx cucumber-json-formatter < cucumber-messages.ndjson > cucumber-report.json