10 Organizing the documentation
Good BDD documentation is not about producing the largest possible collection of feature files, but about creating a living record that is easy to read, maintain, and navigate. The text emphasizes that feature files should stay focused on coherent functionality rather than on the boundaries of user stories, because stories are planning tools while features describe enduring business behavior. As the product evolves, the documentation should evolve too, with teams being ready to split, rename, move, or delete feature files so they continue to reflect the current understanding of the domain.
The chapter also stresses that rules, scenarios, and tags all carry meaning and should be documented as part of the domain language. A glossary helps capture shared terminology and clarifies terms such as blocklist, customer-collection, pay-on-collection, and even team-defined tags like manual. Tags can be useful for grouping scenarios, indicating automation state, or recording external references, but they should be used sparingly and in ways that remain understandable to all stakeholders. Likewise, journey scenarios can provide a broader view of how users achieve goals, but they should remain a small, carefully chosen set because they are costlier to maintain and less focused than illustrative scenarios.
To make the documentation easy to use, the book recommends structuring feature files in a hierarchical folder system that reflects the business domain and supports both high-level browsing and detailed inspection. Shared capabilities should be documented once and referenced by dependency information rather than duplicated across multiple files. Finally, the documentation should be tailored to the needs of different audiences, such as internal business users or external API consumers, by organizing files and folders so each group can quickly find the information that matters to them. Overall, the chapter presents documentation as a flexible, evolving asset that should serve people first, tools second, and always stay aligned with the system’s real behavior.
Traditional documentation
WIMP documentation
Customer domain documentation
Links across folder hierarchy
Summary
- User stories are transient artefacts used to facilitate discussion, development, and delivery, not a core concept that persists in the system’s documentation
- Feature files provide stable, navigable documentation when each one documents an area of coherent functionality
- The team’s evolving understanding and usage of domain terms should be recorded in a glossary
- Gherkin tags are documentation that can be used to identify subsets of the scenarios
- Journey scenarios are can be useful to document how the system functions as a whole
- Leverage the file system to organize your documentation, keeping it easy to find information
- Feature files provide documentation that is understood by business people, but you may need to provide several feature files to satisfy diverse business perspectives
Effective Behavior-Driven Development ebook for free