What We Just Learned
Let’s review what we’ve talked about in this chapter:
-
We saw how the core Gherkin keywords Feature, Scenario, Given, When, and Then can be used to describe the behavior your stakeholders want as concrete 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access