Example 1: JSON for API seeding (3 rows)
Paste directly into curl -X POST -d @users.json or import into a Jest beforeEach.
[
{
"name": "Linda Park",
"email": "linda.park@example.com",
"city": "Austin",
"job": "Engineering Manager",
"age": 38,
"createdAt": "2024-01-15T09:32:11Z"
},
{
"name": "Marcus Reed",
"email": "marcus.reed@example.com",
"city": "Lisbon",
"job": "Product Designer",
"age": 29,
"createdAt": "2024-02-03T14:08:55Z"
},
{
"name": "Ana Kowalski",
"email": "ana.kowalski@example.com",
"city": "Warsaw",
"job": "Data Scientist",
"age": 34,
"createdAt": "2024-03-19T17:44:02Z"
}
]Example 2: CSV for Postgres COPY
Download as users.csv, then \copy users (name, email, city) FROM 'users.csv' CSV HEADER;
name,email,city
Linda Park,linda.park@example.com,Austin
Marcus Reed,marcus.reed@example.com,Lisbon
Ana Kowalski,ana.kowalski@example.com,Warsaw
Example 3: Generate 1000 rows for a load test
Use the generated JSON to drive k6, Artillery, or a simple bash loop — varied payloads catch the cache-poisoning, parameter-injection, and unicode-handling bugs that identical fixtures hide.
# k6 script
import http from 'k6/http';
import { check } from 'k6';
const users = JSON.parse(open('./users.json'));
export default function () {
const u = users[Math.floor(Math.random() * users.length)];
const r = http.post('http://app/users',
JSON.stringify(u),
{ headers: { 'Content-Type': 'application/json' } });
check(r, { 'status is 201': (r) => r.status === 201 });
}