#Test Case Datasets
Datasets let a single test case run with different sets of input data. You define Dataset Variables once, reference them inside preconditions and steps using {{variableName}} placeholders, then provide one or more rows of values under Dataset Values. Each row represents one run of the test case.
The Datasets section appears in the test case create and edit flow, alongside the steps. Datasets are available in Multiple and Single step modes; they are unavailable in Gherkin mode.
#Datasets section
- Datasets: the collapsible section header where dataset variables and rows are managed.
- When no variables exist, the section shows No Dataset variables added.
- Once variables exist, the header switches to Dataset Variables and shows a count badge for variables and, separately, a count badge for dataset rows.
#Dataset Variables
- Variable: adds a new dataset variable. Each variable has an editable name (placeholder
variable_name).
- A variable that is defined but not referenced anywhere shows a warning indicating it is Not referenced in any step or precondition, reminding you to insert
{{variableName}} where you need it.
- Remove variable: deletes a variable. If the variable is referenced in steps or preconditions, Hawzu shows an impact summary before removing it (see Impact analysis).
#Inserting variables into steps
You reference a dataset variable inside precondition or step content using a placeholder:
- Type
{{ inside a precondition, step description, or expected output to open an autocomplete list of your dataset variables, then pick one to insert it.
- The placeholder uses the form
{{variableName}}, matching the variable name.
- When a test case runs against a dataset row, each placeholder is filled with that row’s value for the matching variable.
#Dataset Values (rows)
- Dataset Values: the table of dataset rows. Each row supplies a value for every variable.
- Add dataset: adds a new dataset row.
- Dataset name: an editable label for each row, plus one column per variable.
- Each row runs the test case once. A row whose values are all empty is not saved.
#Impact analysis
When you rename or remove a variable that is in use, Hawzu summarizes where it is referenced before applying the change. The impact summary lists the affected areas, such as the Precondition, individual Step descriptions and expected outputs, and the total number of references found. This helps you avoid accidentally breaking placeholders that are already in use.
Pending dataset edits are highlighted with a notice that Dataset changes are pending until you choose Save changes to sync variables and dataset rows across steps, or Cancel to discard them.
#Copy and paste
You can reuse dataset definitions across test cases:
- Copy: copies the current dataset variables (and their rows) so they can be pasted elsewhere.
- Paste: inserts copied dataset variables. If the test case already has datasets, Hawzu asks whether to Replace Dataset Variables? before overwriting.