Using test variables

A useMango™ test variable is a name-value pair that stores and refers to information throughout a test. useMango™ tests use test variables whenever there is a need to operate with data that may change, either from the test run to the test run or within the run-time of a test.

Test variables are used to store values retrieved from the application under test during the test run-time. These retrieved values are used for verification or as input values for subsequent steps in the test.

Create a test variable

  1. Click on the ‘Click to add a variable (+)’ icon present in the Variables panel.
  2. From the context menu, select Text and click Create to add a test variable of type ‘text’.
  3. A test variable of type ‘text’ with default name is now added to the test.

Edit a test variable

  1. Click on the variable to edit the name or value of the test variable.
  2. Type required text to edit the variable name or value.
  3. Press ENTER or TAB key to save changes.

Delete a test variable

Move the mouse pointer to the test variable name and click cross mark (x) to delete the test variable.

A warning message is displayed before deleting if the test variable is used in any of the test step(s).

Assign test variable to a test step parameter

  1. Select the test step in which the test variable is needed.

  2. Press ENTER key or Double click on the test step to open the test step editor.

  3. To assign test variable to the test step parameter, either

    a. Click on the Value field of a test step parameter and begin typing the Name or Value of the test variable, then select it from the drop-down list or

    b. From the list of variables in the Variables panel, drag and drop a variable onto a test step parameter, using as the handle.

Unassign test variable from a test step parameter

Click on the bin icon next to the field of a test step parameter present in the test step editor to unassign a test variable.