Recently testers have regular contact with script fails jmeter4.0 run, return Response code: 400, HTTP 400 return, the official explanation is "Syntax error Bad Request client requests, the server can not understand", the normal in jmeter5.1, here This paper records solution
A, jmeter4.0 execution results are as follows
- Following request
- As response data
Two, jmeter5.1 execution results are as follows
- Request Request Body
- Request Request Headers
- Response data Response Body
- Response headers response data
- Response headers response data
Third, the problem analysis
- The following script, the script does not see the script can be drawn declare HTTP header information manager, the system calls the default request header
- After comparing the difference jmeter4.0 and jmeter5.1 request header table, you can see their default request header is not the same, Jmeter5.1 HTTP Interface Content-Type default type text / plain; Jmeter4.0 HTTP Interface default Content-Type type application / x-www-form-urlencoded, due to the performance test scripts HTTP interface header type is text / plain, so the successful implementation
- So we just need to add the script myself a header manager, then declared as text / plain on the line, right-test plan "Add" configuration elements "HTTP header Manager
- In the header management information, add Content-Type = text / plain
-
Click the Execute button, the successful implementation
If the article help you, you can click in the bottom right corner focus on functionality, welcome to forward, brick, I will continue to introduce articles related to testing, testing technology to share with you, each one original article is carefully written to prevent plagiarism copy , micro-channel public number to this article synchronized platform, facilitate access
QQ technical exchange group: the group please enter this information 51CTO
Micro-channel two-dimensional code number of public attention:
After attention, resources download reply, you can get a variety of shared resources Download