【问题标题】:Add a Key for Request Body in JMeter在 JMeter 中为请求正文添加密钥
【发布时间】:2020-03-27 14:26:36
【问题描述】:

我正在 JMeter 中运行性能测试 因此,在我的情况下,我需要将请求正文作为 Json 字符串以及一个名为“json”的键提供

当像邮递员一样传递请求正文时,我无法在 JMeter 上找到提供密钥的方法 例如:键值 json {一些 JSON 字符串}

我在 JMeter 中的尝试:

邮递员 API 调用:

【问题讨论】:

    标签: json jmeter


    【解决方案1】:

    只需切换到“参数”选项卡,您将在其中以名称-值对的形式对请求参数进行类似 Postman 的样式定义

    接下来,如果您可以在 Postman 中成功执行请求,您应该可以使用 JMeter 的 HTTP(S) Test Script Recorder 记录请求,只需 configure Postman to use JMeter as the proxy

    如果您的请求假定test.pdf 文件上传,请确保copy this file to the "bin" folder of your JMeter installation

    【讨论】:

      猜你喜欢
      • 2017-12-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-16
      • 1970-01-01
      相关资源
      最近更新 更多