100个用户登陆,然后触发战斗 flex+socket
刚接触loadrunner 帮忙看下会啥出错Action.c(18): Error: Parameter 'userName': No more unique values for this parameter in table 'userName.dat' .The parameter continues with last value of the range according to "When Out Of Values" policy.
runsetting 中设置1
data.ws 内容
;WSRData 2 1
sendbuf0 46
"<policy-file-request/>"
"\x00"
"<policy-file-request/>"
"\x00"
recvbuf1 178
"<cross-domain-policy> <allow-access-from domain=\"*\" to-ports=\"*\"/></cr"
"oss-domain-policy>"
"\x00"
"<cross-domain-policy> <allow-access-from domain=\"*\" to-ports=\"*\"/></cr"
"oss-domain-policy>"
"\x00"
sendbuf2 54
"d&n&<userName>&<passWord>d&n&<userName>&<passWord>"
sendbuf3 54
"d&n&<userName>&<passWord>d&n&<userName>&<passWord>"
sendbuf4 30
"m&03&<userName>&235m&03&<userName>&235"
recvbuf5 14
"m&03&<userName>#61"
sendbuf6 15
"k&01&<userName>&189"
/*
recvbuf7 92
"k&00&1#0#0#0#61#189#1180#0#0#0#360#0#0#0#14|3#0#189#4#14|3#0#189#1#15|5#0#"
"0#test40^288^1^#14"
*/
-1
////////////////////////////////////////////////////////////////////////////////////
action 内容
Action()
{
web_add_auto_header("x-flash-version", "10,0,45,2");
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=PRIVE-F244E6C28:5859", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=PRIVE-F244E6C28:5859", LrsLastArg);
lrs_create_socket("socket2", "TCP", "LocalHost=0", "RemoteHost=PRIVE-F244E6C28:5860", LrsLastArg);
lrs_send("socket2", "buf2", LrsLastArg);
lr_start_transaction("transLogin");
lrs_send("socket1", "buf3", LrsLastArg);
lr_start_transaction("transChat");
lr_think_time(5);
lrs_send("socket2", "buf4", LrsLastArg);
lr_start_transaction("transScenario");
lr_rendezvous("rdVerify");
lrs_receive("socket2", "buf5", LrsLastArg);
lr_end_transaction("transScenario", LR_AUTO);
lr_end_transaction("transChat", LR_AUTO);
lr_end_transaction("transLogin", LR_AUTO);
lrs_send("socket2", "buf6", LrsLastArg);
lr_start_transaction("transAttack");
lrs_receive("socket2", "buf7", LrsLastArg);
lr_rendezvous("rdAttack");
lr_end_transaction("transAttack", LR_AUTO);
return 0;
}
我的参数设置如附件图所示。我从数据库中读取100条数据····
[ 本帖最后由 czh870916 于 2010-6-9 12:04 编辑 ] ~~~~汗個·· Parameter 'userName': No more unique values for this parameter in table 'userName.dat' .The parameter continues with last value of the range according to "When Out Of Values" policy.
这个报错是说你的参数化设置策略有问题,你设置的唯一值,但自动分块只取1个值,这样并发迭代的时候肯定会报错。建议参数化文件里的参数尽量多,保证在并发迭代时不会有重复。另外发现你的user_name和user_pwd没有一一对应,如果跑起来依然会有问题。把user_name和user_pwd放到同一个参数化文件里吧。 參數儘量多··沒有理解意思··?
user_name 和user_pwd沒有一一對應我有設置same line as userName這樣不行嗎?
如果把user_name 和user_pwd放到同一參數文件中 那我應怎樣參數下列這個語句
"d&n&<userName>&<passWord>d&n&<userName>&<passWord>" 参数化和原来的一样,只是在使用参数时,选择同一个XXXX.dat文件就可以了 瞭解謝謝了····
页:
[1]