4

是否可以设置全局属性以自动从 JMeter 中的 html 文件中检索所有嵌入资源。我知道我们可以在计划中的 Http Request 和 Http Request Defaults 中选中/取消选中它,但是 .properties 文件中是否有类似的选项。

此外,如果我确实检查了 Http Request Defaults 元素上的选项,如何为计划中的单个 Http Request 禁用它?

4

2 回答 2

2

从 2.8 开始还不可能,对此有一个增强请求:

关于第二个问题,答案在这里:

见说明:

   Note: radio buttons only have two states - on or off. This makes it impossible to
   override settings consistently - does off mean off, or does it mean use the current 
   default? JMeter uses the latter (otherwise defaults would not work at all). So if    
   the button is off, then a later element can set it on, but if the button is on, a 
   later element cannot set it off.
于 2012-10-26T21:21:04.707 回答
1

您可以 通过将脚本代码设置为 javascript 语言来添加一个覆盖默认配置的脚本代码BSF PreProcessorHTTP Sampler

 sampler.setProperty("HTTPSampler.image_parser",${LOAD_ALL_PAGE_RESOURCES},false);

LOAD_ALL_PAGE_RESOURCES用户定义的变量在哪里

如果将其设置BSF PreProcessor为 a它对其中定义Thread Group的所有内容均有效。Http Sampler

如此链接所述: http ://www.havecomputerwillcode.com/blog/?p=543

于 2014-07-02T13:03:18.117 回答