JMeter-如何获取测试组的最大循环? [英] JMeter - how to get test group's max loops?

查看:140
本文介绍了JMeter-如何获取测试组的最大循环?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得测试组中的最大循环数.但是如何?

I want to get the max number of loops in the test group. But how?

我在这里看不到与循环有关的任何东西

I do not see anything to do with loops here

JMeterContextService.getContext().getThreadGroup()

推荐答案

循环次数与线程组无关,它是基础

Number of loops is not about the Thread Group, it is property of the underlying Loop Controller so you need to amend your code like:

ctx.getThreadGroup().getSamplerController().getProperty('LoopController.loops')

演示(假设使用 __groovy()函数):

有关JMeter中脚本编写的更多信息: Apache Groovy-为什么和如何使用它

More information on scripting in JMeter: Apache Groovy - Why and How You Should Use It

这篇关于JMeter-如何获取测试组的最大循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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