|
3#
楼主 |
发表于 2011-1-5 14:06:05
|
只看该作者
LoginAction()
{
lr_start_transaction("HomePage");
web_browser("login.jsp",
DESCRIPTION,
ACTION,
"Navigate=http://{URL}/ut/regnlogin/login.jsp",
LAST);
lr_end_transaction("HomePage", LR_AUTO);
lr_think_time(4);
web_edit_field("nickname",
"Snapshot=t1.inf",
DESCRIPTION,
"Type=text",
"Name=nickname",
ACTION,
"SetValue={USERNAME}",
LAST);
web_edit_field("password_2",
"Snapshot=t3.inf",
DESCRIPTION,
"Type=password",
"Name=password",
ACTION,
"SetEncryptedValue={PASSWORD}",
LAST);
web_edit_field("rdcode",
"Snapshot=t4.inf",
DESCRIPTION,
"Type=text",
"Name=rdcode",
ACTION,
"SetValue=1111",
LAST);
web_reg_find("Search=All",
"SaveCount=homepage_count",
"Text=个性化欢迎信息:",
LAST);
lr_rendezvous("rendezvous_login");
lr_vuser_status_message("we are on login rendezvous");
lr_start_transaction("login");
web_button("INPUT",
"Snapshot=t5.inf",
DESCRIPTION,
"Type=submit",
"Tag=INPUT",
"ID=loginEntry_0",
ACTION,
"UserAction=Click",
LAST);
lr_output_message("open is sucess is: %s", lr_eval_string("{homepage_count}"));
if (atoi(lr_eval_string("{homepage_count}")) == 1) //如果登录返回页面初始化成功
{
lr_end_transaction("login", LR_PASS);
}
else
{
lr_end_transaction("login", LR_FAIL);
lr_error_message("login error by nickname,pwd is:%s,%s", lr_eval_string("{USERNAME}"),lr_eval_string("{PASSWORD}"));
//lr_exit( LR_EXIT_ITERATION_AND_CONTINUE,LR_FAIL );
}
return 0;
}
这是我的脚本,多多指教,下面是url的参数设置
username,pwd参数设置
开题所述那些错误,虚拟用户少时100用户以下不出现,虚拟用户多(200-400)时越来越多。。。 |
|