|
最近在对论坛做一个性能测试 :场景是用户登陆后40%概率浏览,30%概率发帖,20%概率回帖,10%概率搜索。
其中前三个场景的脚本是前天在自己本机录制,搜索的脚本今天录制的时候,出现了无法录制的问题,不知道怎么解决。
结果就在同事的机子上进行录制搜索(直接以游客身份录制的,未登录),录制完以后,脚本拷贝到我的机器上,回放可以成功(脚本如下)。
但是当将这个脚本拷贝到场景中block-〉search下面时,回放就报错了(从用户登录开始回放,其他事件概率设置为零,搜索设置为100%),提示说表单没找到。
Action()
{
web_url("frame.html",
"URL=http://10.50.107.9:8090/portal/frame.html?module=frame&action=frame",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
// EXTRARES,
// "Url=templates/default/styles/style.css?1363168207711", "Referer=http://10.50.107.9:8090/portal/forums/list.html", ENDITEM,
// "Url=templates/default/images/menu_bg.gif", "Referer=http://10.50.107.9:8090/portal/templates/default/styles/style.css?1363168207711", ENDITEM,
// "Url=templates/default/images/menu_line.gif", "Referer=http://10.50.107.9:8090/portal/templates/default/styles/style.css?1363168207711", ENDITEM,
// "Url=templates/default/images/header_bg.gif", "Referer=http://10.50.107.9:8090/portal/templates/default/styles/style.css?1363168207711", ENDITEM,
// "Url=templates/default/images/box_bg.gif", "Referer=http://10.50.107.9:8090/portal/templates/default/styles/style.css?1363168207711", ENDITEM,
LAST);
// lr_think_time(4);
web_link("搜索",
"Text=搜索",
"Snapshot=t2.inf",
EXTRARES,
"Url=../templates/default/styles/style.css?1363168207711", ENDITEM,
LAST);
lr_think_time(1);
lr_rendezvous("jihedian");
lr_start_transaction("sousuo");
web_submit_form("jforum.html",
"Snapshot=t3.inf",
ITEMDATA,
"Name=search_keywords", "Value={keywords}", ENDITEM,
"Name=match_type", "Value=all", ENDITEM,
"Name=search_forum", "Value=所有的", ENDITEM,
"Name=sort_by", "Value=关联性", ENDITEM,
LAST);
// lr_think_time(1);
lr_end_transaction("sousuo", LR_AUTO);
lr_think_time(1);
web_find("web_find",
"What=搜索结果",
LAST);
return 0;
}
---------------报错信息如下
earch.c(17): Detected non-resource "http://10.50.107.9:8090/portal/ping_session.jsp" in "http://10.50.107.9:8090/portal/search/filters.html" [MsgId: MMSG-26574]
search.c(17): web_link("搜索") was successful, 6564 body bytes, 317 header bytes, 13 chunking overhead bytes [MsgId: MMSG-26385]
search.c(27): Rendezvous jihedian
search.c(30): Notify: Transaction "sousuo" started.
search.c(33): Notify: Parameter Substitution: parameter "keywords" = "111"
search.c(33): Error -27979: Requested form not found [MsgId: MERR-27979]
search.c(33): web_submit_form("jforum.html") highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-26388]
search.c(33): Notify: Transaction "sousuo" ended with "Fail" status (Duration: 0.0498).
Ending action search.
Ending iteration 1. |
|