英文:
PUT condition is giving bad request when I am giving through parameter
问题
具有put
条件,当我将参数传递到路径中时,它可以正常工作,但当我从参数部分提供它时,它会给我一个坏请求。
使用204状态代码正常工作:
使用400错误无法正常工作:
我正在使用相同的标头管理器,一切都完好。我在这里缺少什么?
英文:
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:
Not working with 400 error
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论