rmpestano / cukedoctor

BDD living documentation using Cucumber and Asciidoctor: https://goo.gl/Yp3NiU
https://rmpestano.github.io/cukedoctor/
Apache License 2.0
123 stars 23 forks source link

Upgrade to cucumber-messages #160

Open andrewesweet opened 4 years ago

andrewesweet commented 4 years ago

Cucumber JSON for matter is deprecated in three of the five language implementations. The replacement is https://github.com/cucumber/cucumber/tree/master/messages. There are utilities to converter messages <-> JSON for testing, but not recommended for “live” use.

rmpestano commented 4 years ago

Hi @andrewesweet, will it work with previous cucumber versions? Do you have an example for cucumber-jvm?

Thanks

andrewesweet commented 4 years ago

Hi @rmpestano ! To my understanding, the cucumber-messages approach will not be back-ported.

I see two choices. One is to support two conversion channels for both JSON and messages directly into cukedoctor’s model. The second is JSON -> messages -> cukedoctor. One of the utilities I referenced converts JSON -> messages, so could be used fir this purpose, but it does not appear to be recommended for this case.

I don’t think this is an urgent need. Cucumber-Jvm, for example, states that JSON /may/ be removed in the future. However, I should think that new features (e.g. Gherkin “Rule” support) would appear in messages only.

rmpestano commented 4 years ago

I see, good to know. Let's keep this issue open then. Thanks!

PS: I'm releasing a new version today with the Asciidoctor version update, as there's no changes in the API it will be a minor release (v3.2)

sashokbg commented 3 years ago

Hello @andrewesweet @rmpestano , I would like to start working on a new feature, allowing support of "Rules" keyword and it seems that the messages format is a requirement for it. Is there any progress on this issue ?

andrewesweet commented 3 years ago

Not from me.

sashokbg commented 3 years ago

I have started looking how to make this work and it seems there is already a model that is defined by cucumber.io ->

I think it may be possible to rework cukedoctor's current model to extend the one used by cucumber.io. What are your thoughts on it ?

andrewesweet commented 3 years ago

You're referring to https://github.com/cucumber/messages-java, yes? I'm in favour of this.

Another question is one of back/compatibility. I assume we want to maintain it. One approach would be to write logic to take an instance of the existing object model decoded from JSON and build an instance of the messages object model.

sashokbg commented 3 years ago

For now I am only concentrating myself on the messages and will think about backwards compatibility later.

Regarding the message protocol, I hit a rock - there seems to be now Java parser implementation (only writer) and the ndjson to json formatter is written in go.

I have posted a message on the cucumber project asking for help on their side.

https://github.com/cucumber/common/issues/1623

I will keep you posted

fabien7474 commented 2 years ago

Any update on this issue ?

sashokbg commented 2 years ago

Hello @fabien7474 me personally I ended up using the official html generator based on react: https://github.com/cucumber/react-components