51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2707|回复: 3
打印 上一主题 下一主题

[原创] 新手问题__loadrunner的controller得到的结果是这样,对吗?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-7-23 14:07:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我刚刚接触loadrunner,有许多疑问,在这里请教各位了。
我自定义一个脚本:web页面形式(这个存在个疑问:这个页面用到javascrip,我想选多协议脚本“javascrip+web/html”,但是在多协议设置中没找到javascrip,所以我只设置了单协议“web/html”)
场景如下:每30秒加10个用户直到加到50个Vusers为止,然后在50个Vusers下加压20分钟,之后同一时刻停止50个Vusers。我想请大家帮我分析下controller下运行的结果,该如何解释?
贴图如下。
这里:图1中,RunningVusers和Trans Response Time这两个图,中,看到vuser_init_transaction(对应脚本是登录的事务)时间很短大约15秒左右因此在图中呈现小点显示,是否可以理解成登录事务在15s内在10个用户加载时就结束了,问题是后边还有40个用户的“登录”action呢,怎么就停止了呢?然后就是对应上述两图,当成功加载50个用户后,事务数有个猛增的大值,之后为什么就平稳在4个事务数了呢,这个结果合理吗,如何得出系统的性能?
每秒点击数,有什么对性能指标来说有什么实际意义吗?


图2中,每秒的事务数,为什么平均在3个事务左右浮动呢?而单独一个用户执行(在loadrunner中)要30个事务及,这里是50个Vusers,事务数还减少了呢?
带宽这个图中,开始的几秒内,带宽达到80k而后来平稳在12k以下,是否系统出现了性能瓶颈?

另外,附上脚本代码:
vuser_init()
{
  web_url("192.168.0.212:9000",
  "URL=http://192.168.0.212:9000/",
  "TargetFrame=",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t1.inf",
  "Mode=HTML",
  EXTRARES,
  "Url=/g5/js/DatePicker/skin/WdatePicker.css", "Referer=http://192.168.0.212:9000/g5/login.jsp", ENDITEM,
  "Url=/g5/images/login_02.gif", "Referer=http://192.168.0.212:9000/g5/login.jsp", ENDITEM,
  LAST);
lr_think_time(11);
web_submit_data("accountAction.do",
  "Action=http://192.168.0.212:9000/g5/accountAction.do?method=LOIN",
  "Method=POST",
  "TargetFrame=",
  "RecContentType=text/html",
  "Referer=http://192.168.0.212:9000/g5/login.jsp",
  "Snapshot=t2.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=f_username_account", "Value=root", ENDITEM,
  "Name=f_password_account", "Value=root", ENDITEM,
  "Name=vercode", "Value=3217", ENDITEM,
  "Name=inputregcode", "Value=", ENDITEM,
  "Name=usetime", "Value=", ENDITEM,
  "Name=terms", "Value=", ENDITEM,
  LAST);
return 0;
}

Action()
{
web_url("accountAction.do_2",
  "URL=http://192.168.0.212:9000/g5/accountAction.do?method=INDE&type=index",
  "TargetFrame=",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t3.inf",
  "Mode=HTML",
  EXTRARES,
  "Url=images/index_06.jpg", "Referer=http://192.168.0.212:9000/g5/accountAction.do?method=INDE&type=index", ENDITEM,
  "Url=images/title_bg_31.gif", "Referer=http://192.168.0.212:9000/g5/accountAction.do?method=SEAR", ENDITEM,
  LAST);
lr_think_time(4);
web_url("accountAction.do_3",
  "URL=http://192.168.0.212:9000/g5/accountAction.do?method=NEWW",
  "TargetFrame=",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=http://192.168.0.212:9000/g5/accountAction.do?method=SEAR",
  "Snapshot=t4.inf",
  "Mode=HTML",
  LAST);
lr_think_time(15);
web_submit_data("accountAction.do_4",
  "Action=http://192.168.0.212:9000/g5/accountAction.do",
  "Method=POST",
  "TargetFrame=",
  "RecContentType=text/html",
  "Referer=http://192.168.0.212:9000/g5/accountAction.do?method=NEWW",
  "Snapshot=t5.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=f_username_account", "Value=gw1", ENDITEM,
  "Name=f_role_account", "Value=2", ENDITEM,
  "Name=f_password_account", "Value=gw1", ENDITEM,
  "Name=pass", "Value=gw1", ENDITEM,
  "Name=f_realname_account", "Value=", ENDITEM,
  "Name=f_phone_account", "Value=", ENDITEM,
  "Name=f_email_account", "Value=", ENDITEM,
  "Name=f_id_account", "Value=", ENDITEM,
  "Name=method", "Value=ADDD", ENDITEM,
  LAST);
lr_think_time(11);
web_submit_data("accountAction.do_5",
  "Action=http://192.168.0.212:9000/g5/accountAction.do?method=SEAR",
  "Method=POST",
  "TargetFrame=",
  "RecContentType=text/html",
  "Referer=http://192.168.0.212:9000/g5/accountAction.do?method=SEAR",
  "Snapshot=t6.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=pid", "Value=1", ENDITEM,
  "Name=f_username_account", "Value=", ENDITEM,
  "Name=f_phone_account", "Value=", ENDITEM,
  "Name=pagecount", "Value=12", ENDITEM,
  "Name=orderType", "Value=", ENDITEM,
  "Name=orderColumn", "Value=", ENDITEM,
  LAST);
lr_think_time(11);
   
lr_start_transaction("hit_checkbutton_transaction");

lr_rendezvous("hit_checkbutton_transaction_rendezvous");
web_submit_data("accountAction.do_6",
  "Action=http://192.168.0.212:9000/g5/accountAction.do?method=SEAR",
  "Method=POST",
  "TargetFrame=",
  "RecContentType=text/html",
  "Referer=http://192.168.0.212:9000/g5/accountAction.do?method=SEAR",
  "Snapshot=t7.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=pid", "Value=1", ENDITEM,
  "Name=f_username_account", "Value=gw", ENDITEM,
  "Name=f_phone_account", "Value=", ENDITEM,
  "Name=pagecount", "Value=12", ENDITEM,
  "Name=orderType", "Value=", ENDITEM,
  "Name=orderColumn", "Value=", ENDITEM,
  LAST);
lr_think_time(5);
   
lr_end_transaction("hit_checkbutton_transaction", LR_AUTO);

   
return 0;
}


vuser_end()
{
web_url("accountAction.do_7",
    "URL=http://192.168.0.212:9000/g5/accountAction.do?method=LOUT",
    "TargetFrame=",
    "Resource=0",
    "RecContentType=text/html",
    "Referer=http://192.168.0.212:9000/g5/accountAction.do?method=INDE&type=index",
    "Snapshot=t8.inf",
    "Mode=HTML",
    LAST);
return 0;
}

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    奋斗
    2022-5-8 19:23
  • 签到天数: 137 天

    连续签到: 1 天

    [LV.7]测试师长

    2#
    发表于 2010-7-24 13:31:33 | 只看该作者
    太长了,写得不是很清楚

    从响应图看的话,看不出是否有异常
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    3#
     楼主| 发表于 2010-7-25 21:37:57 | 只看该作者
    那块写的不清楚呢?请指点
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4#
     楼主| 发表于 2010-7-30 17:10:48 | 只看该作者
    我的帖子啊,快沉了!我自己顶顶
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-5-13 07:35 , Processed in 0.075499 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表