Test Data
Test data is the set of input values your test steps use — usernames, passwords, search terms, amounts, dates, and so on. TestFlair lets you define test data per step, reuse data across a project, and let AI generate realistic values for you.
Where Test Data Lives
Test data is attached to individual test steps. When you open a test case in create or edit mode, each step has a data button that opens the Test Data dialog for that step.
Adding Test Data to a Step
In the Test Data dialog, each variable is one row with three required fields:
| Field | Description |
|---|---|
| Data Type | The kind of value — String, Integer, Short, Long, Float, Double, Number, or Boolean. |
| Variable Name | The name used to reference the value in the step (e.g. username, password). Up to 100 characters. |
| Value | The actual value. The input adapts to the type — Boolean shows a True/False dropdown, numeric types show a number input, and any field named like a password is masked with a reveal toggle. |
There is no dedicated Date, Email, or URL type — store those as String. The variable name is what tells the generated script how to use the value, so signupEmail or checkoutUrl reads clearly even though the type is String.
- Click + Add Test Data to add another row.
- Use the trash icon to remove a row.
- Click Apply to save your changes back to the step. The button stays disabled until you make a change.
Give variables clear, consistent names. The same names are reused when TestFlair generates a test script from the test case, so loginEmail reads better in generated code than field1.
Data Sources
Every value carries a source badge so you always know where it came from:
| Source | Meaning |
|---|---|
| Custom | You entered the value by hand. |
| AI Generated | TestFlair generated a realistic value from your project context. |
| File | The value was imported from a data file (the filename is shown when available). |
Reusing Project Test Data
To avoid re-typing the same values, click the Replace icon on a row to pick from your project's existing test-data library:
- A picker opens showing every saved variable in the project — Data Type, Variable Name, Value, and Source.
- Filter the list, select the variable you want, and apply it to the step.
This keeps shared values (a standard test account, a base URL, a sample SKU) consistent across many test cases.
AI-Generated Test Data
TestFlair can fill in realistic test data automatically based on your project context (uploaded documents, URLs, and descriptions). AI-generated values appear with the AI Generated badge so you can review them before running a test. You stay in control — edit or replace any generated value at any time.
AI generation consumes Flairs. Check your balance under Settings → Usage.
Next Steps
- Test Cases — Build and edit the test cases that hold your steps
- Test Scripts — Generate automation that consumes this test data
- Project Data — Add the project context AI uses to suggest values