Menu

1 / 2

Generate realistic test data files in one command (CSV, JSON, NDJSON)

DEV Community: node·Manoj Kumar Kengudelu·about 17 hours ago
#4uRDwwxi
#devtonodejs#devto#dev#fullscreen#faker
Reading 0:00
15s threshold

Every time I needed a CSV of fake users for an import test or a Postman/Newman data-driven run, I ended up writing the same throwaway Faker script. So I turned it into a CLI: csv-faker-generator .

One command, no script

npx csv-faker-generator -c 'id:uuid,name:name,email:email,plan:pick:free|pro|team' -r 3 -o users.csv

Enter fullscreen mode

Exit fullscreen mode

id,name,email,plan 5fb9220d-9b0f-4d32-a248-6492457c3890,Miss Arlene Wintheiser,[email protected],free a4882fcf-e9e1-4305-a64d-5482c1fc30db,Mr. Ben Buckridge,[email protected],pro 1bc8c786-010a-458e-b36c-3142ecadc2e8,Erik Farrell,[email protected],pro

Enter fullscreen mode

Exit fullscreen mode

Columns are header:type . There are 27 types: names, emails, addresses, IBAN/BIC, IPs, UUIDs, numbers, dates, and more.

What's new in 2.2

Reproducible data with --seed .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.