简体   繁体   English

jmeter http请求没有值,但名称错误

[英]jmeter http request no value, but wrong name

I create a jmeter http request with parameter name & value. 我创建一个带有参数名称和值的jmeter http请求。 While the test result is no value only the parameter names.(parameter names are wrong :( 虽然测试结果是没有值,但只有参数名称。(参数名称错误:(

parameters config 参数配置

error result 错误结果

POST http://localhost:8080/aqnu/loginsys

POST data:
200117003200117003

Cookie Data:
JSESSIONID=438A7FCE7211763AFFF57F89F5A9FCB3

Request Headers:
Connection: keep-alive
Referer: http://localhost:8080/aqnu/login
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7
Origin: http://localhost:8080
DNT: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Cache-Control: max-age=0
Accept-Encoding: gzip, deflate, br
  1. It might be the case with the parameters themselves, ie if you copied and pasted them from some source the parameters may include non-printable special characters like line breaks therefore JMeter fails to properly parse them in HTML mode. 参数本身可能就是这种情况,即,如果您从某些来源复制并粘贴了参数,则参数可能包含不可打印的特殊字符,例如换行符,因此JMeter无法在HTML模式下正确解析它们。 Try switching to Raw and see how does your request look like there 尝试切换到Raw ,看看那里的请求看起来如何
  2. If the cause is different unfortunately we will not able to help without seeing the logs. 如果原因不同,很遗憾,我们将在没有日志的情况下无法提供帮助。 If you want to check it out yourself or update the question with the logs: 如果您想自己检查一下或使用日志更新问题:

    • Add the next lines to log4j2.xml file 将下一行添加到log4j2.xml文件

       <Logger name="org.apache.jmeter.protocol.http" level="debug" /> <Logger name="org.apache.http" level="debug" /> <Logger name="org.apache.http.wire" level="error" /> 

      These lines will increase JMeter logs verbosity for HTTP protocol 这些行将增加JMeter日志HTTP协议的 详细程度

    • Restart JMeter to pick up the changes 重新启动JMeter以获取更改
    • Search for your request parameters in jmeter.log file an see how do they look like. jmeter.log文件中搜索您的请求参数, 然后查看它们的外观。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM