O'Reilly logo

Writing Great Specifications: Using Specification by Example and Gherkin by Kamil Nicieja

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required