"unique number"类型的参数设置

博主在51testing上提出“unique number”参数设置问题,文档介绍设置起始数和块大小后各虚拟用户按规则取值,但博主设置后输出未按预期加500而是自动加1。jut984907网友解答,指出block是每个虚拟用户使用数值的范围。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

以下是我在51testing上提的问题及回答内容:
我的提问:
在文档中介绍如何使用“unique number”的使用方法如下:
When you use a Unique Number parameter type, you specify a start number
and a block size. The block size indicates the size of the block of numbers
assigned to each Vuser. Each Vuser begins at the bottom of its range and
increments the parameter value for each iteration. For example, if you set
the Start number at 1 with a block of 500, the first Vuser uses the value 1
and the next Vuser uses the value 501, in their first iterations.
但是,我设置后却不是这样
脚本如下:
Action1()
{
        "{key}";
        lr_output_message("%s",lr_eval_string("{key}"));
       
        return 0;
}
其中对key设置为start=1,block=500
但是在输出中仍是
1
2
是自动加1 ,并不是自动加500。
请问这是为什么呢?
请指教。谢谢

jut984907网友回答:
当有两个虚拟用户,每个虚拟用户循环100次时
第一个虚拟用户的第一个循环数值=1,第二个循环=2,第三个=3....
那么,第二个虚拟用户第一个循环数值=501,第二个循环=502,第三个=503....
block指每个虚拟用户使用数值的范围

转载于:https://www.cnblogs.com/morebetter/archive/2005/10/27/262856.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值