set global variable
Assign a value to an existing global variable.
Name | Description | Type | Modifier |
---|---|---|---|
variable | An existing global variable. | String | None |
value | Value to assign to the variable. | String | None |
None
This action may be used within the following project items: test modules and user-defined actions.
Action lines
name value
global variable a 5
name value
local variable a 100
 
variable value
set global variable a 20
 
value expected
check value # getglobal("a") 20
Result

- To create a global variable, use the action global variable.
- A global variable is visible throughout all test modules and invoked actions within one test run execution, subsequent to its declaration.
- Use variables within pound sign (#) expressions to access their contained values.