|
3#
楼主 |
发表于 2008-2-25 18:10:49
|
只看该作者
/* -------------------------------------------------------------------------------
Script Title :
Script Description :
Recorder Version : 1008
------------------------------------------------------------------------------- */
vuser_init()
{
...
....
////登陆
web_submit_data("login.action",
"Action=http://****/login.action",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://****/login.jsp?sessionID={****}",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
//登陆用户帐号参数 NewParam_1
"Name=user.name", "Value={NewParam_1}", ENDITEM,
"Name=user.password", "Value=******", ENDITEM,
EXTRARES,
"Url=images/left_bk1.gif", ENDITEM,
LAST);
....
....
}
Action()
{
...
...
web_submit_data("batchDeduct.action",
"Action=http://****/batchDeduct.action",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://****/batchDeduct.jsp",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
//上传文件的路径参数 NewParam
"Name=excel", "Value={NewParam}", "File=Yes", ENDITEM,
"Name=Submit", "Value=提交", ENDITEM,
LAST);
...
...}
vuser_end()
{...}
用的lr8.0
以上是代码的参数的两个地方,服务器对于同一个用户登陆是会弹出对话框报错的,但是没有录上,又不知道怎么去获取服务器弹出的错误提示,所以在加压时,多个用同一个用户loadrunner也没有报错,就通过了。
[ 本帖最后由 kela320 于 2008-2-25 18:15 编辑 ] |
|