Jmeter-如何为计数器添加前缀.类似于随机变量 [英] Jmeter - how to add prefix to a counter. Similar to a random variable
本文介绍了Jmeter-如何为计数器添加前缀.类似于随机变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当前,在随机变量中,我可以在变量的输出格式中添加前缀或后缀.但是,此简单功能不适用于简单的计数器控制器.每次我使用变量时,将string + $ {counter}串联起来都不是我的一个好选择,因为我经常这样做.
Currently in the random variable I can put a prefix or suffix in the output format of the variable. However this nice feature is not available for a simple counter controller. Concatenating string+${counter} every time when i use the variable is not a good option form me since i do this a lot.
是否可以通过随机变量的方式来实现前缀+计数器?
Is there any way to achieve prefix+counter in a way random variable do this?
谢谢.
推荐答案
您是否在谈论Counter Config Element?
Are you talking about Counter Config Element ?
如果是这样,可以使用数字格式属性:
If so it is possible using Number Format attribute:
请参阅:
Format Optional format, e.g. 000 will format as 001, 002 etc.
This is passed to DecimalFormat, so any valid formats can be used.
If there is a problem interpreting the format, then it is ignored.
[The default format is generated using Long.toString()]
这篇关于Jmeter-如何为计数器添加前缀.类似于随机变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文