LoadRunner登陆功能测试实例
作者:网络转载 发布时间:[ 2013/11/19 15:35:18 ] 推荐标签:
好了,执行这个脚本,得到的结果是:
第一次迭代时:(在这里只粘贴了一部分关键的日志)
Action.c(15): Notify: Transaction "tr_login" started.
Action.c(17): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(20): Notify: Parameter Substitution: parameter "name" = "huruihai"
Action.c(20): Notify: Parameter Substitution: parameter "password" = "huruihai"
Action.c(20): Registered web_reg_find successful for "Text=Error" [MsgId: MMSG-26362]
Action.c(20): Notify: Saving Parameter "login_Count = 0"
Action.c(20): web_submit_form("login.pl") was successful, 32673 body bytes, 1652 header bytes [MsgId: MMSG-26386]
Action.c(30): Notify: Transaction "tr_login" ended with "Pass" status
Action.c(35): login事务耗时 0.002523 秒
Action.c(39): Notify: Parameter Substitution: parameter "login_Count" = "0"
Action.c(44): Login successful.
|
第二次迭代时:
Action.c(15): Notify: Transaction "tr_login" started.
Action.c(17): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(20): Notify: Parameter Substitution: parameter "name" = "wangjin"
Action.c(20): Notify: Parameter Substitution: parameter "password" = "wangjin"
Action.c(20): Registered web_reg_find successful for "Text=Error" [MsgId: MMSG-26362]
Action.c(20): Notify: Saving Parameter "login_Count = 0"
Action.c(20): web_submit_form("login.pl") was successful, 32673 body bytes, 1652 header bytes [MsgId: MMSG-26386]
Action.c(30): Notify: Transaction "tr_login" ended with "Pass" status
Action.c(35): login事务耗时 0.006644 秒
Action.c(39): Notify: Parameter Substitution: parameter "login_Count" = "0"
Action.c(44): Login successful.
|
第三次迭代时:
Action.c(15): Notify: Transaction "tr_login" started.
Action.c(17): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(20): Notify: Parameter Substitution: parameter "name" = "errorname"
Action.c(20): Notify: Parameter Substitution: parameter "password" = "errorpd"
Action.c(20): Registered web_reg_find successful for "Text=Error" (count=3) [MsgId: MMSG-26364]
Action.c(20): Notify: Saving Parameter "login_Count = 3"
Action.c(20): web_submit_form("login.pl") was successful, 29263 body bytes, 821 header bytes [MsgId: MMSG-26386]
Action.c(30): Notify: Transaction "tr_login" ended with "Pass" status (Duration: 0.6840 Wasted Time: 0.0010).
Action.c(35): login事务耗时 0.005852 秒
Action.c(39): Notify: Parameter Substitution: parameter "login_Count" = "3"
Action.c(40): Error: Login failed
Ending action Action.
|
大家可以看到,事务执行结果总是成功的,但后一次的登陆确是失败的
我又把后一次事务提交的请求地址做了错误的参数化,得到的结果是,事务执行失败
本文内容不用于商业目的,如涉及知识产权问题,请权利人联系SPASVO小编(021-61079698-8054),我们将立即处理,马上删除。