O'Reilly logo

The Cucumber Book, 2nd Edition by Steve Tooke, Aslak Hellesoy, Matt Wynne

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

What We Just Learned

Let’s review what we’ve talked about in this chapter:

  • We saw how the Gherkin keywords Feature, Scenario, Given, When, and Then can be used to describe the behavior your stakeholders want as examples.

  • There is a fundamental pattern to each Gherkin scenario, with a context (Given), an event (When), and an outcome (Then).

  • Each scenario must be capable of being run on its own and should not depend on data set up by other scenarios. This means every scenario has to include enough Given steps to set up all the data it needs.

  • You can add descriptions and comments to your .feature files to turn them into useful documentation of your system.

  • Using the #language: header, you can write your features in different spoken languages. ...

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