# Variables

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.

Variables list

Each variable list item shows:

Variables list item

  1. the name of the variable; and
  2. the value of the variable.

# Defaults

By default, the following variables are created when a project is created:

  1. 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.
  2. webhook_url: This is the url which is pinged with the result of a test run.
  3. 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.

Special variables

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 create at the top right corner of the pane.

Create a new variable

Then provide the name and value of the variable.

Feature form

# Edit a variable

Click Edit button from the desired variable and update the variable information as desired in the form that is shown to the right.

Edit a variable

# Delete a variable

Click Delete button on the desired variable and confirm deletion.

Confirm variable deletion

NOTE: Deleted variables CANNOT be retrieved.

# Using variables

Variables usage

Variables are provided as options for text fields on features and scenarios forms. They can be used in place of regular texts.