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

Ajax TruClient Mobile脚本开发

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

| I$z-Ii U d-I01、目的:掌握Ajax TruClient Mobile协议开发及优化脚本。51Testing软件测试网+c0@6Se#\}

51Testing软件测试网%T2B L8|+c@

2、测试工具:lr11.5+firefox51Testing软件测试网!x2Q Pv8[6}

51Testing软件测试网r0o1j4E Qw-{

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

IC+d] D8j0

%fc!pf7AHE w6V0录制设置:

7[m)a `:l:sH'X'Y051Testing软件测试网;z&k#B.uEXr8U4[r!G

51Testing软件测试网"j4Wqe*o Prxo

Np5Nq V0脚本:这个脚本是只读状态,想要edit,update只能在录制页面操作51Testing软件测试网3PWb*ZX

3Xy@2n&p3U.D Z&c0Script_View_Action()51Testing软件测试网M^Pm-pC5e7Y3z
{
y s;Re;z3A0    truclient_step("Navigate to 'http://localhost/phpwind/index.php'", "snapshot=Action_1.inf");
p4C|5h\S[0    truclient_step("登录", "snapshot=Action_3.inf");51Testing软件测试网6h1Ik |1Px
    {51Testing软件测试网6B ` p M@c2K+B J
        truclient_step("Type 'admin' in 用户名 textbox", "snapshot=Action_3.2.inf");51Testing软件测试网\L+j)HfC.m,W
        truclient_step("Type ******* in 密 码 passwordbox", "snapshot=Action_3.4.inf");51Testing软件测试网!h1|D G5^f9m+N[
        truclient_step("Click on 登录 button", "snapshot=Action_3.5.inf");51Testing软件测试网+Pu%q;a_E)PDD
        truclient_step("Verify 管理员 's 'Visible Text' contains '管理员'", "snapshot=Action_3.6.inf");
6hS_,G0a-rE Wt8~0    }
OV'J|mffJ0    truclient_step("Click on Zoom测试 link", "snapshot=Action_4.inf");51Testing软件测试网O k~&Oh}%Q Q:w
    truclient_step("For ( var i = 0 ; i < 2 ; i++ )", "snapshot=Action_5.inf");
_\omd;[ V0    {51Testing软件测试网*B%U(^wL'@-M`
        truclient_step("Click on 发帖 link", "snapshot=Action_5.1.inf");51Testing软件测试网8K _8T#sNW#?B5W
        truclient_step("Evaluate JavaScript. code typestring=LR.getParam('myparam')", "snapshot=Action_5.2.inf");
WF'BQ-M)vHX0        truclient_step("Type 'Test_Title'+typestring in 请输入标题 textbox", "snapshot=Action_5.3.inf");51Testing软件测试网yxIT F_]^
        truclient_step("Click on textbox (1) textbox", "snapshot=Action_5.4.inf");51Testing软件测试网@ G"~8Z7q8NlN^*w
        truclient_step("Type '测试还没有开始,正在安装服务器' in textbox (1) textbox", "snapshot=Action_5.5.inf");51Testing软件测试网Ih7p3Q Q1X(V{
        truclient_step("Click on 发 布 button", "snapshot=Action_5.6.inf");
9i fq%Yf*r0        truclient_step("Type '顶贴,抢沙发' in 进入高级模式 文字颜色 textbox", "snapshot=Action_5.7.inf");
m:u.u/S"ehE1b"v0        truclient_step("Click on Ctrl+Enter快速发布 button", "snapshot=Action_5.8.inf");51Testing软件测试网)f3s:V T Q-@Nu m5^
        truclient_step("Click on 返回列表 link", "snapshot=Action_5.9.inf");51Testing软件测试网x4?9o7bP*p.w
    }51Testing软件测试网-d Dz1ZKz/i
    truclient_step("Click on 退出 link", "snapshot=Action_14.inf");
9mT |L1NG!O0}

1t6y4?G(V1d@0

MZA3T@Vn e9P0录制页面:

3K"`/@S]5L)l051Testing软件测试网6sM7n3f?y\

51Testing软件测试网j QX-R[

51Testing软件测试网,T.b,_r bs)\

这个页面才真正的脚本开发环境,用这个页面我就想起了QTP了,跟QTP模式一样,可以定位和替换组件对象,下面来说Toolbox组件的作用:51Testing软件测试网on7N%q9N]Ki5r _

51Testing软件测试网 O'AtF lU K:_ n

4`&^"u*GR @,p)G_0

2j Z8\xY/\E0Function:进行检查点,thinktime,Action等。51Testing软件测试网J8v|2xn!B v

51Testing软件测试网dR ~ r-z1f_+h7Y

FlowControl:流程控制,if ,Loop,Break,CatchError,Exit;51Testing软件测试网gZ*zs-PD,BaT

D4K,j,M\x C0Miscellaneous:51Testing软件测试网A+P0M8o+I${`&i8\

51Testing软件测试网9C2\;R6S3xNx]

Evaluate JavaScript. code:进行参数化编写参数51Testing软件测试网 F7} WH-V+W!dv@Q

"\fVI3I0Evaluate JavaScript:捕获对象51Testing软件测试网z;R L2R)_bh2o

_*I'V1td0r0Evaluate C Function:一般是调用C函数获取值;51Testing软件测试网 wx~ n4C"b,eu @

51Testing软件测试网Jrh([ x'L%U

Comment:注释51Testing软件测试网 lj/[.NE


TAG:

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

评分:0

我来说两句

Open Toolbar