Variables are placeholders that can be used with features, scenarios and snippets which are then replaced with the values at run time.
They consist of a name-value pair.
The beauty of variables is that every member of a team can customize the values to suit them and it doesnt change the values for others.
For example, every project gets a
test_url variable automatically when created. Member A could have this set to
http://localhost:8080 while member B could have it set to
http://localhost:8181. The runner would apply the value for the user running the test.
# List of variables
To view the list of variables in a project, select the desired project and the Variables pane would be shown with the list.
Each variable list item shows:
- the name of the variable; and
- the value of the variable.
By default, the following variables are created when a project is created:
test_url: This defaults to the url of the project. If a project doesn't have a url, it defaults to
http://localhost. This is also the url used by the extension.
webhook_url: This is the url which is pinged with the result of a test run.
webhook_key: This is a unique key which identifies that the request is authentic and comes from TestSoothe (opens new window).
See here for details on webhooks.
# Special variables
These are variables that are provided for ease of use. You cannot create, edit or delete these.
They are typically listed at the bottom of the page.
The Unique Email special variable generates a unique email address per run session and the value passed everywhere the placeholder is used.
For example, if you use the
[unique_email] placeholder on a sign up scenario and on a login scenario, the two scenarios would get the same value if runned in the same session.
# Create a new variable
To create a new variable, click at the top right corner of the pane.
Then provide the name and value of the variable.
# Edit a variable
Click from the desired variable and update the variable information as desired in the form that is shown to the right.
# Delete a variable
Click on the desired variable and confirm deletion.
NOTE: Deleted variables CANNOT be retrieved.
# Using variables
Variables are provided as options for text fields on features and scenarios forms. They can be used in place of regular texts.