Currently I use two ways:
1) A parameter, fixed value, a lot of places are used: Please use "user-defined variables"
User groups, right--add--Configuration originals--user-defined variables, which are added here.
How to use it? This reference is used where this parameter is needed:
${parameter name}
Some variable things, preferably parameterized, such as server IP, if the day changes, you only need to modify the user-defined variables in the IP corresponding value can be changed in every request, too much trouble, and will miss
2) I have 100 people to log in, each user name, password is not the same.
Idea: You can set the user name, password parameters, put the parameter values in a file, where needed to reference this parameter. ----with CSV Data Set Config
User group, right--add--config original--csv Data set Config, add in this.
How do I create a CSV file?
The following is a brief description of each parameter of the CSV Data Set config:
- Directory of filename:csv files
- File Encoding: Default is ANSI, we want to change to Utf-8
- Varible Names: Defines the name of the parameter in the text file, separated by commas. After the script is referenced in the same way as the shell variable
- Allow quoated data: double quote Correlation
- Recycle on EOF: set to True to allow loop values (such as looping 1000 times, but only 100 user name passwords, then loop)
- Stop Thread on EOF: When recycle on Eof=false,stop Thread is on eof=true, after reading the records in the CSV file, it stops running
- Sharing Mode: Sets whether thread sharing.
Finally, we need to know that JMeter also has the following ways to Parameterize:
- User Defined varibles: Generally for parameters that do not need to be changed
- User Parameters:
- Through the system functions: Options->function Helper Dialog, through their own input parameter values, click the "Generate" button to generate
Drizzle study Note: JMeter parameterization