Steppify out there

Like Codeception Gherkin support, but the opposite.

The problem

Following the principle of “scratching an itch” I’ve started working on the steppify command to make my life easier.
I was thrilled by Codeception support of Gherkin but quickly found myself in the same spot I’ve found myself when using Behat, Cucumber or other behaviour-driven development tools: the place where adding a step, something anyone can write, requires a developer to implement it and if the person writing scenario steps is not a developer there is a metric ton of code duplication on the horizon.
Modern IDEs will offer auto-completion for existing BDD steps but an empty starting dictionary calls for an exploding and redundant proliferation of steps when “I am on page”, “I visit page”, “Go on page” and “Set URL” start to pop-up.
Codeception, a developer tool, allows developers to extend it using modules and sets an excellent example with cest and cept test classes using a default actor variable name of $I and ablative method names like:


While Codeception offers a command to generate snippets for non implemented scenario steps the Steppify command aims to do the opposite generating step implementations, or at least an acceptable first draft, from existing Codeception modules.

Good enough

I’ve packed my solution in a Codeception command and put that on GitHub.
The README pretty much covers it all and I will cover it more in a future post.