15 Quick Tips To Improve Your BDD Gherkin Writing

Make your Gherkin writing clearer with these tips.

David Rodenas PhD

--

In the previous article, I gave 5 tips that were quite advanced but also difficult to find or often overlooked for those who want to make a breakthrough in their skills:

This article focuses on the most basic aspects that we should consider. The ones that anyone should teach us the day we start writing Gherkin. So, let’s begin.

Use different sentences for Given-When-Then steps

A scenario is split into three stages: “Given”, “When”, and “Then”. Each one has its purpose, and often just the keyword is not enough to get the full picture, especially when you can use “And” without the keyword.

The example of “When” is a bit of a stretch, but it often happens more like the following one:

When we change the sentence to adapt to what we want to express, everything becomes more clear, and we can understand easier the example.

Do not act on “Given”

There is a tendency to prepare the scenario by doing several actions:

--

--

David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.