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

test-numbers.yaml
# 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.

terminal
$ 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.

cardibanabaisbneanimeivin
5555555555554444PL69713389988509857129043856097311168978671450625095246114558190092344337402364SXSN5RR1A8J59233
378282246310005PL1762016627099400291497878412659000997868414942469527746292960007624785573171J4HMB5AE54F420277
371449635398431PL6470109933913315011653522409920301297869518751199529117660897004641865284365BTMR4E6N7D1K69666
4242424242424242PL67677254949078109248233732012018912978698967245295245839046050042176916990747GGCMR9A8XYB50336
378282246310005PL3517680150870680316391067001336327197867538161439527054987527006802528506259EWRPC1E91SMK72776

run-note.json

The seed, the locale and the versions behind the run, and every table it wrote with its rows and columns.