Document directory
- [Haidian xueda road] 0727 testing BD information F coupon product 02
First, create a Thread Group. Why should all requests be added to the Thread Group? Can I leave it alone? Of course, the answer is no. Because all jmeter tasks must be processed by threads, and all tasks must be created under the thread group.
Select a Thread Group and right-click to add an HTTP Request. Cookie Manager is not required here, because this is a request we manually add, not recorded, but not strictly required. The Cookie Manager can be added or not added.
I have two requests.
[Nationwide]0727Test BD information delivery product 01 change 03
Http://p.ftuan.com/mall_quanguo_14448.shtml? S = 1000 & a = 00011033008051010100000000010103
[Haidian xueda road] 0727 testing BD information F coupon product 02
Http://p.ftuan.com/xiuxian_haidian_14447.shtml? S = 1000 & a = 00010244004076010100000000110103
Add the first request first, and then use the parameterized URL method for the second request (TryPathIs parameterization successful?, Analyzed the above two requests, the domain names are the same, but only the following URLs are different)
Then add the Aggregate Report and View result Tree)
Complete script structure:
Very concise
Save the script and run it to check whether the server response data can be obtained by sending the request.
The URL of the first request:
Returned results after a URL request is sent:
Everything returns correct.
The URL request for another page is parameterized as follows:
Store the URLs after the domain name in the root directory of drive D.
Select a thread group and add the configuration element CSV Data Set Config under it.
Parameterization methods are included in another document.
Then, find the path Data in the HTTP request based on the variable name in CSV Data Set Config.
Modify the number of threads in the thread group to ensure that the two URLs are executed by the thread
Before running the script, clear the result of the previous operation.
Start running the script
The two URLs are executed and the results are returned correctly. The test shows that parameterization is feasible on the path of the http request.
Let's take a look at the structure tree of the script. Remember that all tasks are executed by threads. Therefore, all tasks must be divided into threads. One script must create multiple thread groups.
Jmeter (II)-use a proxy recording script
Jmeter (1)-simplified test script