๐Ÿ”ก Test-specific variables

Create test-specific variables and use them in a specific test to extract values and validate them within the same test.

Test-specific variables are created when generating a specific test and can be used only within the context of that specific test.

Extracting a test-specific variable

You can extract a JSON value from an HTTP response in the test into a variable, and use it later in the test to perform the desired validation.


Extracting a test-specific variable when building a test

The extraction is done by selecting custom > Extract variable for the desired JSON key. After a name is given to the variable, it can used anywhere in the test to enforce the desired behavior by using the syntax {{$variableName}}.


Extracting the ID value into a test-specific variable

Validations based on test-specific variables

Once a variable has been extracted, it can be used in validation checkpoints throughout the test to enforce specific business logic - based on the goals of that test.


Using an extracted variable in the test for validation

The variable extraction and use in validation are reflected in the generated test code.