A team can agree on a behavior today and still lose that agreement when people change or the product evolves. Documentation records the shared understanding in language that business and delivery people can both read. Its job is to describe expected behavior clearly enough that future readers reach the same understanding—not to catalogue every possible test. section 6.6 section 7.2.1 section 1.3.6
Discovery uses examples to uncover rules and ambiguities. Formulation turns that understanding into business-readable scenarios. These scenarios are documentation first, even when automation later checks them against the system. If a check fails, the specification, the implementation, or both may need to change. section 1.3 section 6.6 section 7.2.1
Keep the record useful as the system changes:
- Use a shared business vocabulary and record evolving domain terms in a glossary. section 6.6 section 10.10
- Group rules and scenarios by coherent functionality. Rename, split, delete, or move feature files when the team's understanding changes. section 10.10 section 10.2
- Use illustrative scenarios to clarify individual rules and journey scenarios to show how multiple rules work together. Avoid making an illustrative scenario depend on unrelated behavior. section 6.6 section 7.2.1
Listing 10.4 New pay-on-collection feature file
*** Features/PayOnCollection.feature *** Feature: Customers can choose to pay on collection Rule: Customers can choose for customer-collection orders to be ➥ pay-on-collection Scenario: Customer chooses to pay on collection Rule: Don't offer pay-on-collection for restricted customers # Two scenarios merged, because authentication is incidental Scenario: Restricted customer is not offered pay-on-collection option
The pay-on-collection feature keeps two related rules together: offering that payment option and withholding it from restricted customers. Authentication was incidental to the restriction, so separate scenarios were merged. section 10.2
Gherkin is one possible format for these scenarios. It is tool-independent and can support automation, but a Gherkin file alone does not show that the team discovered and agreed on the behavior together. For an older system, start with functionality likely to change: recover what it does with help from people who know it, then formulate valuable scenarios rather than converting manual test scripts word for word. section 6.6 section 11.2.1 section 11.4















