PUT condition is giving bad request when I am giving through parameter

huangapple go评论49阅读模式
英文:

PUT condition is giving bad request when I am giving through parameter

问题

具有put条件,当我将参数传递到路径中时,它可以正常工作,但当我从参数部分提供它时,它会给我一个坏请求。

使用204状态代码正常工作:

PUT condition is giving bad request when I am giving through parameter

使用400错误无法正常工作:

PUT condition is giving bad request when I am giving through parameter

我正在使用相同的标头管理器,一切都完好。我在这里缺少什么?

英文:

Have a put condition and when I am passing the parameter in the path it is working fine but when I am giving it from the parameter section it is giving me bad request.

Working fine with 204 status code:

PUT condition is giving bad request when I am giving through parameter

Not working with 400 error

PUT condition is giving bad request when I am giving through parameter

I am using same header manager and everything is intact. What I am missing here

答案1

得分: 1

你在这里遗漏了一个重要的部分:你不应该将一个 JMeter 请求与另一个 JMeter 请求进行比较,你需要查看真实浏览器中的请求,使用 "网络选项卡" 的 浏览器开发者工具,然后在 JMeter 中以100%的准确度复制它。

更快捷、更简便的方法是使用 JMeter 的 HTTP(S)测试脚本录制器JMeter Chrome 扩展 来录制你的请求。

如果你仍然想知道 "你在这里遗漏了什么",可以使用 "查看结果树" 监听器查看请求,我预期 JMeter 正在将 "selectedState" 发送为 Processing.Initial+Test+Passed,而在 URL 查询字符串中,你的请求中有 Processing.Initial%20Test%20Passed。很可能你正在尝试测试的应用程序开发人员对 HTML URL 编码参考 不太熟悉。

英文:

You're missing here one important bit: you should not be comparing one JMeter request to another JMeter request, you need to take a look at the request from the real browser using "Network tab" of the browser developer tools and then replicate it in JMeter with 100% accuracy.

A faster and an easier way would be just recording your request using JMeter's HTTP(S) Test Script Recorder or JMeter Chrome Extension.

If you still want to know "what you are missing here" take a look at requests using View Results Tree listener, my expectation is that JMeter is sending "selectedState" as Processing.Initial+Test+Passed and looking into URL query string you have Processing.Initial%20Test%20Passed there. Most likely developers of the application you're trying to test are not too familiar with the HTML URL Encoding Reference

huangapple
  • 本文由 发表于 2023年6月29日 23:15:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76582404.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定