Which options supply repeatable fixtures without copying production customer records?
Decide which values to generate, how to create related database records and who owns the database instance. Faker, Prisma and Testcontainers address different parts of that job. Teams can combine them when the boundary between previews is explicit.
Start two previews with the same business case
Create a synthetic customer with an open invoice and two completed orders. Use the same logical case in both preview environments. Change the first invoice in preview A, then query preview B. Keep IDs and timestamps stable where the test depends on them and isolate physical state by preview.
| Option | Role in the design | Failure to look for |
|---|---|---|
| Faker | Seeded generation supplies fictional field values. | Does a library upgrade unexpectedly change the values a test relies on? |
| Prisma seed scripts | Application-owned code writes a known set of related records. | Does running the seed twice duplicate records or overwrite another preview? |
| Testcontainers | Disposable containers supply an isolated database or service for a test. | Is each preview using its own instance, and is that instance removed afterwards? |
Reset one preview while the other is busy
Ask the operator to reset A midway through a run on B. Verify the untouched invoice and order count in B. Record the seed version, reset procedure, owner and cleanup time after the pull request closes. Pin tool versions if reproducing generated values matters.