jmeter-如何在* jtl文件中进行测量时忽略所选采样器 [英] jmeter - How to ignore selected samplers from getting measured in the *jtl file

查看:166
本文介绍了jmeter-如何在* jtl文件中进行测量时忽略所选采样器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的测试配置:

循环控制器

--> Beanshell Sampler 

        vars.put("test", "${__CSVRead(*test,0)}");
        Add it to an existing array retrieved from vars.getObject

在上述情况下,我正在循环控制器中动态构造我的请求有效负载.我必须将CSVRead函数放在循环控制器下的单独Beanshell采样器中,因为如果我在Beanshell采样器内部的for循环内使用"$ {__ CSVRead(* test,0)}"来读取示例行, .

In the above scenario, I am constructing my request payload dynamically in a loop controller. I had to put the CSVRead function in a separate Beanshell sampler under the loop controller since "${__CSVRead(*test,0)}" was reading the sample line if I use it within a for loop inside the beanshell sampler (interpreted mode).

虽然上述配置满足了我的要求,但由于BeanShell采样器一直在进行测量,因此即使进行30分钟的负载测试,我的* .jtl文件的大小也会不断增加.虽然我可以使用FilterResults工具过滤所需的数据,但我想知道如何在执行过程中像TestActionSampler一样避免这种情况

While the above configuration meets my requirement, my *.jtl files are growing in size even for a 30 minute load test since the BeanShell sampler is getting measured all the time. While I am able to filter the required data by using the FilterResults tool, I want to know how to avoid this during the execution itself like the TestActionSampler

推荐答案

我使用以下配置对其进行了解决.

I resolved it by using the following configuration.

Loop Controller
 --> Test Action Sampler
   --> Beanshell timer returning 0 at the end
        vars.put("test", "${__CSVRead(*test,0)}");
        Add it to an existing array retrieved from vars.getObject
        return 0;

这篇关于jmeter-如何在* jtl文件中进行测量时忽略所选采样器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆