Fixture

Start from the exact state you need.

Describe the relationships behind a test, then return to the same customers, orders and balances for each run.

Fixture / shop-api Design preview
Entity relationships
customers 1 row
cus_1012
orders 1 row
ord_1014
order_items 2 rows
item_04, item_05
discounts 1 row
WELCOME10

One customer owns the order. Both line items and the applied discount belong to it.

State definition

Discounted order

A saved checkout with two line items and a ten percent discount.

Dataset
discounted-order
Generator seed
0417
Target
shop_test
Customer email
Redacted
Follow a seeded order from its parent customer to its line items.

A thousand realistic names cannot reproduce one particular checkout. The order must belong to the right customer, contain the right lines and be ready for the next action.

Keep the seed receipt.

A dataset revision, seed and target identify the starting point. A receipt records what was written and which sensitive fields were replaced.

Fixture / shop-api Design preview
Scenario snapshot

discounted-order

seed 0417 / rev. 03
Relationships and privacy checks during the example database seed
Entity Rows Field Check
customers 1 email Masked
orders 1 customer_id Resolved
order_items 2 order_id Resolved
discounts 1 order_id Resolved
Replay fingerprint 9b6c47e2 Matches previous seed
A reproducible state has a definition and a record of the write.
Ownership
Each order references a customer in the same dataset. Generate dependent keys from their parent entities.
Repeatability
Pin the seed alongside the dataset revision. A seed alone cannot account for an edited definition.
Redaction
Substitute synthetic contact fields before the dataset reaches a shared test environment. Keep relationships intact across those substitutions.

How Fixture fits into the planned x1991 workspace.

Availability

In development

Release history

Fixture is in development. The interfaces use illustrative data. A public release date has yet to be announced.

Read the Fixture concept guide