liveBook · Manning

Sequential processing

As explained in Effective Behavior-Driven Development

Executing scenarios sequentially rather than concurrently against a service.

When scenarios update the same service at the same time, one scenario’s changes can disrupt another’s results. Sequential processing runs scenarios one at a time for that service, avoiding this form of interference. section 18.1

Two scenarios, one pizza menu

If two scenarios modify the pizza menu in parallel, their changes can produce flaky results. Running those scenarios sequentially prevents them from interfering while they execute. section 18.1

Use sequential processing as an isolation trade-off:

  • Disable parallel execution for scenarios that depend on the shared service, while allowing unrelated scenarios to run in parallel where possible. section 18.1
  • Expect slower feedback when more scenarios must run sequentially. This strategy does not ensure repeatable results: persistent service state can still affect later scenarios. Resetting to a baseline or using exclusive data partitions can address that separate problem. section 18.1 section 18.7
Figure 18.1 Conflicting modifications when running tests in parallel using a shared database

Shows how parallel scenarios can make conflicting changes to a shared database. section 18.1

How Effective Behavior-Driven Development covers it

How deep it goes
Compares selective and broad restrictions on parallel execution, noting the feedback-speed trade-off without specifying implementation steps.
Examples
Illustrates parallel interference with two scenarios modifying a pizza menu and identifies serial execution as the chosen strategy for WIMP.
What you can do after
Apply serial execution selectively to scenarios that share a service, while recognizing its cost to parallel feedback.
How it connects
Connects scenario isolation with parallel execution, resource pooling, exclusive data partitions, and repeatability.

Also explained in

Compare how 11 books explain sequential processing →

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.