Reprinted https://blog.csdn.net/lluozh2015/article/details/51548243
When doing the concurrent test of the interface, I found that the two parameter formats of Parameters and Body Data in Jmeter are not simple. One is xx=xx, and the other is a parameter in json format.
First look at an interface
[post] /api/xx/xxxx/xxxx notify the server that the file upload is complete
Input parameters:
http content type: application/json
Name | Type | Required | Parameter Limit | Description
--------- | ----------- | -------- | ---------- | ----------
cid | string | Yes | cid.length==36 | id
version | int | yes | no | version
At the beginning the request in Jmeter was
The result returned by the request is
{"msg":"{\"message\":\"error\",\"error_code\":4000}","ret":"error"}
After searching, it is found that it is the use of Parameters and Body Data, and the requested parameters are misunderstood.
Take a closer look at the two "parameters" in the packet capture
xx=xx&xxx=xx format
json format
The parameter in the format of xx=xx&xxx=xx is the value of the parameter in the url in the GET or POST request, such as:
In one such request/api/xx/xxx/xxxx?index=0&pagesize=100&thumb=1
? The number after the number can be written in the url or in the parameters
The json format is the parameters in the POST request. When the POST request parameters, look at the format of the request. Do you need to add an HTTP header manager to the request toContent-Type OrUser-Agent Wait for definition
HTTP request format:
HTTP header manager:
I previously introduced the default submission form of jmeter post to express submission, Content-type = "application / x-www-form-urlencoded", use the form of directly filling in the parame...
Import mysql driver Import mysql-connector-java-5.1.44.jar into the jmeter/lib path Create and set mysql connection configuration Right-click on the thread group: Add-Configuration Element-JDBC Connec...
Foreword The interface request body with the SIGN signature parameter, the SIGN signature is generated after the splicing request parameter is generated after the SIGN itself is removed according to t...
Original website:SpringMVC / Springboot - Get Parameters / Maxets - URLENCODED / FORM-DATA / BODY / Multiple Body_IT Blade Outbound Blog - CSDN Blog Introduction When developing, we will get the param...
1.0 Request data is Form-DATA 2.0 Request data is X-WWW-Form-Urlencoded first step: Test Plan -thread group -HTTP request -check the results tree Step 2: Definition directly in the parameter third ste...
1. Enter the bin directory under the JMeter directory, open the JMeter.properties file with the text editing tool UE or NOTEPAD ++, etc. Edit: Find line: # SampleResult.default.Encoding = ISO-8859-1 M...
What I want to write today is the parameter setting of c#. Generally, our functions or methods can accept parameters. such as: Then there is this, is it very familiar? Here is a function with paramete...
Role: Transferring structs as parameters to functions...
Structural body as function parameters First, value transmission Second, the reference transmission Third, pointer delivery Take the pointer of the structure as a solid...