Chapter 5Expressive Scenarios

In Chapter 3, Gherkin Basics, we deliberately didn’t give you the whole story and showed you just a core set of keywords instead. They’re the fundamental building blocks you need to get started working with Cucumber, and we wanted to get you started as quickly as possible. Now it’s time to refine your skills.

When you’re writing Cucumber features, make readability your main goal. Otherwise, a reader can easily feel more like they’re reading a computer program than a specification document, which is something we want you to try to avoid at all costs. After all, if your features aren’t easy for nonprogrammers to read, you might as well just be writing your tests in plain old Ruby code.

The real key to expressive ...

Get The Cucumber Book, 2nd Edition 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.