Overview
This guide explains how to configure a test case and orchestration to iterate through rows of a dataset, such as a Google Sheet. This allows you to run the same test multiple times, with each run using a unique row of data (e.g., a unique URL and activation key). This process is managed through Test Data Management (TDM) within an orchestration.
How It Works
To set up a test that iterates through your data, follow these steps:
- Prepare Your Dataset: Ensure your data file has clearly named columns. For example, if you are testing with URLs and activation codes, you might have columns named
URLandActivation_Code. - Attach Data to the Test Case: In your test case, attach the TDM dataset at the first step. Map it to a relevant column, such as the
URLcolumn. - Extract Data Using a Variable: To use data from other columns in the current row, add a Set Variable action. Use the following syntax to retrieve a value from a specific column and store it in a local variable:
fze.local.MyVariable = fze.local.dataset.DatasetName.ColumnName.value
For example, to get the activation code from a dataset named 'R2DTrueMAR' and a column named 'Activation_Code', you would use:fze.local.ActivationCode = fze.local.dataset.R2DTrueMAR.Activation_Code.value
You can then use this variable in later steps as{{fze.local.ActivationCode}}. - Create a TDM Orchestration: Create a new orchestration and add your configured test case to it.
- Configure the Orchestration Run: Set the Run Type of the orchestration to TDM Run. Select the dataset(s) you wish to use for the test runs.
- Execute the Orchestration: When you run the orchestration, it will execute the test case once for each row in the selected dataset, pulling the corresponding data for each iteration.
Limitations
- This method requires the test case to be executed as part of an orchestration. It will not iterate through the data if the base test case is run by itself.
- The syntax for the Set Variable action is precise and must correctly reference the dataset name and column name to function properly.