Business analysis glossary
Gherkin (Given/When/Then)
What it is
Gherkin is a plain-language format for writing examples of behaviour with the keywords Given (starting situation), When (action) and Then (expected result). It reads like English but is structured enough to be turned into automated tests. Each scenario focuses on one rule, and a set of scenarios together describes the feature, including unusual situations such as errors and limits.
Why it matters
It gives business people, developers and testers one shared, unambiguous way to describe behaviour. Scenarios double as living documentation. Because the format is shared, stakeholders can read the scenarios and correct the analyst before any code is written, and testers can reuse them directly.
Example
Given a customer has an overdue library book at Cedar Library, when they try to borrow another item, then the system declines the loan and shows the overdue message. Each scenario covers one rule and one outcome. Each scenario tests exactly one rule, so when one fails, the team immediately knows which rule is broken.