本文转自:http://www.51testing.com/?34866/action_viewspace_itemid_75554.html
作者:zibeike
问题提出:
方法:
脚本: 我把取到的参数值和对应的VuserID记录下来保存到一个文件中,下面是例子的脚本
long fileopen;
char *filename = "C:\\temp\\params.log";
vuser_init()
{
}
Action()
{
}
vuser_end()
{
}
参数设置为:
取唯一值,每次迭代更新。
运行时设置的迭代次数为2。
场景的设置:
虚拟用户数:5个
运行模式:没有设置duration,选择的“Run until complete”
完成后的日志文件params.log的内容如下:
1,a1,b1,Thu Jan 01 08:00:05 1970
1,a2,b2,Thu Jan 01 08:00:05 1970
10,a5,b5,Thu Jan 01 08:00:05 1970
10,a6,b6,Thu Jan 01 08:00:05 1970