简体   繁体   English

Jmeter-如何在Name和Value中传递Parameters中的特殊字符

[英]Jmeter-how to pass special characters in Parameters in both Name and Value

I have to pass Parameters in Jmeter which has "," "$". 我必须在Jmeter中传递具有“,”“$”的参数。 These are all been taken with 2%24 这些都是2%24

Below is the Parameter and Value: 以下是参数和值:

Parameter:Tabslan$ctl02$gvTasks2$ctl00$ctl06$rptrComments$ctl01$FC$hdnUserName
Value: at1+Tra+AN,+(Ph:+001-001-001)

But In the Post Data this is read as: 但在Post Data中,这被解读为:

Parameter:Tabslan2%24ctl02%24gvTasks2%24ctl00%24ctl06%24rptrComments%24ctl01%24FC%24hdnUserName
Value: at1+Tra+AN%2C+LPN%2C+MD%2C+RN%2C+BS%2C+BA+%28Ph

If it Get request, disable the encode checkbox. 如果是Get请求,请禁用encode复选框。

在此输入图像描述

If it is Post request, keep the data in Post Body section in key1=value1&key2=value2 format. 如果是发布采购信息,保持数据Post Body部分的key1=value1&key2=value2格式。

example Post Data: 示例发布数据:

Tabslan$ctl02$gvTasks2$ctl00$ctl06$rptrComments$ctl01$FC$hdnUserName=at1+Tra+AN,+(Ph:+001-001-001)&otherkey=othervalue

if more than one key-value pair, separate them by & 如果有多个键值对,请用&分隔它们 在此输入图像描述

  1. Given you record your test with JMeter's built-in proxy server - you should get good HTTP Request sampler configuration which comes from recording 鉴于您使用JMeter的内置代理服务器记录测试 - 您应该从录制中获得良好的HTTP请求采样器配置
  2. If you are building your request manually, it mostly depends on 如果您手动构建请求,则主要取决于

    • "Encode?" “编码?” checkbox state 复选框状态

      JMeter HTTP请求编码

    • and what you are using to verify your request as it may appear differently in "Raw" and "HTTP" tabs of the View Results Tree listener 以及用于验证请求的内容,因为它可能在“ 查看结果树”侦听器的“原始”和“HTTP”选项卡中显示不同

      发布数据查看结果树

See How to Debug your Apache JMeter Script article for comprehensive information on the most common JMeter troubleshooting techniques. 有关最常见的JMeter故障排除技术的全面信息,请参见如何调试Apache JMeter脚本一文。

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

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