Skip to main content

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.

Test data dialog

Adding Test Data to a Step​

In the Test Data dialog, each variable is one row with three required fields:

FieldDescription
Data TypeThe kind of value — String, Integer, Short, Long, Float, Double, Number, or Boolean.
Variable NameThe name used to reference the value in the step (e.g. username, password). Up to 100 characters.
ValueThe 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.
tip

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.
tip

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:

SourceMeaning
CustomYou entered the value by hand.
AI GeneratedTestFlair generated a realistic value from your project context.
FileThe 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:

  1. A picker opens showing every saved variable in the project — Data Type, Variable Name, Value, and Source.
  2. 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.

info

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