Environment Variables

Environment variables in useMango™️ serve as project wide entities that can be used in tests. These are different from Project data variables in useMango™️ in the sense Project data variables have a fixed value while environment variable values are defined by the chosen environment.

To view all environment variables in a project, we click on the Data tab in useMango™ and then on the Environment tab in it.

Create a Environment Variable

To create an environment variable:

  1. Click on Data tab in useMango™ and then on the Environment tab in it to open the Environment Variables page.
  2. In the top-right corner of the Environments tab, click on the text box and enter your variable name.
  3. Click on the Add data button to create a new Text type variable. Click on the arrow next to the Add data button to create a variable of any other type.
  4. Choose the type of the project variable - Text, Secret, Web identifier, Mobile identifier or Image identifier.

Delete an environment variable

To delete an environment variable

  1. Click on the checkbox next to the environment variable.
  2. Click on the Delete button in the bottom-right area of the Environment tab.
  3. Click on Delete button again on the popup appearing to complete the process.
  4. If the environment variable is used in anywhere, a dialog box is shown to confirm the removal of references of it. Confirm the deletion by clicking on the Ok button.

Rename an environment variable

To rename an environment variable:

  1. Click on the name of the environment, the name is now editable.
  2. Enter the new name of the environment variable.
  3. Press Tab to save the new name.

Using environment variables in tests

To use an environment variable as a step parameter of a test or a composite component:

  1. Click on the step parameter where you want to use the environment variable; a list of environment variables and data variables are shown.
  2. Select the environment variable from the list or start typing in the variable name to search for it.
  3. Click on the environment variable (Environment variables are Indigo colored) to set it as the step argument.

Some notes about environment variables:

  1. Environment variables namespace is shared with data variables. So, if you have a data variable with the same name as an environment variable, you will not be able to rename the environment variable to the same name as the data variable.
  2. Environment variables are read only when used in tests, hence they cannot be modified by the test while it is executed.