Global Variables
Global Variables
Variables
Enables the reusability of data across multiple scripts within the same project. If the data for a variable ever changes, updating it in “Global Variables” section will propagate that change across all the scripts that uses it.
Click on the Setup link in the navbar after navigating to the desired mobility project.
Click on the “Global Variables” tab on the left side panel to open the variables section.
Click on the “Add” button to add the variables.
Once the variable name, type and value(s) are entered, click on the “Save” button to create the variable which can be used across all scripts in the project. The variables can be edited simply by changing the value(s) in the text field(s) for a variable and clicking the “Save” button.
Variable Types
Custom
Use custom variable value.
Password
Masks the value of the variable.
***Note: In order to prevent the variable value from being shown in the reports page, hide the data field of the step where the variable is being used. More information regarding this can be found here. ***
Integer
Provides a random integer value between the min and max values.
Decimal
Provides a random decimal value between the min and max values with the number of digits after the decimal point based on the value in the “Decimal Point” field.
UUID/GUID
Generates a random UUID/GUID value. “Variable Value” field should be empty.
Email
Can be used to store an email address that can be used across the project or can generate a random email based on the usage of question marks (?) and pound signs (#). i.e. ????####@gmail.com where the question marks will be replaced with a random letter from the English alphabet while the pound signs will be replaced with a random number between 0 and 9.
Date
Generates a random date based on the format specified in the “Variable Value” field.
PastDate
Generates a random date in the past based on the format specified in the date formatter field. The generated date would not go past the specified minimum year.
FutureDate
Generates a random date in the future based on the format specified in the date formatter field. The year in the generated date would be less than or equal to the maximum year.
BaseURL
Set a base URL for a variable that can be used across the project
FirstName
Generates a random first name.
LastName
Generates a random last name.
*** Note: For the variable types that generate the random values, each instance of its usage will generate a random value. i.e. If 2 steps are using the last name variable type, for each step, a random last name will be generated. ***
Environment Profiles
Environment profiles can be used to create environment specific values for variables such that the same test script can be used to test multiple environments simply by selecting a different profile.
By default, variables are part of the “Global” environment.
*** Note: Duplicate variables in the target environment would be replaced with the values of the source environment. ***
*** Note: The default “Global” environment cannot be renamed nor deleted***
Last updated