Automating a scenario is more than replacing a manual test. In behavior-driven development (BDD), a team first discovers examples of the behavior it needs, turns them into business-readable scenarios, and checks that those scenarios express what stakeholders expect. Automation then adds code that runs the scenarios as tests. section 1.3 section 4.1
For each story, the working sequence is:
- Formulate and review scenarios before implementation, using business terminology the team and stakeholders understand. section 4.1
- Automate a scenario first, then write production code to make the failing scenario pass. Continue until the story’s scenarios pass. section 4.8
- Run the scenarios as the software changes. Passing tests help verify that the documented behavior still matches the implementation; supplementary testing remains necessary. section 1.3 section 4.8
Collaboration matters as much as executable code. Scenarios written by a test team alone can read like manual test scripts rather than shared specifications. Automating them only after implementation also loses their chance to guide development. An automation library built separately from production code can encourage low-level steps such as filling text boxes and clicking buttons, making scenarios slow and brittle. section 1.4.3
Changing existing behavior
Before modifying an area of an existing codebase, a team can recover and document its current behavior. Discovery produces an example map, formulation produces business-readable scenarios, and automation uses those scenarios to guide implementation of the new behavior. section 11.2.1
The result is living documentation: scenarios that people can read and tests that signal when implementation diverges from the behavior they describe. Keeping that value requires attention to code quality, not just a collection of passing tests. section 1.7 section 1.6.4






















