JMeter - 无法正确分配密码变量

时间:2017-11-13 03:35:47

标签: login jmeter passwords

我从CSV文件user:sysadmin, pass:"Pass@123456"设置了用户名和密码,但根据请求密码加密错误

User=sysadmin&Pass=Pass%40123456

2 个答案:

答案 0 :(得分:2)

The fact you see it as Pass@123456 doesn't necessarily mean that JMeter is sending wrong data, it might be either by intention due to string-based request representation in Raw form of request inspection in the View Results Tree listener or by accident (just a bug in it. You can check JMeter Issue Tracker to see whether similar issues were reported already)

In the mean time try switching to the HTTP tab of the View Results Tree listener:

JMeter View Results Tree

Or double check what you're sending using a sniffer tool like Fiddler or Wireshark

JMeter Wireshark Inspect Request

But first of all I would recommend verifying your CSV data via Debug Sampler or temporarily switching to hard-coded (not parameterized) data to see if it resolves your issue.

答案 1 :(得分:1)

@在发送HTTP请求时被编码。

您需要添加HTTP Header Manager 变量名Content-Type且值application/x-www-form-urlencoded, 这将告诉服务器需要解码的值