【问题标题】:jMeter: load file content on http request bodyjMeter:在http请求正文上加载文件内容
【发布时间】:2022-01-27 05:29:39
【问题描述】:

我正在尝试将文件内容注入请求正文:

我正在使用:

${__FileToString(${__eval(${bundle})},,)}

我已经使用directory listing plugin 配置了bundle 变量:

当我执行测试时,我得到:

日志让我着迷:

2021-12-28 16:33:53,853 WARN o.a.j.f.FileToString: Could not read open: /patient-bundle-0193.json

根据我的配置,__FileToString 应该从/home/jeusdi/projects/workarea/salut/mpi/jsons/bundles/extractions/10000/bundles 读取而不是从/...

有什么想法吗?

【问题讨论】:

    标签: jmeter


    【解决方案1】:

    勾选Use full path,这样您的bundle JMeter Variable 将包含文件的绝对位置。

    请注意,JMeter 变量及其各自的值可以使用Debug SamplerView Results Tree 侦听器组合进行可视化。

    您可能还对Introducing the Directory Listing Config Plugin on JMeter 文章感兴趣

    【讨论】:

      猜你喜欢
      • 2019-02-28
      • 2018-01-26
      • 2014-08-08
      • 2019-10-16
      • 1970-01-01
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      • 2015-04-12
      相关资源
      最近更新 更多