liveBook · Manning

Concrete data

As explained in Effective Behavior-Driven Development

Concrete values representing the entities, states, or inputs involved in a scenario rather than abstract placeholders or general description.

Concrete data gives an example the specific details needed to show a business rule. Include details that affect the behavior being illustrated, not every fact about the situation. For a pizza delivery-address change, the pizza type and payment status are unnecessary if they do not affect the address change. section 3.2

To keep examples clear:

  • Start with actual data when it helps reveal assumptions or edge cases. Then ask whether changing it would change the behavior; if not, use a more general description. section 7.6
  • Ask for concrete examples when discussion gets abstract, and challenge the details with positive and negative cases or other possible outcomes. section 2.6.6
Listing 7.6 Fifth edit – remove inessential real data
Scenario: Unauthenticated customer chooses to pay on collection
  Given the customer has 1 item in their basket
  Given the customer's basket is not empty
  And they have chosen to collect their order
  When they proceed to payment instructions
  Then they should be able to choose to pay on collection

This checkout scenario shows how an item count and a nonempty-basket statement can be redundant when the payment step already implies the basket is not empty. section 7.6

How Effective Behavior-Driven Development covers it

How deep it goes
Applies a behavior-change check to distinguish essential details from incidental ones.
Examples
Uses pizza-order details, basket contents, and geospatial coordinates to contrast relevant and distracting data.
What you can do after
Evaluate whether scenario details affect behavior, then retain relevant values and generalize incidental ones.
How it connects
Ties concrete data to examples, business rules, scenarios, and Example Mapping workshops.

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.