jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions

   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

  1. Following request
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  2. As response data
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions

Two, jmeter5.1 execution results are as follows

  1. Request Request Body
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  2. Request Request Headers
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  3. Response data Response Body
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  4. Response headers response data
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  5. Response headers response data
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions

Third, the problem analysis

  1. 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
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  2. 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
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  3. 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
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  4. In the header management information, add Content-Type = text / plain
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions
  5. Click the Execute button, the successful implementation
    jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions


       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
              jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions


Micro-channel two-dimensional code number of public attention:

            jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions


After attention, resources download reply, you can get a variety of shared resources Download

jmeter4.0 perform HTTP requests 400, jmeter5.1 operating normally Solutions

Guess you like

Origin blog.51cto.com/6183574/2438219