|
服务器为Linux+Apache+Mysql,用php编写的网络通行证
测试机为WIN XP,loadrunner7.8
录制:在登录页面输入用户名密码,点击登陆,进入一个只显示“登陆成功”的页面。
使用虚拟用户顺序为:
1.10个时顺利通过
2.50个时
3.100个1个事务失败,报1个错误Action.c(26): Error -27790: Failed to read data from server "**": [10053] Software caused connection abort
4.200个2个事务失败,报2个错误,同上
6.再次使用10个虚拟用户,1个事务失败,报1个错误,同上
脚本如下:
#include "as_web.h"
Action()
{
web_url("passport.tcommunicatte.com",
"URL=http://passport.tcommunicatte.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=/images/pl_zp_010.gif", ENDITEM,
"URL=/images/pl_zp_009.gif", ENDITEM,
"URL=/images/pl_zp_011.gif", ENDITEM,
"URL=/images/logo.gif", ENDITEM,
LAST);
lr_think_time(50);
lr_rendezvous("denglu");
lr_think_time(3);
web_submit_form("passport.tcommunicatte.com_2",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=remember", "Value=<OFF>", ENDITEM,
"Name=submit", "Value=登 录", ENDITEM,
LAST);
lr_think_time( 50 );
web_set_sockets_option("CLOSE_KEEPALIVE_CONNECTIONS","1");
return 0;
} |
|