Output parameter extraction variable |
The current test case |
If the current test case contains multiple steps, you can use variables of this type
to extract one or more output parameters from the responses to upstream requests and
use the parameters as input parameters in downstream requests.
Output parameters extracted in a test case cannot have duplicate names.
|
Environment variable |
All test cases |
A service may be tested in different environments. For example, you test the service
in the test environment and deploy it to the online environment for automatic regression.
However, a test case does not vary with the environment.
In different environments, the domain names of the tested service are different. In
this case, you can define environment variables. For example, you can define an environment
variable named base_uri for each of the test and online environments. If you specify
${base_uri} in the request URL of a test case, you can use the test case in both environments
only by switching the environment.
The name of an environment variable must be unique in an environment, but can be duplicate
across environments.
|
Collective variable |
Test cases in a test case set |
You can configure variables that can be collectively used by test cases in a test
case set. Collective variables of a specific test case set cannot be used by test
cases out of the test case set.
The name of a collective variable must be unique in a test case set, but can be duplicate
across test case sets.
|
Custom global variable |
All test cases |
The name of a custom global variable must be unique within an Alibaba Cloud account.
|
Output parameter extraction variable set as a global variable |
All test cases |
The type of variable can be used in the following scenario: An output parameter extraction
variable of a step in Test Case A is set as the global variable. If you reference
the variable in a step of Test Case B, the system runs Test Case A, extracts the value
of the variable, assigns the value to a variable of Test Case B, and then runs Test
Case B.
For example, you set the cookie variable used to obtain cookies in Test Case A as
the global variable. If you use ${cookie} in Test Case B, the system runs Test Case
A to obtain the value of the cookie variable and then assign the value to a variable
of Test Case B.
|
System function |
All test cases |
System functions allow you to customize input parameters to meet diversified needs.
You can combine, replace, nest, or add strings for system functions as required.
System functions can nest environment variables, collective variables, and global
variables.
|