First, the Debug sampler introduction:
When you use JMeter to develop scripts, you will inevitably need to debug, you can usethe Jmete r Debug Sampler, it has three options: JMeter properties,jmeter Variables,system Properties:
1, JMeter Properties and System Properties: usually choose false, these two are the properties of JMeter and systems, in the JMeter bin Jmeter.properties defined, generally will not change.
2. JMeter variables: This is our self-defined variable, defined in the following way:
A) Select the test plan and add the user Defined to the right panel Variables
b) Select the thread group, right-click the configuration element (config Element)-->user Defined Variables
c) The variables generated by the Post processor can refer to my other article: JMeter Association
d) using CSV parameterized variables, parameterization can refer to my other article: JMeter parameterization
Second, a comprehensive example: in order to cover the above four cases, the following script is specially written:
1. Add a variable to the right panel of test plan: name=test,value=111
2. Add a user variable under sampler One (Visit Baidu homepage): name=hello,value=222
3. Using the Post processor (regular expression processor) under sampler One, get the information of Baidu homepage title
4, parameterized, the variable name is username, the value is: Tom
5. Operation Result:
Three, Summary:
1, Debug sampler will be our custom variable output in response data, convenient for us to use when debugging
2. The debug Sample needs to be removed when the script is formally executed
Ps:jmeter Another debugging tool: HTTP Mirror Server
(10) Introduction of Debug Sampler in JMeter