liveBook · Manning

Tagging

As explained in BDD in Action, Second Edition

A tag is a label attached to a requirement or other item to support classification, organization, and reporting.

A requirement can belong to several concerns at once. A password requirement may support both joining a frequent-flyer program and keeping client data secure. Tags preserve the main parent–child hierarchy while recording these additional relationships. section 5.2.6

A tag is a label attached to a requirement, feature, scenario, or example table. Teams use tags to classify items, add context, filter reports, and control which automated tests run. section 7.4.7

Useful tagging dimensions include:

  • Cross-functional concerns such as security, performance, or other nonfunctional requirements. section 16.5.2
  • Technical areas such as UI tests, batch processing, components, or modules. section 7.4
  • Business importance, issue references, and links to external tracking systems. section 7.4.7
  • Release or iteration scope, allowing teams to focus reports and acceptance-test runs on planned work. section 16.5.3

Filtering a release

A scenario tagged @release:iteration-1 can be included in a dedicated acceptance-test batch or release report. A separate @ui tag can identify scenarios that should run with other web tests. section 7.4.7 section 16.5.3

Feature: Signing up to the Frequent Flyer program
 
  @component:authentication
  Scenario: Users can sign up online
 
  @component:accounts
  Scenario: Users can request credits for flights completed in the past three 
            months

Component tags show how scenarios can be grouped independently of the feature hierarchy. section 7.4.7

How BDD in Action, Second Edition covers it

How deep it goes
Explains tagging across requirements, features, scenarios, and examples, including categorization, filtering, reporting, and issue links.
Examples
Uses security, UI, component, issue, importance, and release-iteration tags on features, scenarios, and example tables.
What it assumes
Assumes feature and scenario organization, while defining tags as an alternative to relying only on parent–child relationships.
What you can do after
Apply it via Gherkin tags to organize scenarios, filter reports, select test runs, and connect requirements with tracked issues.
How it connects
Connects requirements hierarchy, cross-functional requirements, executable specifications, living documentation, acceptance testing, and issue tracking.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of BDD in Action, Second Edition. The section links point to the parts of the book it draws on.