Types of variable in APImetrics

The major types of variable used in APImetrics

Types of variable


Global Variables

Variables that can be used by all the calls in a particular project.


Environment Variables

Environment variables are specific to a certain group of tests in a project. When you are creating the test you can specify the environment to be used.


Workflow Variables

A variable set within a workflow that will only exist for the duration of the call i.e. an authentication TOKEN is extracted from a POST API and then used in a following API call within the workflow

Setting GLOBAL or ENVIRONMENT Variables

Select Environment Variables from the Advanced Tab



Within the APImetrics software, an environment variable is a user-defined variable that associates a variable name with a variable. The variable is stored for re-use at various points in the APImetrics software. This saves the user from having to enter the same value multiple times with the risk of making a mistake in entering it and also means that if it is desired to change the value, it will be updated automatically at all the points it is used.

Suppose a user wants to fill in a text box with the text

โ€œHi, my name is Davina. My email address is [email protected]โ€œ

Ut may be the case that the user is required to enter her email address (or any other data string) at multiple points in the system. The user can then create a variable email = [email protected] and enter the following literal text into the text box

โ€œHi, my name is Davina. My email address is: {{ email }}โ€œ

When the text in the text box is parsed by the system, the value of the variable associated with the name email ([email protected]) will be inserted into and the result will be

โ€œHi, my name is Davina. My email address is [email protected]โ€œ

If the user changes her email address, it is only necessary to change the value of the variable email and the value will be inserted at all points in the system where the literal string {{ email }} is found.