Fixtures That Come Back the Same Every Time
By toolbelt maintainers ·
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?
Can it produce nonsense values?
How do I nest?
Is anything uploaded?
Related tools
- UUID GeneratorGenerate cryptographically secure Version 4 (v4) UUIDs. Create batches of up to 100 unique identifiers at once, perfect for database primary keys or test data.
- Regex TesterTest regular expressions in real-time. See highlighted matches, named capture groups, exact character indexes, and test replacement strings with JavaScript flavors.
- Cron GeneratorExplain cron expressions in plain English and predict the next 5 run times. Validate syntax for Linux crontab or serverless schedulers before deploying jobs.
- Timestamp ConverterConvert Unix timestamps to human-readable dates and vice versa. Includes a live clock and automatically handles seconds or milliseconds for easy debugging.