Chapter 3. Mastering the Given-When-Then template

This chapter covers

  • Writing scenarios for the real world
  • Using realistic data in scenarios
  • Understanding advanced rules for using Given-When-Then
  • Getting unstuck when writing scenarios
  • Generating ideas for new scenarios

In chapter 2, we explored the two layers of executable specifications: the specification layer and the automation layer. We focused on the specification layer and writing it. But if you ever tried to write a blog post, you know that just writing and great writing aren’t the same thing. Likewise, writing scenarios and writing great scenarios can be quite different.

This chapter will teach you to write great scenarios. Chapter 2 taught you the basics of the Given-When-Then template, ...

Get Writing Great Specifications 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.