cukedoctor
cukedoctor copied to clipboard
Upgrade to cucumber-messages
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.
Hi @andrewesweet, will it work with previous cucumber versions? Do you have an example for cucumber-jvm?
Thanks
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.
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)
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 ?
Not from me.
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 ?
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.
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
Any update on this issue ?
Hello @fabien7474 me personally I ended up using the official html generator based on react: https://github.com/cucumber/react-components