A variable is just a value that can change and that you wish to save or reuse in a test. For instance, if you use the same phone number for all your SMS tests, you may find it convenient to save that number in a variable so that you can change it globally at once. Besides, you can also, inside your test, save the result of an action (USSD, SMS, API, etc) inside a variable to reuse it in later actions (but it cannot be reused in other tests).
Variables can be used in different places inside a test:
-
In owner fields
-
In action details (in USSD responses, SMS messages, emails, API returns, etc)
-
In action assertions
-
In custom metrics
-
And many other different places. Just try to type the variable delimiter '{' somewhere and see what happens!
You can have local, test-specific variables, and global variables, available to all your tests. Global variables can have more than one value, so that when you launch a test that uses them, you get to choose which value to use.