liveBook · Manning

Essential principle

As explained in Effective Behavior-Driven Development

A scenario-writing principle that removes details that do not contribute directly to illustrating the behavior of a rule.

The essential principle keeps a scenario focused on the behavior of a rule: remove any detail that does not help readers understand that behavior. Ask of each context step, “Does the reader need this to understand the logic?” If not, omit it; it may belong in the implicit context instead. section 8.3.4

An empty-basket checkout rule

A scenario about preventing checkout with an empty basket does not need steps that add items to the basket. Those details do not affect the rule being illustrated. Including them can make the scenario harder to understand and brittle when unrelated rules change. section 8.3.4

Automation may still need incidental values. Keep the scenario focused, and arrange for automation code to access those values when needed rather than making them part of the behavior being described. section 14.0

Table 7.1 BRIEF principles of formulating scenarios
Initial
Principle
Summary
B
Business language
Business terminology aids cross-discipline collaboration
R
Real Data
Using actual data helps reveal assumptions and edge cases
I
Intention revealing
Describe the desired outcomes rather than the mechanism of how they are achieved
E
Essential
Omit any information that doesn’t directly illustrate behavior
F
Focused
Each scenario should only illustrate a single rule
 
Brief
Shorter scenarios are easier to read, understand and maintain

See how Essential fits among the other BRIEF principles for formulating scenarios. section 7.2.2

How Effective Behavior-Driven Development covers it

How deep it goes
Defines incidental details, gives a relevance question, and explains their costs for comprehension and maintenance.
Examples
Uses an empty-basket checkout rule to show why adding basket items is irrelevant context.
What you can do after
Evaluate scenarios by checking whether each detail is needed to understand the illustrated rule.
How it connects
Connects scenario writing with BRIEF principles, focused scenarios, implicit context, and test-data management.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Behavior-Driven Development. The section links point to the parts of the book it draws on.