Search code examples
bddagilespecflowuser-stories

Should User Stories be written in Gerkhin format?


We write user stories in the standard prescribed As a X I want to Y so that Z. Now with the popularity of BDD and Gerkhin language format for specifying requirements, does anybody has experience in switching their user stories into gerkhin format. Have you found it easier and intuitive to elicit requirements from the business in this format, and have you experienced any benefits in doing so?


Solution

  • You still start each feature with As an X I want a Y so that Z in Gherkin. However this is commonly turned around so that its benefit is its most prominent aspect, e.g. from https://github.com/cucumber/cucumber/wiki/Gherkin

    Feature: Some terse yet descriptive text of what is desired
     In order to realize a named business value /*Z*/
     As an explicit system actor /*X*/
     I want to gain some beneficial outcome which furthers the goal /*Y*/
    

    Once you’ve completed this section the rest of the Gherkin feature is the more recognisable Given When Then section, but these are simply examples that highlight the functionality of your feature. They exist with your feature definition, not instead of it.

    For more details have a good read through http://dannorth.net/introducing-bdd/