What We Just Learned

Congratulations, you’ve graduated from Gherkin school! Let’s look back over what we’ve learned in this chapter.

  • Readability should be your number-one goal when writing Gherkin features. Always try to sit together with a stakeholder when you write your scenarios, or at the very least pass them over for feedback once you’ve written them. Keep fine-tuning the language in your scenarios to make them more readable.

  • Use a Background to factor out repeated steps from a feature and to help tell a story.

  • Repetitive scenarios can be collapsed into a Scenario Outline.

  • Steps can be extended with multiline strings or data tables.

  • You can organize features into subfolders, like chapters in a book.

  • Tags allow you to mark up scenarios ...

Get The Cucumber Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.