Jmeter-- record a script - user parameterized - Adding an assertion

Jmeter usage scenarios implemented

1, recording the script badboy

2, using the user element comes jmeter parameterized

3, a request to add assertions (request to add the checkpoint)

 

Use badboy record a script to import jmeter

1, input https://www.sogou.com press Enter

2, enter "badboy" search

3, save the script (selected in the badboy: File-> Export JMeter6 ...) jmeter script format that can be used to save the sample file named after the test-1.jmx

4, in open test-1.jmx in jmeter

Use jmeter carrying elements of user parameters

1, add "pre-processor" - "User Parameters"

2, setting the parameter name, parameter value

3, an alternate format for the variable parameters used in the parameter $ {name} in the request

Was added to the assertion request (request to add the checkpoint)

1, in the need to add assertion request (search request at the present sample) was added in response to assertion of setting the response

 

2, the result was added assertions (and remains asserted in response to the same directory), the sample additionally provided two parameters, the request needs to be requested twice, the number of threads need to be adjusted to the corresponding 2

3, test results: starting a thread group, view the results (success response)

4, the response fails (an incorrect parameter entry in response to the assertion elements, a clear result of the right content, re-start threads in response to the results, you will see the results of the response fails to respond)

 

Guess you like

Origin www.cnblogs.com/maggioc/p/11221612.html