When scenarios share a database, one scenario’s changes can interfere with another’s. Exclusive data partitions keep those changes separate by assigning each scenario data that others cannot see, often through uniquely named entities. section 18.1
Consider this approach when:
- The service has natural ways to separate its data, and scenarios can use their own partition. section 18.1
- The domain has hidden dependencies that could cross partitions; finding safe boundaries requires detailed analysis and planning. section 18.1
- A shared resource is freely used by developers, testers, or build agents, making other isolation strategies unavailable. section 18.1
Customer orders and restaurant workflows
For scenarios about one customer’s orders, create a new customer for each scenario; customers cannot see one another’s orders. That partition does not isolate restaurant scenarios handling menus or kitchen workflows, which may also conflict with customer scenarios. section 18.1
Figure 18.1 Conflicting modifications when running tests in parallel using a shared database

See how parallel changes to a shared database can conflict—the problem exclusive partitions aim to prevent. section 18.1
