Jmeter即使在http请求中设置了参数accountnumber
这是我发现的非常条件的问题。我正在尝试发送Jemeter的请求。它不断说我的badrequest和帐户名没有设定。但是我是从Jemeter的参数设置的。 我从邮递员那里运行了同样的请求,但它正在工作,但无法从Jmeter起作用。
Connection: keep-alive
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Ik9FWUZrWVJmUU0zX2tLamEzTGJ0Q0EiLCJ0eXAiOiJhdCtqd3QifQ.eyJuYmYiOjE2NTM4MDQ5OTcsImV4cCI6MTY1MzgwODU5NywiaXNzIjoiaHR0cHM6Ly9hcHAtaW5mLWlkcy10cy1xYS5henVyZXdlYnNpdGVzLm5ldCIsImF1ZCI6ImRvYy1nZW4iLCJjbGllbnRfaWQiOiJkb2MtZ2VuIiwiY2xpZW50X1NoYXJlZFNlY3JldCI6ImNzZ0MwcWNWZkIvLzlJZ1NpUTE5RUdRUlYrRURwNWZ6QzIyaHRMWmdYSVU9Iiwic2NvcGUiOlsiZG9jLWdlbiJdfQ.cFtbTYmUKRa-8jlm9uLlsax-9lylOEvpdO9WxDN-eXpBlQtryLjrtaZvxGTM2kMRLwSd97jZIth0v6PnuQivEiEenvg0nYI02rfCDmNVNgvIzeplsBrD410MaeyGNYHfdWT_ZgfhWdhgosf7b-8h22Br6ySfojd8hUaTt5njgoYf7x5hBrylgE8URN_D9SUpQY7r9v1Pftwx4S6E5cKa8Uc5kt4hQdaXvJnu0WixLBcAL38HqDaIIZwP-r9dHJ_j0sSWs7baPm_9ekK4NI_BByx1wY8jzeSbnmtIEyCAkVXtVQ4SCYd7DqejZnsM0hJ62_keAoOpFzfbnwBo6BqNfg
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate, br
Content-Length: 25
Host: app-test.azurewebsites.net
User-Agent: Apache-HttpClient/4.5.12 (Java/11.0.11)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过这种方式进行操作,
将http请求采样器的
路径更改为
并添加标头管理器提供以下详细信息,U can do it by this way,
Change the
path of the http request sampler
to/api/vi/Documents/Requests/Initialize?accountNumber=88925982303
and add a header manager with below details,如果您能够使用Postman成功运行请求,则只需使用Jmeter的
启动jmeter的
在Postman中运行您的请求
jmeter中运行您的请求,将生成相关的 http heater
更多信息:如何将邮递员API测试转换为jmeter以进行缩放
特别是您需要的情况。在URL中传递
accountnumber
,而不是在请求主体中。If you're able to successfully run your request using Postman you can just record it using JMeter's HTTP(S) Test Script Recorder
Start JMeter's HTTP(S) Test Script Recorder
Import JMeter's MITM certificate to Postman
Configure Postman to use JMeter as the proxy

Run your request in Postman
JMeter will generate the relevant HTTP Request sampler and the HTTP Header Manager
More information: How to Convert Your Postman API Tests to JMeter for Scaling
In particular your case you need to pass the
accountNumber
in URL, not in the request body.