Use a Test Data Collection variable to keep a reusable value separate from your test instructions. Insert a reference such as {{customer_email}} into the script. Vansah displays its value when the reference can be resolved in the current collection and version.
For example, a variable named customer_email with the value [email protected] lets a step read “Enter {{customer_email}} in the email field.”
Before you begin
Open the Test Case and select the version you want to edit.
Make sure you have permission to edit the Test Case and its variables.
Check the Test Data Collection and collection version for that Test Case version. A variable available in another version may not resolve here.
1. Insert an existing variable
Open the Test Script tab and edit the relevant field. In a Multi Steps script, you can use variables in Step, Test Data, or Expected Result.
Place the cursor where the value belongs. Type
{{and start entering the variable name, or use the editor’s Insert collection variable control.Select the matching variable from the suggestions. Check that you chose the intended variable.
Save the edited step or script using its save control.
The reference uses two opening and two closing braces: {{customer_email}}.
2. Check the displayed value
When you leave edit mode, a resolved variable displays its value with a light-blue highlight. For example, {{customer_email}} displays [email protected].
When you edit the field, the variable name appears as a reference again. This lets you identify the variable without replacing the reference with its displayed value.
What you see | What it means |
A light-blue value | The variable was found and has a nonblank value. |
A red reference such as | The variable is missing, invalid, or has an empty value. Check the collection and version before adding another variable. |
| The variable is marked sensitive, so this script view masks its value. |
3. Add a missing variable
Enter the new reference, such as
{{order_total}}, and save the script field.If the reference is unresolved, hover over it. When the variable is missing, select the + action to open Add new variable.
Check the Variable name, enter a useful Value, and optionally add a Description.
Select Add and wait for confirmation. Review the script again to confirm the value resolves.
Use a name such as order_total. In the quick-add dialog, names start with a letter or underscore and can then contain letters, numbers, underscores, hyphens, or square brackets. Spaces are not allowed. The dialog limits each field to 225 characters.
If a variable already exists but its value is empty, update that existing variable in the Test Data Collection. An empty value does not provide the missing-variable Add action.
4. Manage the Test Case’s variables
Select the Test Data Collection button near the Test Case’s version selector.
Check the displayed Test Case version and the selected collection version.
Review existing variables or use Add Variable to add one.
Save your changes, return to the script, and verify the references resolve to the intended values.
Troubleshooting
Problem | What to check |
No variable suggestions appear | Check that the Test Data Collection has loaded for the current Test Case version. Use |
A reference remains red | Check whether the variable exists, has a nonblank value, and belongs to the current Test Case and collection versions. Use the picker to insert the intended variable again if needed. |
The variable name already exists | Reuse or update the existing variable in that version instead of creating a duplicate. |
The collection has reached its variable limit | A collection version supports up to 20 variables. Review existing variables before adding more. |
You changed a value but the script still looks different | Confirm that you changed the collection version used by this Test Case version. Reopen the script and check the displayed value. |





