Generate Gherkin (or even JS Classes)


I have just discovered this amazing tool. As I look at the examples it occurs to me that the exported JSON could be used to generate Gherkin specs. Given … When …Then …

Has anyone gone down that path?

And, of course, the possibility of scaffolding a JS Class. I am currently playing with a microservice architecture on the front end in JS so each microservice could start life as a state chart and output to a Gherkin spec + Class scaffold. The starting state would always be “waiting for a message” then the internal states in response to a message on that one chart would map to the Class methods which would be stubs that might emit outbound messages.

Just thinking out loud. Exciting prospects, me thinks!

Anyone else thinking this way?

Thanks again,