Test numbers
One column for each kind of number a form or an import checks, every value with a correct check digit.
en-US 1 table 100 rows CSV
Card numbers come only from the test numbers payment providers publish, so none of them is a real card. Every EAN starts with 952, which GS1 sets aside for examples. The account, routing, book, phone and vehicle numbers can match real ones, so keep the file in test systems.
Use it where an application must take a valid number. Numbers that should be refused is the same table with broken check digits mixed in.
The recipe
# A hundred rows of numbers with correct check digits, one kind to a column.
#
# Card numbers come only from the test numbers payment providers publish, and
# every EAN starts with 952, which GS1 sets aside for examples. The account,
# routing, book, phone and vehicle numbers can match real ones, so keep the file
# in test systems.
#
# qadg generate test-numbers.yaml
#
# writes number.csv and run-note.json. The same seed gives the same rows on
# every machine.
version: "0.1"
seed: "test-numbers"
locale: en-US
entities:
number:
count: 100
fields:
card: { generator: card }
iban: { generator: iban }
aba: { generator: aba }
isbn: { generator: isbn }
ean: { generator: ean }
imei: { generator: imei }
vin: { generator: vin }
output:
format: csv
Run it
Save the recipe, then run this in the same folder. This is what the program printed for it.
$ qadg generate test-numbers.yaml number: 100 rows, 7 columns 1 table, 100 rows written
What it writes
number.csv
The first 5 of its 100 rows.
| card | iban | aba | isbn | ean | imei | vin |
|---|---|---|---|---|---|---|
| 5555555555554444 | PL69713389988509857129043856 | 097311168 | 9786714506250 | 9524611455819 | 009234433740236 | 4SXSN5RR1A8J59233 |
| 378282246310005 | PL17620166270994002914978784 | 126590009 | 9786841494246 | 9527746292960 | 007624785573171 | J4HMB5AE54F420277 |
| 371449635398431 | PL64701099339133150116535224 | 099203012 | 9786951875119 | 9529117660897 | 004641865284365 | BTMR4E6N7D1K69666 |
| 4242424242424242 | PL67677254949078109248233732 | 012018912 | 9786989672452 | 9524583904605 | 004217691699074 | 7GGCMR9A8XYB50336 |
| 378282246310005 | PL35176801508706803163910670 | 013363271 | 9786753816143 | 9527054987527 | 006802528506259 | EWRPC1E91SMK72776 |
run-note.json
The seed, the locale and the versions behind the run, and every table it wrote with its rows and columns.