Keep your scenarios BRIEF
Over the years that we have been using Gherkin, our approach to writing scenarios has evolved. Because Gherkin is very close to natural language it's very easy to learn, but just like writing reports or stories, it takes practice to do it well. There are three main goals that we try to keep in mind when writing scenarios:
- Scenarios should be thought of as documentation, rather than tests.
- Scenarios should enable collaboration between business and delivery, not prevent it.
- Scenarios should support the evolution of the product, rather than obstruct it.
The following six principles work together to support these goals. To make them easier to remember, we've arranged it so that the first letter of each principle makes up an acronym, BRIEF, which is itself the sixth principle.