liveBook · Manning

Insert approach

As explained in Effective Behavior-Driven Development

A test data management approach in which automation code creates the entities a scenario needs on demand.

The insert approach creates exactly the test data a scenario needs, on demand. It works when automation can freely manipulate the service’s state; shared services or restricted APIs may prevent it. section 18.1 section 18.7

Scenarios can add custom entities to a clean-start or seeded baseline, using hooks or explicit context steps. This reduces dependence on entities already present in the baseline, but does not by itself guarantee isolation between parallel scenarios. section 18.1 section 18.7

Figure 18.1 Conflicting modifications when running tests in parallel using a shared database

Illustrates how modifications can conflict when tests run in parallel against a shared database. section 18.1

How Effective Behavior-Driven Development covers it

How deep it goes
Defines the approach, notes service-access constraints, and contrasts it with query and hardcoded alternatives.
Examples
Uses scenarios that create custom entities needed to illustrate specific behavior.
What it assumes
Requires a service that automation can freely manipulate; restricted APIs or shared use may block insertion.
What you can do after
Operate/configure: have scenario automation create required entities when the service permits state manipulation.
How it connects
Connects test data management with clean-start and seeded baselines, query and hardcoded approaches, and test isolation.

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.