是否可以设置全局属性以自动从JMeter中的html文件中检索所有嵌入资源。我知道我们可以在计划中的Http请求和Http Request Defaults中检查/取消选中此项,但在.properties文件中是否有类似的选项。
另外,如果我检查Http Request Defaults元素上的选项,如何在计划中为单个Http请求禁用它?
答案 0 :(得分: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.
答案 1 :(得分:0)
您可以通过将脚本代码设置为javascript语言,将BSF PreProcessor
添加到覆盖默认配置的HTTP Sampler
:
sampler.setProperty("HTTPSampler.image_parser",${LOAD_ALL_PAGE_RESOURCES},false);
其中LOAD_ALL_PAGE_RESOURCES
是用户定义的变量
如果您将此BSF PreProcessor
设置为Thread Group
,则该值对其中定义的所有Http Sampler
都有效。