如果晚上月亮升起的时候,月光照到我的门口,我希望月光女神能满足我一个愿望,我想要一双人类的手。我想用我的双手把我的爱人紧紧地拥在怀中,哪怕只有一次。如果我从来没有品尝过温暖的感觉,也许我不会这样寒冷;如果我从没有感受过爱情的甜美,我也许就不会这样地痛苦。如果我没有遇到善良的佩格,如果我从来不曾离开过我的房间,我就不会知道我原来是这样的孤独.

Ajax TruClient Mobile脚本开发

上一篇 / 下一篇  2013-04-26 09:51:04 / 个人分类:loadrunner

k g&i*H6n6i \a2g01、目的:掌握Ajax TruClient Mobile协议开发及优化脚本。

f4@0z'jJ n"wr+S:]051Testing软件测试网+D"M3a+G8R5o]V

2、测试工具:lr11.5+firefox51Testing软件测试网.kY~:s@g,i

h'? B3fB'b-q03、实例场景:使用Ajax TruClient Mobile协议来模拟SamsungGT-I9000手机访问phpwind论坛发帖的脚本。

Z} g5C-E4\t051Testing软件测试网lWj&oey D'`

录制设置:

lZ*|rN2@_:o\6Go051Testing软件测试网s,G6y*q`S

^ iXd%?6Sm(a0

5q V1tZxS)[ L0脚本:这个脚本是只读状态,想要edit,update只能在录制页面操作51Testing软件测试网.f uB s9xhi#V

~J y)fb0K.t;d0Script_View_Action()
`L-\9OW+Ilr1QS O0{
O$^S5?!^;ui0    truclient_step("Navigate to 'http://localhost/phpwind/index.php'", "snapshot=Action_1.inf");
} a'gU!S0LH)WE9U0    truclient_step("登录", "snapshot=Action_3.inf");51Testing软件测试网jP3h3U1XWYX3J4p
    {51Testing软件测试网p0_#~9\\_@*a
        truclient_step("Type 'admin' in 用户名 textbox", "snapshot=Action_3.2.inf");51Testing软件测试网V!oT/F4s6k9I3T3D\
        truclient_step("Type ******* in 密 码 passwordbox", "snapshot=Action_3.4.inf");51Testing软件测试网7~} HjTJyA
        truclient_step("Click on 登录 button", "snapshot=Action_3.5.inf");51Testing软件测试网:? V6t:eM,dO
        truclient_step("Verify 管理员 's 'Visible Text' contains '管理员'", "snapshot=Action_3.6.inf");51Testing软件测试网c$}#h&T1CuhGL
    }
f2`'yv+v$U%k8U0    truclient_step("Click on Zoom测试 link", "snapshot=Action_4.inf");51Testing软件测试网*l?txF'P ~M2k^
    truclient_step("For ( var i = 0 ; i < 2 ; i++ )", "snapshot=Action_5.inf");
5i?5}"R9RM"W\ aWZ0    {51Testing软件测试网3PL+w'm X{
        truclient_step("Click on 发帖 link", "snapshot=Action_5.1.inf");
E8W7v5jf3dd0        truclient_step("Evaluate JavaScript. code typestring=LR.getParam('myparam')", "snapshot=Action_5.2.inf");
6P+EQ;SoH0        truclient_step("Type 'Test_Title'+typestring in 请输入标题 textbox", "snapshot=Action_5.3.inf");
1BT;]0XPP^ E0        truclient_step("Click on textbox (1) textbox", "snapshot=Action_5.4.inf");
U\+JX\ Nw']0        truclient_step("Type '测试还没有开始,正在安装服务器' in textbox (1) textbox", "snapshot=Action_5.5.inf");51Testing软件测试网6`"V{E*U{T
        truclient_step("Click on 发 布 button", "snapshot=Action_5.6.inf");
xY:c:]?Q0        truclient_step("Type '顶贴,抢沙发' in 进入高级模式 文字颜色 textbox", "snapshot=Action_5.7.inf");
}9{ Xh `%Iom0        truclient_step("Click on Ctrl+Enter快速发布 button", "snapshot=Action_5.8.inf");
y ^'G~(ys{:| u0        truclient_step("Click on 返回列表 link", "snapshot=Action_5.9.inf");51Testing软件测试网-W#}2bd1|
    }
E"`#_6p }0    truclient_step("Click on 退出 link", "snapshot=Action_14.inf");
&s-n#iC N x`0}51Testing软件测试网q)[S/_#aD1S/i

51Testing软件测试网I"W*l ]va

录制页面:51Testing软件测试网R I\ eD5wi

51Testing软件测试网#p#c#lA;fk-q

51Testing软件测试网"? ~CE|

C#WMnOHW!?0这个页面才真正的脚本开发环境,用这个页面我就想起了QTP了,跟QTP模式一样,可以定位和替换组件对象,下面来说Toolbox组件的作用:51Testing软件测试网;\#_.Rv9i"["u(KV_#Y

51Testing软件测试网,_$b.m jI

51Testing软件测试网!i;EMJH!`-K

$J L]*c5zk z n*zS0Function:进行检查点,thinktime,Action等。51Testing软件测试网$jE$l u8V \ w`

qacL{ Uq["Zw0FlowControl:流程控制,if ,Loop,Break,CatchError,Exit;

v^b_Z*XY E L0

1N!{"sN\b1Z)v @2P"^0Miscellaneous:51Testing软件测试网;AjoD{[2`n"V'U

k\#V? bZ V+EA }0Evaluate JavaScript. code:进行参数化编写参数

]]hBa#l0

;FO3j&B/s&Cb0Evaluate JavaScript:捕获对象

,g)z4w0Hc$j!bgq0

oAD |\0Evaluate C Function:一般是调用C函数获取值;51Testing软件测试网1O.gYKj

k]ddv} [ ~0Comment:注释51Testing软件测试网3kw.]O\,Z6[LK


TAG:

引用 删除 千里暮雪   /   2014-01-10 17:49:02
关掉浏览器后怎么在此开启呢
漂浮 引用 删除 femir   /   2013-04-26 10:53:24
  自己安慰下
 

评分:0

我来说两句

Open Toolbar