Adding a Global Variable of the Integer, Text, or Enumerated Type
Procedure
- Log in to the CodeArts PerfTest console and choose PerfTest Projects in the left navigation pane.
- Click the name of the desired PerfTest project to go to the details page.
- On the Cases tab, click Global Variables.
- Add a global variable manually.
- Click Add Variable.
- Set parameters by referring to Table 1.
Table 1 Setting global variables Parameter
Description
Name
Name of a new global variable.
Type
Variable type, which can be integer, text, or enumerated.
Value
A pressure test task reads the value range of the corresponding global variable when it is running. For each virtual user, the variable value is polled. That is, the first virtual user obtains the first value of the variable, and the second virtual user obtains the second value. If the values are exhausted, the next virtual user obtains the first value again.
NOTE:Variable content is transmitted in plain text during the pressure test. Exercise caution when entering the content.
- When the variable type is Integer, enter the value range of the variable.
- When the variable type is Enumerated, click to enter a variable value.
- When the variable type is Text, enter a text value.
Read Mode
Sequential Mode: Variables are read in sequence.
Random Mode: Variables are read randomly.
Sharing Mode
Case: All concurrent requests share a variable.
Concurrency: Each request copies a variable with the same name for use. Different concurrent requests read the variable values in sequence and do not affect each other.
Sensitive
If this option is selected, the variable value is encrypted for storage. Editing the variable after the page is refreshed will clear the variable value. Please exercise caution.
NOTE:Sensitive parameters apply only to text variables.
For details about the variable read rules for different variable read and sharing modes, see Variable Read Rules.
- When the settings are complete, click to save them.
- After creating a variable, you can perform the following operations:
- Click Edit to modify it. If the global variable is referenced by a transaction, the value of the global variable in the transaction will be changed synchronously after the modification.
- Click Delete to delete the added global variable file.
The global variable file cannot be deleted when it is referenced.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot