About this tool
Data-driven tests are only as good as their data table, and hand-written tables tend to miss the boundaries. Define each field with a type (string, email, number, date, enum, boolean or phone) and its constraints (length or value range, required, allowed values), and this generator builds the table: one nominal valid row, then rows that change exactly one field at a time, at the minimum and maximum, one step outside each limit, missing when required, and in malformed formats. Each row is labelled Accept or Reject with a reason such as "age = 17 (below min 18)", so a failing row points at one rule. Values are deterministic, with no random data, so the same definitions always produce the same table and diffs in version control stay readable.
How to use it
- Add a field for each input: name, type and constraints. Leave min or max empty for no limit.
- For enums, list the allowed values; for numbers, choose whether only whole numbers are valid.
- Review the preview and filter it by valid, boundary or invalid rows.
- Export as CSV for spreadsheet-driven tests or JSON for parameterised tests in code.
Test Data Template Generator FAQ
How do I use the output in automated tests?
Load the JSON array and parameterise one test over it: send each row’s data, then assert success when expected is "Accept" and a validation error when it is "Reject". The reason makes a clear test name, for example with test.each in Vitest/Jest or @MethodSource in JUnit 5.
How are missing values represented?
As an empty cell in CSV and as null in JSON. If your API distinguishes between a missing key and an explicit null, add a separate case for the omitted key.
Why not use random data?
Random values make failures hard to reproduce and tables hard to review. Boundary testing needs exact values (the minimum, one below it), so this tool generates fixed values. Use the Test Data Generator when you need realistic random records.