cucumber-rs / cucumber

Cucumber testing framework for Rust. Fully native, no external test runners or dependencies.
https://cucumber-rs.github.io/cucumber/main
Apache License 2.0
580 stars 70 forks source link

Cucumber Messages protocol #169

Open tyranron opened 2 years ago

tyranron commented 2 years ago

Revealed from https://github.com/cucumber-rs/gherkin/discussions/28#discussion-3257377

Cucumber Messages is a message protocol for representing results and other information from Cucumber - Replaces json and junit formatters.

Stability/Performance:

With Cucumber Messages, several messages containing smaller pieces of information are emitted continuously to a stream, avoiding high memory consumption and enabling real-time processing of results.

Additional functionality (motivation):

The protocol aims to decouple various components of the Cucumber platform so that:

  • Each component only needs to know about a subset of messages
  • Gherkin is decoupled from the Cucumber execution component

    • This is part of a strategy to support other formats such as Markdown and Excel

@ilslv what do you think about this? We have the similar thing in our implementation, but hand-baked. Should we support it as a bare-bone of our implementation, or rather have just yet another Writer for it?

ilslv commented 2 years ago

@tyranron from what I can tell, we can easily support this with another Writer implementation, as we generate a lot more events, than just Test(Case/Step)(Started/Finished). Those additional events allow us to skip some parsing stuff, like we don't have to count finished Scenarios for particular Feature to be sure, that it's finished. We can just wait for the event::Feature::Finished.

But I would hold on implementing this feature for couple of reasons:

My proposal is to wait until more tools will support it or until users of this library will actually ask for it.

tyranron commented 2 years ago

@ilslv

My proposal is to wait until more tools will support it or until users of this library will actually ask for it.

Or there will be a demand from library users for it.