将在Benashell后处理器或采样器中显示的Jmeter计数器功能值 [英] Jmeter counter function value to be displayed in Benashell Post Processor or sampler

查看:622
本文介绍了将在Benashell后处理器或采样器中显示的Jmeter计数器功能值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想评估一下.

 ${productId_1} 
 ${productId_2} 

它应该像这样简单:

${__V(productId${counter})}

相同的方法适用于__counter()函数:

Same approach applies to __counter() function:

${__V(productId_${__counter(,)})}

如何在Beanshell处理器/示例中显示值而不是线程名称

How can I display the value in Beanshell processor/sample instead of the thread name

推荐答案

这是显示或使用计数器函数值或计数器与变量结合使用的方式 我在每个控制器的Beanshell示例中使用了此

This is how one can display or use the counter function value or counter in conjunction with variable I am using this inside the Beanshell sample under the for each controller

Product = vars.get("Product_" + $ {__ counter(,)});

Product = vars.get("Product_" + ${__counter(,)});

//将计数器值保存到变量

//save counter value into variable

counter = $ {__ counter(,)}; log.info("Counter =" + counter);

counter = ${__counter(,)}; log.info("Counter ="+counter);

这篇关于将在Benashell后处理器或采样器中显示的Jmeter计数器功能值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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