Skip to content

Deprecate JSON formatter #1249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aslakhellesoy opened this issue Oct 31, 2019 · 1 comment · Fixed by #1299
Closed

Deprecate JSON formatter #1249

aslakhellesoy opened this issue Oct 31, 2019 · 1 comment · Fixed by #1299
Labels
💔 breaking change This will require a major release
Milestone

Comments

@aslakhellesoy
Copy link
Contributor

aslakhellesoy commented Oct 31, 2019

The JSON formatter is implemented in cucumber.js, cucumber-ruby and cucumber-jvm. It's become the defacto standard for machine-readable output from Cucumber, but it has several flaws:

  • There is no schema for the output, so different platforms implement it inconsistently, causing problems for consumers
  • It sometimes causes out of memory problems for large suites
  • It does a poor job at representing results for background and scenario outlines
  • Results cannot be consumed until Cucumber has finished

We should deprecate this in version 7 and encourage users and tool vendors to migrate to a new protobuf formatter outputting cucumber-messages.

The protobuf formatter addresses all of the problems with the json formatter:

  • There is a strict schema documented here.
  • It's a streaming protocol, so large memory consumption is less likely to be a problem
  • It separates results from the AST and does a better job at representing results for backgrounds and scenario outlines
  • Results can be consumed before Cucumber finishes (useful for slow suites)

See a89eae3 for more details.

@aslakhellesoy aslakhellesoy added the 💔 breaking change This will require a major release label Oct 31, 2019
@aslakhellesoy aslakhellesoy added this to the 7.0.0 milestone Oct 31, 2019
@RusmanCool
Copy link

@aslakhellesoy "cucumber-messages." link is not working anymore. Also, how will the proposed solution work with a tool like "cucumber-html-reporter"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💔 breaking change This will require a major release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants