Overview

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
Traditional documentation
WIMP documentation
WIMP documentation
Customer domain documentation
Customer domain documentation
Links across folder hierarchy
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

FAQ

Why shouldn’t we create one feature file for every user story?Because user stories are delivery planning tools, not the best long-term structure for living documentation. Organizing feature files by story makes the documentation reflect the order of delivery instead of the product’s coherent functionality. A better approach is to organize by stable business behavior, which is easier to navigate and maintain.
What should feature files be organized around instead of user stories?Feature files should be organized around coherent functionality or business capabilities. That gives the documentation stability, because the business behavior changes less often than stories do, and it makes the files easier for readers to understand and browse.
Why was the “Don’t offer pay-on-collection for restricted customers” rule moved out of the blocklisting feature?Because it belongs to a different concern. Blocklisting is about identifying unreliable customers, while denying pay-on-collection is a strategy for dealing with those customers. Keeping those concerns separate makes the documentation clearer and more adaptable when either area changes.
How should we decide when to split feature files?Split them when they represent different business concerns or different capabilities that should evolve independently. If one part of the file is really about a separate feature, moving it into its own file improves separation of concerns and keeps each file focused.
What is a glossary for in BDD documentation?A glossary records the meaning of domain terms used in the feature files. It helps everyone share the same understanding of words like customer-collection, pay-on-collection, blocklist, and even tags such as @manual. This makes the documentation easier to read and keeps terminology consistent.
Should Gherkin tags be documented?Yes. Tags are part of the documentation because they carry meaning for readers and for the team’s process. If tags such as @manual or @journey are used, their purpose should be explained in the glossary or another shared place so everyone understands them.
What does the @manual tag mean?The @manual tag indicates that a scenario will be verified manually and excluded from automated test execution. It is not a built-in Gherkin tag; it is a team-defined convention that should be documented so all stakeholders understand it.
Why are journey scenarios different from illustrative scenarios?Illustrative scenarios focus on a single business rule, while journey scenarios document a broader user path across multiple behaviors. Journey scenarios help show the big picture and core business process, but they are less focused and should be used sparingly.
How should journey scenarios be formatted in Gherkin?Journey scenarios often use the @journey tag and can use asterisks instead of Given/When/Then keywords to keep them concise. This makes them look and read differently from focused illustrative scenarios and emphasizes that they serve a different purpose.
How should documentation be structured for different audiences?Documentation should be organized so each audience can quickly find what matters to them. That may mean using folders, separate top-level sections, or tags to distinguish business-facing documentation from API or technical documentation. The goal is to make the information relevant and easy to navigate for each stakeholder group.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Effective Behavior-Driven Development Effective Behavior-Driven Development ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Effective Behavior-Driven Development Effective Behavior-Driven Development ebook for free