Chapter 2. The specification layer and the automation layer

This chapter covers

  • Understanding an executable specification’s layers
  • Understanding the structure of those layers
  • Writing your first Given-When-Then scenarios
  • Exploring how the specification layer interacts with testing code

If you haven’t worked with Gherkin and specification by example (SBE) before, chapter 1 may have shown you your first Gherkin scenario (listing 1.1). We haven’t yet written a full Gherkin specification document together, though, and we’ll need more practical examples to do that.

Chapter 1 also talked about how conversations captured in Gherkin become automated tests and how automation keeps executable specifications up to date. But we didn’t discuss any details. ...

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.