Skip to main content

Add Variables to a Test Data Collection Version

Choose a Test Data Collection version, add reusable variable names and values, save them, and use the sensitive-value option where needed.

Add variables to a Test Data Collection version to keep reusable test data in one place. Each variable has a name, a value, and an optional description.

Before you begin

  • Make sure the collection and version you want to edit exist.

  • Check your permission to edit the collection and its variables.

  • Check the current collection version and iteration so you know which data you are viewing.

Add and save a variable

  1. Open Test Environments, expand the environment, and select the collection. For a Test Case collection, open the Test Case’s Test Data Collection button instead.

  2. Use Version to select the collection version you want to update.

  3. Select Add Variable.

  4. Enter a clear name, such as customer_email, and its value, such as [email protected]. Add a description if it helps explain the data.

  5. If the value should be masked in supported views, use the lock control labeled Mark sensitive.

  6. Select Save. Wait for confirmation and check the saved row.

Collection Version menu used to choose the data version to edit.

New variable row with name, value, description, and Save controls.

Understand the sensitive option

The lock control marks or unmarks a variable as sensitive. Supported views mask sensitive values. It is a display/data setting and does not open a permissions editor.

Mark sensitive control beside a variable name.

Names, values, and iterations

  • Use short names without spaces. Start with a letter or underscore, followed by letters, numbers, underscores, hyphens, or square brackets.

  • The add row accepts up to 225 characters in each field. A collection version supports up to 20 variables.

  • A variable name must be unique within that collection version. Update or reuse an existing variable when appropriate.

  • A blank value can be saved, but it may leave a script reference unresolved. Add a useful value before relying on the variable.

  • When the version already has data iterations, adding a variable initializes it in those iterations. Review the iteration values after saving.

Use the variable in a script

Use the collection-variable picker to insert the saved variable into the relevant Test Script. See Use Test Data Variables in Test Scripts for the complete procedure.

If Save fails, check the error, the variable name, the collection version, and the variable limit. Inspect the collection before retrying.

Did this answer your question?