|
[localimg=400,300]2[/localimg]最近公司一个项目出现了严重的内存泄露,需要确定问题出在哪,为此做了性能测试。
首先用web(http/html)录制,发现很多控件都不能录制到,就连网页的左边按钮都不能录制到,原因是网页使用了一些applet和activex控件。所以尝试用了web(click and sripts)录制,但录制后还是碰到以下两个问题,请求高手指点。
问题一:录制完的recording summary中总是提示网页中的activex控件不被允许,但实际上用IE是可以打开的。
尝试解决方法:1、在回放窗口开启activex控件
2、IE中开放所有的Activex相关设置
问题二:重放时,登录系统后总是找不到网页中的frame。
尝试解决方法:1、rocording options ---> GUI properties ---> Web event configuration设置成高级
2、recording options ---> GUI properties ---> advanced 设置附件所示
也曾试勾选”recording rendering-related properties values",但由于实在是太慢了,所以没成功。
没找到frame的replay log和脚本如下
脚本:Action()
{
web_add_cookie_ex("Cookie=cookieLeftMenuadmin=0,0; domain=191.0.0.9; path=/bapaims/commons/index/",
ENDITEM,
LAST);
web_browser("login.jsp",
DESCRIPTION,
ACTION,
"Navigate=http://191.0.0.9/bapaims/login.jsp",
LAST);
lr_think_time(8);
web_edit_field("userid",
"Snapshot=t1.inf",
DESCRIPTION,
"Type=text",
"Name=userid",
ACTION,
"SetValue=admin",
LAST);
lr_think_time(15);
web_edit_field("password",
"Snapshot=t2.inf",
DESCRIPTION,
"Type=password",
"Name=password",
ACTION,
"SetValue=admin12369874",
LAST);
web_static_image("static_image",
"Snapshot=t3.inf",
DESCRIPTION,
"Alt=",
"ID=",
"Name=",
"Ordinal=2",
ACTION,
"ClickCoordinates=21,9",
LAST);
web_element("政府投资项目管理",
"Snapshot=t4.inf",
DESCRIPTION,
"Text=政府投资项目管理",
"Tag=TD",
"FrameName=lelfMenu",
ACTION,
"UserAction=Click",
LAST);
web_element("项目进度管理",
"Snapshot=t5.inf",
DESCRIPTION,
"Text=项目进度管理",
"Tag=TD",
"FrameName=",
ACTION,
"FireEvent=onmouseover",
LAST);
web_element("A类投资项目",
"Snapshot=t6.inf",
DESCRIPTION,
"Text=A类投资项目",
"Tag=TD",
"FrameName=",
ACTION,
"FireEvent=onmouseover",
LAST);
web_text_link("B类投资项目",
"Snapshot=t7.inf",
DESCRIPTION,
"Text=B类投资项目",
"FrameName=",
ACTION,
"UserAction=Click",
LAST);
lr_think_time(4);
web_element("199",
"Snapshot=t8.inf",
DESCRIPTION,
"Text=199",
"Tag=TD",
"FrameName=main",
ACTION,
"FireEvent=onmouseover",
LAST);
lr_think_time(5);
web_element("0",
"Snapshot=t9.inf",
DESCRIPTION,
"Text=0",
"Tag=TD",
"Ordinal=26",
"FrameName=main",
ACTION,
"FireEvent=onmouseover",
LAST);
lr_think_time(5);
web_element("TD",
"Snapshot=t10.inf",
DESCRIPTION,
"Text=",
"Tag=TD",
"Ordinal=81",
"FrameName=main",
ACTION,
"FireEvent=onmouseover",
LAST);
web_check_box("checkbox1",
"Snapshot=t11.inf",
DESCRIPTION,
"Name=checkbox1",
"Ordinal=63",
"FrameName=main",
ACTION,
"Set=ON",
LAST);
web_check_box("checkbox1_2",
"Snapshot=t12.inf",
DESCRIPTION,
"Name=checkbox1",
"Ordinal=64",
"FrameName=main",
ACTION,
"Set=ON",
LAST);
web_check_box("checkbox1_3",
"Snapshot=t13.inf",
DESCRIPTION,
"Name=checkbox1",
"Ordinal=65",
"FrameName=main",
ACTION,
"Set=ON",
LAST);
lr_think_time(4);
web_button("INPUT",
"Snapshot=t14.inf",
DESCRIPTION,
"Type=button",
"Tag=INPUT",
"ID=",
"Value=打印二",
"FrameName=main",
ACTION,
"UserAction=Click",
LAST);
lr_think_time(20);
web_browser("Close",
"Snapshot=t15.inf",
DESCRIPTION,
"Ordinal=2",
ACTION,
"UserAction=Close",
LAST);
lr_think_time(7);
web_element("0_2",
"Snapshot=t16.inf",
DESCRIPTION,
"Text=0",
"Tag=TD",
"Ordinal=175",
"FrameName=main",
ACTION,
"FireEvent=onmouseover",
LAST);
web_image_link("image_link",
"Snapshot=t17.inf",
DESCRIPTION,
"Alt=",
"ID=",
"Name=",
"Ordinal=5",
"FrameName=banner",
ACTION,
"ClickCoordinates=31,17",
LAST);
return 0;
}
[ 本帖最后由 rocky_chen0423 于 2009-11-12 09:31 编辑 ] |
|