51Testing软件测试论坛

标题: 请问,事务 是在 web_submit_data函数前插入,还是在之后插入啊? [打印本页]

作者: xqplanbai    时间: 2012-12-5 16:06
标题: 请问,事务 是在 web_submit_data函数前插入,还是在之后插入啊?
想在我想统计 登录系统的响应时间,这个事务应该在哪个地方插入呢?是在 web_submit_data函数前插入,还是在之后插入啊?

下面的代码是插在了web_submit_data函数后面,不知对不对:
Action()
{


        lr_rendezvous("login_jh");/*插入集合点*/

        web_submit_data("login.action",
                "Action=http://192.168.8.3:8061/lims/login.action?method=goin",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.8.3:8061/lims/login.action;jsessionid=4A7617FBD8182400ECE308350EDE5839?method=login",
                "Snapshot=t8.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=loginname", "Value={username}", ENDITEM,
                "Name=loginpwd", "Value=123456", ENDITEM,
                "Name=verifycode", "Value=", ENDITEM,
                "Name=uri", "Value=", ENDITEM,
                "Name=RandomData", "Value=", ENDITEM,
                "Name=SerialNumber", "Value=", ENDITEM,
                "Name=Digest", "Value=", ENDITEM,
                "Name=logintype", "Value=0", ENDITEM,
                EXTRARES,
                "Url=js/lhgdialog/skins/chrome.css", "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain", ENDITEM,
                "Url=Style/hzlan/css/red/index_01.jpg", "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain", ENDITEM,
                "Url=Style/hzlan/css/red/shouye-23.jpg", "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain", ENDITEM,
                "Url=Style/hzlan/images/main_c_bg.gif", "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain", ENDITEM,
                "Url=Style/hzlan/css/images/rImgBg.jpg", "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain", ENDITEM,
                "Url=js/lhgdialog/skins/chrome/lhgdg_x.gif", "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain", ENDITEM,
                "Url=js/lhgdialog/skins/chrome/lhgdg_bg.gif", "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain", ENDITEM,
                "Url=js/lhgdialog/skins/chrome/wait.gif", "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain", ENDITEM,
                "Url=Style/hzlan/css/images/place.gif", "Referer=http://192.168.8.3:8061/lims/topage.action?topage=main", ENDITEM,
                "Url=Style/hzlan/css/images/placeon.gif", "Referer=http://192.168.8.3:8061/lims/topage.action?topage=main", ENDITEM,
                "Url=Style/hzlan/css/images/index_46.jpg", "Referer=http://192.168.8.3:8061/lims/topage.action?topage=leftmenu", ENDITEM,
                "Url=Style/hzlan/images/bg1.gif", "Referer=http://192.168.8.3:8061/lims/topage.action?topage=leftmenu", ENDITEM,
                "Url=Style/hzlan/images/banner_ele_r1.png", "Referer=http://192.168.8.3:8061/lims/topage.action?topage=leftmenu", ENDITEM,
                "Url=Style/hzlan/images/bg2.gif", "Referer=http://192.168.8.3:8061/lims/topage.action?topage=leftmenu", ENDITEM,
                LAST);

        lr_start_transaction("login");/*插入事务,事务统计开始*/

        web_url("topage.action",
                "URL=http://192.168.8.3:8061/lims/topage.action?parunid=Jdfbbc7521264c7ea8c2b7d0a831ca9e",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain",
                "Snapshot=t9.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=Style/hzlan/css/images/index_46.jpg", "Referer=http://192.168.8.3:8061/lims/topage.action?parunid=Jdfbbc7521264c7ea8c2b7d0a831ca9e", ENDITEM,
                LAST);

        web_url("leadershouye.action",
                "URL=http://192.168.8.3:8061/lims/leadershouye.action?method=showLeaderpage",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain",
                "Snapshot=t10.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=Script/datePicker/WdatePicker.js", "Referer=http://192.168.8.3:8061/lims/leadershouye.action?method=showLeaderpage", ENDITEM,
                "Url=Script/datePicker/skin/WdatePicker.css", "Referer=http://192.168.8.3:8061/lims/leadershouye.action?method=showLeaderpage", ENDITEM,
                "Url=Style/hzlan/images/shouye/tit_R.jpg", "Referer=http://192.168.8.3:8061/lims/leadershouye.action?method=showLeaderpage", ENDITEM,
                "Url=Style/hzlan/images/shouye/tit_M.jpg", "Referer=http://192.168.8.3:8061/lims/leadershouye.action?method=showLeaderpage", ENDITEM,
                "Url=Style/hzlan/images/shouye/icon01.gif", "Referer=http://192.168.8.3:8061/lims/leadershouye.action?method=showLeaderpage", ENDITEM,
                "Url=Style/hzlan/images/shouye/midUl_bg.jpg", "Referer=http://192.168.8.3:8061/lims/leadershouye.action?method=showLeaderpage", ENDITEM,
                "Url=Style/hzlan/images/shouye/right_bor.jpg", "Referer=http://192.168.8.3:8061/lims/leadershouye.action?method=showLeaderpage", ENDITEM,
                LAST);

        web_url("My97DatePicker.htm",
                "URL=http://192.168.8.3:8061/lims/Script/datePicker/My97DatePicker.htm",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.8.3:8061/lims/login.action?method=showMain",
                "Snapshot=t11.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=lang/zh-cn.js", ENDITEM,
                "Url=skin/default/datepicker.css", ENDITEM,
                "Url=skin/whyGreen/datepicker.css", ENDITEM,
                "Url=skin/default/img.gif", ENDITEM,
                LAST);

        lr_end_transaction("login", LR_AUTO);/*插入事务,事务统计结束*/

        return 0;
}
作者: xqplanbai    时间: 2012-12-5 16:09
另外,集合点 的插入 我放在了  web_submit_data函数之前,这样对不对啊?
作者: 云层    时间: 2012-12-6 08:39
这里放在前面
作者: ffwithvv    时间: 2012-12-6 10:40
事务放在submit前面,集合点放在事务前面




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2