Skip to content
toolbelt
Back to Guides

Fixtures That Come Back the Same Every Time

By ·

Updated

Random test data is useless when a test fails at 3am. A seed makes it reproducible, which is the whole point.

What is this tool?

Mock data is synthetic records that look real enough to exercise code: names, emails, ids, dates.

How it works

You describe fields as name:type pairs. A seeded pseudo-random generator drives every choice, so the same seed always produces identical rows. Change the seed and you get a different but equally valid set.

Example

id:uuid, name:name, email:email, age:int

becomes

[{"id":"3f9c...","name":"Grace Hopper","email":"grace.hopper@example.com","age":437}]

When to use it

Filling a table while the backend is still being written. Creating a fixture for a failing test. Producing a sample payload for documentation.

Optimization Tips

Commit the seed next to any test that depends on the fixture. If a test starts failing because the data changed, the seed was not recorded. And use a small row count — five rows is enough to prove a table renders.

Frequently Asked Questions

Why is the output identical every run?
Because the generator is seeded from your value. Change the seed for different data.
Can it produce nonsense values?
Yes — ages over 100, for instance. Treat it as shape data, not domain data.
How do I nest?
Braces for objects: address:{city:city}. Brackets for arrays: tags:[word].
Is anything uploaded?
No, generation happens in the page.

Ready to try it out?

Put this knowledge into practice with our free tool.

Go to Tool

Related tools