简体   繁体   English

jmeter 不能接受参数?

[英]jmeter not able to accept parameters?

I have a weird problem.我有一个奇怪的问题。

I am not able to send request parameters to the LocalHost while uploading an image.上传图片时,我无法向LocalHost发送请求参数。

After selecting HTTP request sampler , I add request parameters, the add a file and parameter name for it.选择HTTP request sampler后,我添加请求参数,为其添加文件和参数名称。 If I don't put parameter name for the image it accepts the request parameters, I put the parameter name for the image, then it doesn't accept the request parameters.如果我不为接受请求参数的图像输入参数名称,我为图像输入参数名称,则它不接受请求参数。

What could be the problem?可能是什么问题呢?

PS: I have HTTP cookie manager, HTTP request(for logging in and get the session), then another HTTP request for sending request parameters and image with the parameter name. PS:我有 HTTP cookie 管理器,HTTP 请求(用于登录并获取会话),然后是另一个 HTTP 请求,用于发送请求参数和带有参数名称的图像。 At last View Results Tree.最后查看结果树。

The easiest way to format your request is to RECORD the action, and then modify the parameters.格式化请求的最简单方法是记录操作,然后修改参数。 This guarantees several things:这保证了几件事:

  1. You have the correct method (POST / GET / etc)您有正确的方法(POST / GET / 等)
  2. All parameter names are correct (the wrong character case can kill you)所有参数名称都是正确的(错误的字符大小写会杀死你)
  3. All parameters are captured.捕获所有参数。

Additionally, JMETER has as field at the bottom of the HTTP request for attaching additional files.此外,JMETER 在 HTTP 请求的底部有作为附加文件的字段。 It is here that you need to specify the full file path and file type.您需要在这里指定完整的文件路径和文件类型。 This will most likely mirror what you've put into the parameters.这很可能会反映您在参数中输入的内容。

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

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