Skip to content
Course outline

Test data generator

Names, emails, dates, numbers and text that break careless code, each with the reason to try it, the same again with the same seed.

  • Free, no sign-up
  • Runs in your browser
  • Nothing you type is sent anywhere

Forms are often tested with "John Smith" and "test@test.com", and then a customer called Zoë O'Brien cannot sign up. Code breaks on the values nobody typed during testing: an accent, an apostrophe, a leap day, a number just past a limit, a name written right to left, an emoji.

Choose a kind of data, how many values you want and a seed. Each value comes with the reason it is worth a test. The same seed always gives the same values, so a test that failed can be run again with exactly the data that broke it. Download them as CSV or JSON for your tests.

Use the tool

The same seed gives the same values.

Test data
ValueWhy test it
Yusuf Linda plain name
Kwame Kowalskia plain name
José Satoaccents, an apostrophe or a hyphen
Kwame Smith-Jonesaccents, an apostrophe or a hyphen
Priya Haddada plain name
Omar Kowalskia plain name
Daniel Núñezaccents, an apostrophe or a hyphen
José Lindaccents, an apostrophe or a hyphen
Grace Ishikawaa plain name
Tomás Haddadaccents, an apostrophe or a hyphen

How the method works

Edge values come from what is known to break: dates where the calendar changes (leap days, the last day of a month, years before 1900 and after 2038), numbers at the limits of the types computers store (32-bit integers, the largest number JavaScript holds exactly), and text that changes length or direction, or that looks like code.

Names and valid emails are drawn at random from small lists, with a seeded generator (mulberry32): random enough to vary your tests, repeatable when you need it. The invalid emails, dates, numbers and text come from fixed lists, in order of how often they find bugs. None of this is real data.

  1. Choose the kind of data an input takes, and how many values you need.
  2. Use the values in your test cases: the "why" column says what each one should prove.
  3. Keep the seed with a failing test, so it can be repeated with the same values.

A worked example on Cedar Books

The Cedar Books sign-in takes an email address (REQ-01). These invalid addresses should each be refused with the same clear message, and none should reach the server as a valid sign-in:

Invalid email addresses for the Cedar Books sign-in
ValueWhy test it
plainaddressno @
@example.comnothing before the @
lina@nothing after the @
lina@exampleno dot in the domain
lina@@example.comtwo @
lina haddad@example.coma space before the @
lina@exa mple.coma space in the domain
lina..haddad@example.comtwo dots in a row

Run the list through the sign-in form and through the API: a form that checks the address while the API does not is a bug waiting for the first script. The same goes for the review comment field, with the text kind.

Learn more

Put the lessons to work on a real site

Describe a user journey in plain English. QAIA walks it in a real browser and hands back the test cases, the automation code and the evidence of every step.