度过了一个冬眠,在春末夏初之际,补充自己的营养,努力学习,努力工作!

LR事务与子事务

上一篇 / 下一篇  2010-01-21 11:16:11 / 个人分类:LR练习

最近在看51上云层老师的书,顺便做下练习,增加自己的记忆
q2]4cGOh0Action()51Testing软件测试网M9kyXB B8p@
{
IG })qZ:@e0
;F~d8|L"NU0    lr_start_transaction("Login");51Testing软件测试网*P'z?V/u@*hG5U)TU[4{

~\1k3_2d0    lr_start_sub_transaction("loginpage","Login");//打开登录页面所需要的时间的子事务开始51Testing软件测试网H'@w.{-mbr

'Ae1_%f?:S0    web_url("mcs.jw",51Testing软件测试网\~*AOb? C)}
        "URL=http://sq.d.cn/wml/mcs.jw?act=my&djpos=000008",51Testing软件测试网+IXv3Z%Zyw:i"h$|GH
        "TargetFrame=",51Testing软件测试网8? W{yg:]5b9BA%r&m+X
        "Resource=1",
"b I2q#p!?0        "RecContentType=text/vnd.wap.wml",51Testing软件测试网M$FX_[T M l
        "Referer=",51Testing软件测试网6YR6w}%x
        "Snapshot=t6.inf",
l5X ~2i;tb(QGj(_0        LAST);51Testing软件测试网 YTz p2SZ~ Sp+lt
51Testing软件测试网z m+kzX
    web_url("community_index.gif",
D:\W+L M0        "URL=http://d.cn/images/d-zone/community_index.gif?dd",
8i3M3K4K1nDds0        "TargetFrame=",
4ad;{)L f{F0        "Resource=1",51Testing软件测试网h v,TQq3a
        "Referer=http://sq.d.cn/wml/mcs.jw?act=my&djpos=000008",
0w A_C%WP w+o0        LAST);
uR.Q$BT fG,hZ+b051Testing软件测试网'of B2L}
    web_url("today_hot.gif",
f+oZJ'eVq0        "URL=http://d.cn/images/today_hot.gif",51Testing软件测试网.O5UL#`iJ|6md
        "TargetFrame=",51Testing软件测试网[{0a[ |[
        "Resource=1",51Testing软件测试网/r;W4ot@LT~+M
        "Referer=http://sq.d.cn/wml/mcs.jw?act=my&djpos=000008",
'P5X3_`~S m,k7m0        LAST);
"i?rW}051Testing软件测试网hM!nQR*r|
    web_url("new.gif",
i3?;P| C(n"i/F0        "URL=http://d.cn/images/icon/new.gif",51Testing软件测试网v9Ic)d]B
        "TargetFrame=",
,[z3NLX*J'I$?&i0        "Resource=1",
k9?(K&^&Z,x"w0        "Referer=http://sq.d.cn/wml/mcs.jw?act=my&djpos=000008",51Testing软件测试网_!~b ?!s:Z.^
        LAST);51Testing软件测试网8c9Ma!w'ntb7V
51Testing软件测试网FS%Nz-Z\8`
    web_url("push.gif",
{ S(U0_/d*z c0        "URL=http://d.cn/images/icon/push.gif",
|Ly5_9{'s0        "TargetFrame=",
VL*Y,h T-{e0        "Resource=1",
;DlTVi4{}$|4]0        "Referer=http://sq.d.cn/wml/mcs.jw?act=my&djpos=000008",
.j:rL7]*}0        LAST);
1Z rx}y0    lr_end_sub_transaction("loginpage",LR_AUTO);//打开登录页面所需要的时间的子事务结束
/bl-V,x6x-D2c051Testing软件测试网9~mN.{*F6y r

-h$phK ohV$@&L0    lr_start_sub_transaction("submitlogin","Login");//登录操作所需要的时间的子事务开始
/DU-yvJ*i051Testing软件测试网9fo~G4i(Ya]
    web_submit_data("mcs.jw_2",51Testing软件测试网_ X%R0bA9ViL8|)I
        "Action=http://sq.d.cn/wml/mcs.jw?act=login",
Ul [Fc_0        "Method=POST",51Testing软件测试网J(H`A}#k
        "TargetFrame=",
{r2Mf4p\wy%{Z0        "RecContentType=text/vnd.wap.wml",51Testing软件测试网TK.Z4j+eT.q
        "Referer=",51Testing软件测试网O8g7M]v`!^
        "Snapshot=t7.inf",51Testing软件测试网 Co"QC/NNWN
        "Mode=HTML",
:|f!\c+bK*k`~0        ITEMDATA,51Testing软件测试网"Yi"a r6pg"wC
        "Name=byid", "Value=0", ENDITEM,
1j,kw Y,R Xb U#q0        "Name=username", "Value=dangle", ENDITEM,51Testing软件测试网}%N/NS-B
        "Name=password", "Value=dcn", ENDITEM,
g{%Fqx/e%BU9H.S0        "Name=validCode", "Value=5673", ENDITEM,
8X!]Ss!b6C.s2Q0        "Name=from", "Value=__SLASH__wml__SLASH__mcs.jw?act=my__AND__djpos=000008", ENDITEM,51Testing软件测试网 }U'm v_
        "Name=pn", "Value=", ENDITEM,51Testing软件测试网's;{"lA[
        EXTRARES,51Testing软件测试网(`7P)B-P9?\
        "Url=http://d.cn/images/mood/16.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,51Testing软件测试网EFZL? Er
        "Url=http://d.cn/images/newclub/0.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,
#nz*_]t0        "Url=http://d.cn/images/level_icon/3.png", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,
2p y_1?9Z+Rkz3B2j0        "Url=http://d.cn/images/newclub/note.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,51Testing软件测试网&~p2_j(p
        "Url=http://d.cn/images/newclub/doc.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,
0y-VH4^`*wU0        "Url=http://d.cn/images/newclub/touch.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,51Testing软件测试网GDu~'bB(p2t
        "Url=http://d.cn/images/newclub/blog.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,51Testing软件测试网s UO%SMsB YKe@
        "Url=http://d.cn/images/newclub/guest.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,51Testing软件测试网 p5BD;\.Io5{A
        "Url=http://d.cn/images/newclub/photo.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,51Testing软件测试网2\Y;n js R um t
        "Url=http://d.cn/images/newclub/renfan.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,51Testing软件测试网fT TJ&|1?VB
        "Url=http://d.cn/images/newclub/page.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,51Testing软件测试网a9zCCN7o Sz
        "Url=http://d.cn/images/newclub/kickassmembericon.gif", "Referer=http://sq.d.cn/wml/mcs.jw?act=login", ENDITEM,
q8L4Yhk0        LAST);51Testing软件测试网j-er-Ss {b-l
    lr_end_sub_transaction("submitlogin",LR_AUTO);//登录操作所需要的时间的子事务结束51Testing软件测试网h*`^_,GM(P-?(A\Y4?
    lr_end_transaction("Login",LR_AUTO);51Testing软件测试网[$X/c0{jShK1j

\-r}IIj-h,J#s7^_$A0    return 0;
b,N XgR.x5XG7m0}51Testing软件测试网)nC.ru!F
日志中可以看到所用时间51Testing软件测试网6Q(U8EZ k,YP:N/l
Action.c(44): Notify: Transaction "loginpage" ended with "Pass" status (Duration: 0.1303).
!g^:xse9?ik0Action.c(78): Notify: Transaction "submitlogin" ended with "Pass" status (Duration: 0.9207).
z&B1i MtM$oP| L0Action.c(79): Notify: Transaction "Login" ended with "Pass" status (Duration: 1.0873).
)y;ap c,u0因为有Vuser_int时间,故Login不等于loginpage与submitlogin时间之和

TAG:

 

评分:0

我来说两句

Open Toolbar