liveBook · Manning

Query approach

As explained in Effective Behavior-Driven Development

A test data management approach that queries existing data to find suitable entities for tests.

Query test data management (TDM) finds suitable entities in an existing baseline: automation searches using criteria specified by a scenario. It suits services whose state automation cannot freely manipulate, provided a suitable query API is available. section 18.1 section 18.7

If the criteria cannot be satisfied, automation signals an error. Querying is more resilient to baseline changes than hardcoded IDs, but its reliability depends on the criteria and the baseline containing suitable entities. section 18.1 section 18.7

A populated baseline

A team can query a richly populated database baseline for entities that match a scenario’s needs. Such a baseline may come from an anonymized production snapshot or a curated dataset. section 18.1

How Effective Behavior-Driven Development covers it

How deep it goes
Defines criteria-based searching, query API requirements, failure when criteria cannot be met, and resilience trade-offs without implementation details.
Examples
Uses richly populated database baselines drawn from anonymized production snapshots or curated datasets.
What it assumes
Assumes an existing baseline, scenario-specific criteria, and a suitable query API for searching service entities.
What you can do after
Evaluate whether a service’s query API, baseline entities, and scenario criteria support reliable test-data selection.
How it connects
Connects test data management with baselines, snapshot baselines, and Insert and Hardcoded approaches.

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.