友善交流技术...

发布新日志

  • loadrunner在线技术指导

    2011-11-15 12:26:47

    http://item.taobao.com/item.htm?id=14296360165

    服务内容如下:

    1、loadrunner在线技术指导和服务

    2、自动化在线技术指标和服务

     

    QQ    :286264301

    email : test_fang@163.com

  • Loadrunner 遍历一个页面中的URL并访问之

    2011-11-14 18:11:56

    Loadrunner 遍历一个页面中的URL并访问之:

      好久没有写这方面的代码了,今天写了一个遍历每一个页面中的所有URL,并打开URL地址。对无效的URL进行了排除操作。

    Action()
    {
       char temp[64];
       int num = 0 ;
       int i = 0 ;
       char *str ;
      // char *temp ;

    //获取函数,是一个数组
     web_reg_save_param(
      "UrlList",
      "LB/ALNUMIC=<a href=\"",
      "RB=\"",
      "ORD=all",
      LAST);
     

     web_url("localhost",
       "URL=http://www.baidu.com",
      LAST);

    //获取数据的长度
      str = lr_eval_string("{UrlList_count}");
      lr_error_message("%s",str);

      num = atoi(str);
     

      for(i=1;i<=num;i++){

    //格式化输出 

    sprintf(temp,"{UrlList_%d}",i);    

    //生成参数
     lr_save_string(lr_eval_string(temp),"Turl");

    //判定URL 是否合法
     if (strstr(lr_eval_string(temp),"http")) {
      web_url("TESTER","URL={Turl}", LAST);
     }else
     {
      lr_error_message("Url is not exits");
     }
     

      }

    return 0;
    }

  • mysql 锁表与解锁

    2011-08-23 14:50:53

    mysql 锁表与解锁  

    2008-10-09 12:46:53|  分类: MYSQL |  标签: |字号 订阅

    mysql> use t_girl
    Database changed
    mysql
    > show open tables;
    +----------+---------------+--------+-------------+
    | Database | Table | In_use | Name_locked |
    +----------+---------------+--------+-------------+
    | t_girl | slave | 0 | 0 |
    | mysql | help_keyword | 0 | 0 |
    | mysql | help_category | 0 | 0 |
    | mysql | help_relation | 0 | 0 |
    | t_girl | t1 | 0 | 0 |
    | mysql | help_topic | 0 | 0 |
    | mysql | user | 0 | 0 |
    +----------+---------------+--------+-------------+
    7 rows in set (0.00 sec)

    mysql
    > lock tables t1 as a read;
    Query OK,
    0 rows affected (0.00 sec)

    mysql
    > show open tables;
    +----------+---------------+--------+-------------+
    | Database | Table | In_use | Name_locked |
    +----------+---------------+--------+-------------+
    | t_girl | slave | 0 | 0 |
    | mysql | help_keyword | 0 | 0 |
    | mysql | help_category | 0 | 0 |
    | mysql | help_relation | 0 | 0 |
    | t_girl | t1 | 1 | 0 |
    | mysql | help_topic | 0 | 0 |
    | mysql | user | 0 | 0 |
    +----------+---------------+--------+-------------+
    7 rows in set (0.00 sec)

    mysql
    > unlock tables;
    Query OK,
    0 rows affected (0.00 sec)

    mysql
    > show open tables;
    +----------+---------------+--------+-------------+
    | Database | Table | In_use | Name_locked |
    +----------+---------------+--------+-------------+
    | t_girl | slave | 0 | 0 |
    | mysql | help_keyword | 0 | 0 |
    | mysql | help_category | 0 | 0 |
    | mysql | help_relation | 0 | 0 |
    | t_girl | t1 | 0 | 0 |
    | mysql | help_topic | 0 | 0 |
    | mysql | user | 0 | 0 |
    +----------+---------------+--------+-------------+
    7 rows in set (0.00 sec)
  • memcacheget set 并发情况下进行压力测试

    2011-07-01 18:03:28

    1.memcache get ,set 在400并发情况下进行压力测试:
       结论是:单线程错误率比多线程错误率低,差2倍左右.具体的测试如下:  
    测试内容400个并发,执行10分钟。(多线程)
    测试结果:
    1.set error:320/55160=0.58%
    2.get error:640/55160=1.16%      已测试过程中一次set对应两次get,因此get的错误率会比其他两个高一倍。
    3.update error:320/55160=0.58%    更新前后比较不同
     
     
    测试内容400个并发,执行10分钟。(单线程)
    测试结果:
    1.set error:40/29240=0.14% 
    2.get error:120/29240=0.41%       已测试过程中一次set对应两次get,因此get的错误率会比其他两个高一倍。
    3.update error:40/29240=0.14%     更新前后比较不同

    总结:
    1.memcache set ,get 在高并发情况下存在失败的情况
    2.memcache 在多线程情况下,硬件资源都合理情况下,比单线程性能好,同时错误率也有相应的提升。
  • 利用Tokyo Tyrant构建兼容Memcached协议、支持故障转(转发)

    2011-06-21 14:11:14

       是日本人 平林幹雄 开拓的一款 DBM 数据库,该数据库读写非常快,哈希模式写入100万条数据只需0.643秒,读取100万条数据只需0.773秒,是 Berkeley DB 等 DBM 的几倍。


       是由同一作者开拓的 Tokyo Cabinet 数据库网络接口。它拥有Memcached兼容协议 ,也可以通过HTTP协议 举办数据交换。

      Tokyo Tyrant 加上 Tokyo Cabinet,构成 了一款支持 高并发的散播式恒久存储体系 ,对任何原有Memcached客户妒攀? 唇玻?可以将Tokyo Tyrant当作 是一个Memcached,但是,它的数据是可以恒久存储的。这一点,跟新浪的性子 一样。

      相比Memcachedb而言,Tokyo Tyrant具有以下上风 :

      1、妨碍 转移:Tokyo Tyrant支持 双机互为主辅模式,主辅库均可读写,而Memcachedb如今支持 类似MySQL主辅库同步的行动 实现读写星散,支持 “主理 事 器可读写、赞助 做事器只读”模式。

    这里应用 $memcache->addServer 而不是 $memcache->connect 去毗连 Tokyo Tyrant 做事器,是由于 当 Memcache 客户端应用 addServer 做事器池时,是按照 “crc32(key) % current_server_num”哈希算法将 key 哈希到差别 的做事器的,PHP、C 和 python 的客户端都是云云 的算法。Memcache 客户端的 addserver 具有妨碍 转移机制,当 addserver 了2台 Memcached 做事器,而此中 1台宕机了,那么 current_server_num 会由原来 的2变成 1。

      引用 memcached 官方网站和 PHP 手册中的两段话:

    引用 http://www.danga.com/memcached/
    If a host goes down, the API re-maps that dead host's requests onto the servers that are available.


    Failover may occur at any stage in any of the methods, as long as other servers are available the request the user won't notice. Any kind of socket or Memcached server level errors (except out-of-memory) may trigger the failover. Normal client errors such as adding an existing key will not trigger a failover.





      2、日记 文件体积小:Tokyo Tyrant用于主辅同步的日记 文件比拟 小,约莫 是数据库文件的1.3倍,而Memcachedb的同步日记 文件非常大,假如 不定期清理,很轻易 将磁盘写满。
    3、超大数据量下示意杰出 :

    但是,Tokyo Tyrant 也有错误:在32位操纵 体系 下,作为 Tokyo Tyrant 后端存储的 Tokyo Cabinet 数据库单个文件不能高出 2G,而64位操纵 体系 则不受这一限定 。以是 ,假如 应用 Tokyo Tyrant,推举在64位CPU、操纵 体系 上安装运行。
     一、安装
      1、起首 编译安装tokyocabinet数据库

    wget
    tar zxvf tokyocabinet-1.3.1.tar.gz
    cd tokyocabinet-1.3.1/
    ./configure
    make
    make install
    cd ../



      2、然后编译安装tokyotyrant

    wget
    tar zxvf tokyotyrant-1.0.0.tar.gz
    cd tokyotyrant-1.0.0/
    ./configure
    make
    make install
    cd ../





      二、设置
      1、创建 tokyotyrant数据文件寄放 目次

    mkdir -p /ttserver/



      2、启动tokyotyrant的主进程 (ttserver)
      (1)、单机模式

    ulimit -SHn 51200
    ttserver -host 127.0.0.1 -port 11211 -thnum 8 -dmn -pid /ttserver/ttserver.pid -log /ttserver/ttserver.log -le -ulog /ttserver/ -ulim 128m -sid 1 -rts /ttserver/ttserver.rts /ttserver/database.tch



      (2)、双机互为主辅模式
      做事器192.168.1.91:

    ulimit -SHn 51200
    ttserver -host 192.168.1.91 -port 11211 -thnum 8 -dmn -pid /ttserver/ttserver.pid -log /ttserver/ttserver.log -le -ulog /ttserver/ -ulim 128m -sid 91 -mhost 192.168.1.92 -mport 11211 -rts /ttserver/ttserver.rts /ttserver/database.tch



      做事器192.168.1.92:

    ulimit -SHn 51200
    ttserver -host 192.168.1.92 -port 11211 -thnum 8 -dmn -pid /ttserver/ttserver.pid -log /ttserver/ttserver.log -le -ulog /ttserver/ -ulim 128m -sid 92 -mhost 192.168.1.91 -mport 11211 -rts /ttserver/ttserver.rts /ttserver/database.tch



      (3)、参数阐发
      ttserver [-host name] [-port num] [-thnum num] [-tout num] [-dmn] [-pid path] [-log path] [-ld|-le] [-ulog path] [-ulim num] [-uas] [-sid num] [-mhost name] [-mport num] [-rts path] [dbname]

      -host name : 指定必要 绑定的做事器域名或IP所在。默认绑定这台做事器上的全部 IP所在。
      -port num : 指定必要 绑定的端标语 。默认端标语 为1978
      -thnum num : 指定线程数。默认为 8个线程。
      -tout num : 指定每个会话的超时工夫(单位 为秒)。默认永不超时。
      -dmn : 以守卫进程 行动 运行。
      -pid path : 输出进程 ID到指定文件(这里指定文件名)。
      -log path : 输出日记 信息到指定文件(这里指定文件名)。
      -ld : 在日记 文件中还记实 DEBUG调试信息。
      -le : 在日记 文件中仅记实 过错 信息。
      -ulog path : 指定同步日记 文件寄放 路径(这里指定目次 名)。
      -ulim num : 指定每个同步日记 文件的巨细 (譬喻128m)。
      -uas : 应用 异步IO记实 更新日记 (应用 此项会镌汰 磁盘IO损耗,但是数据会先放在内存中,不会立即 写入磁盘,假如 重启做事器或ttserver进程 被kill掉,将导致部分 数据损失。一样平常 情况下不提议应用 )。
      -sid num : 指定做事器ID号(当应用 主辅模式时,每台ttserver必要 差别 的ID号)
      -mhost name : 指定主辅同步模式下,主理 事 器的域名或IP所在。
      -mport num : 指定主辅同步模式下,主理 事 器的端标语 。
      -rts path : 指定用来寄放 同步工夫戳的文件名。

      假如 应用 的是哈希数据库,可以指定参数“#bnum=xxx”来前进性能。它可以指定bucket存储桶的数量 。譬喻指定“#bnum=1000000”,就可以将最新最热的100万条记实 缓存在内存中:

    ttserver -host 127.0.0.1 -port 11211 -thnum 8 -dmn -pid /ttserver/ttserver.pid -log /ttserver/ttserver.log -le -ulog /ttserver/ -ulim 128m -sid 1 -rts /ttserver/ttserver.rts /ttserver/database.tch#bnum=1000000



      假如 大宗的客户端拜访ttserver,请确保文件刻画 符够用。很多 做事器的默认文件刻画 符为1024,可以在启动ttserver前应用 ulimit下令 前进这项值。譬喻:

    ulimit -SHn 51200



      3、收场tokyotyrant(ttserver)

    ps -ef | grep ttserver


      找到ttserver的进程 号并kill,譬喻:

    kill -TERM 2159





      三、调用
      1、任何Memcached客户端均可直接调用tokyotyrant。

      2、还可以通过HTTP行动 调用,下面以Linux的curl下令 为例,先容 怎样 操纵 tokyotyrant:
      (1)、写数据,将数据“value”写入到“key”中:

    curl -X PUT -d "value"



      (2)、读数据,读取“key”中数据:

    curl



      (3)、删数据,删除“key”:

    curl -X DELETE
  • apache ab性能测试

    2011-06-19 12:42:56

     参数很多,一般我们用 -c 和 -n 参数就可以了。例如:

      ./ab -c 1000 -n 1000 http://127.0.0.1/index.php

      这个表示同时处理1000个请求并运行1000次index.php文件。

      #/usr/local/xiaobai/apache2054/bin/ab -c 1000 -n 1000 http://127.0.0.1/index.html.zh-cn.gb2312

      This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0

      Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

      Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

      Benchmarking 127.0.0.1 (be patient)

      Completed 100 requests

      Completed 200 requests

      Completed 300 requests

      Completed 400 requests

      Completed 500 requests

      Completed 600 requests

      Completed 700 requests

      Completed 800 requests

      Completed 900 requests

      Finished 1000 requests

      Server Software: Apache/2.0.54

      //平台apache 版本2.0.54

      Server Hostname: 127.0.0.1

      //服务器主机名

      Server Port: 80

      //服务器端口

      Document Path: /index.html.zh-cn.gb2312

      //测试的页面文档

      Document Length: 1018 bytes

      //文档大小

      Concurrency Level: 1000

      //并发数

      Time taken for tests: 8.188731 seconds

      //整个测试持续的时间

      Complete requests: 1000

      //完成的请求数量

      Failed requests: 0

      //失败的请求数量

      Write errors: 0

      Total transferred: 1361581 bytes

      //整个场景中的网络传输量

      HTML transferred: 1055666 bytes

      //整个场景中的HTML内容传输量

      Requests per second: 122.12 [#/sec] (mean)

      //大家最关心的指标之一,相当于 LR 中的 每秒事务数 ,后面括号中的 mean 表示这是一个平均值

      Time per request: 8188.731 [ms] (mean)

      //大家最关心的指标之二,相当于 LR 中的 平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值

      Time per request: 8.189 [ms] (mean, across all concurrent requests)

      //每个请求实际运行时间的平均值

      Transfer rate: 162.30 [Kbytes/sec] received

      //平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题

      Connection Times (ms)

      min mean[+/-sd] median max

      Connect: 4 646 1078.7 89 3291

      Processing: 165 992 493.1 938 4712

      Waiting: 118 934 480.6 882 4554

      Total: 813 1638 1338.9 1093 7785

      //网络上消耗的时间的分解,各项数据的具体算法还不是很清楚

      Percentage of the requests served within a certain time (ms)

      50% 1093

      66% 1247

      75% 1373

      80% 1493

      90% 4061

      95% 4398

      98% 5608

      99% 7368

      100% 7785 (longest request)

      //整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其中50%的用户响应时间小于1093毫秒,60%的用户响应时间小于1247 毫秒,最大的响应时间小于7785 毫秒。

      由于对于并发请求,cpu实际上并不是同时处理的,而是按照每个请求获得的时间片逐个轮转处理的,所以基本上第一个Time per request时间约等于第二个Time per request时间乘以并发请求数。

  • 性能测试优化总结

    2011-06-14 11:34:59

    测试时间 发现问题 解决办法 效果
    2011-04-26-优化-apache web cpu资源不足 1cpu->4cpu 解决问题
           
    2011-05-10-性能优化 性能优化    
           
    2011-05-12-性能优化 sphinx 压力过大 1.调整后端数据流向
    2.走memcache缓存
    良好
           
    2011-05-24-memcache长链接不释放 php.ini 参数做如下调整
               session.save_path = "tcp://10.1.71.29:11211?persistent=0&weight=2&timeout=1&retry_interval=15"   以前是=1 现在调整成 = 0 ,
            现在线上链接数量在10个左右,基本上解决持久链接不释放的问题.
    0 代表不持久链接 ; 1 代表持久链接   最后修改了本参数,链接问题解决了.
    persistent=0 持久链接失效/ 良好

    优化系统 具体优化点 优化意见
    客户端 1.本地缓存技术 1.要求实现
    .CSS,JS压缩处理 1.要求实现
    3.代码压缩技术 1.要求实现
    函数优化 1如loadsucha方法:在卖房 ; 租房 ;小区列表; 小区检索中出现。本方法在这几个功能模块中不应该存在,它会自动加载本页面,造成大量的无用的请求和网络带宽 1.减少无用函数重复的调用,删除这个方法。
    后端数据调用  1.小区列表  1.要求走memcache
    2.小区房价  1.要求走TC
    3.小区相册  1.要求走TC
    4.小区详情  1.要求走TC
    5.房源详情,比较慢 1.要求走TC,不走DB
    SQL语句优化 1.SELECT *  FROM `t_rent` WHERE `house_id` =  '256'   AND
    `status` =  '1'  order by refresh_time desc  LIMIT 0,6;  最新出租房源
    1.要求只取需要的字段,不要用*
    2.速度比较慢,建议走缓存
    2.u SELECT count(*) as count FROM `t_rent` WHERE `company_id` =  '101'   AND `agent_id` =  '1'   AND `status` =  '1'; 公司门店有效出租房源量 1.要求只取需要的字段,不要用*
    2.速度比较慢,建议走缓存
    3.SELECT count(*) as count FROM `t_sale` WHERE `status` =  '1';
    //出售房源
    1.修改成sphinx获取数据
    4.u SELECT count(*) as count FROM `t_rent` WHERE `status` =  '1';  //出租房源 1.修改成sphinx获取数据
    首页优化 1.外部服务器慢
    http://cms.xxx.com/upload/js/jquery.js?_=1304393380272
    1.要求修改,客户端要求添加缓存
    2.google 统计 1.放到body 最后面
    3.首页-房价走势 1.默认值:城市,直接走缓存取数据,具体的flash还没有处理方法
    4.您可能感兴趣的房源 1.数据要求缓存 1小时缓存
    系统安全 1.VIP,ADMIN 增加验证码  
    不确定优化方法 1.sphinx CPU使用率达 100%  
    2.CMS 系统比较慢(可能是网络的原因)  

     

     

    优化工作:

      对自己在公司做的工作做如下的总结:

    1.优化方面1:业务调整,过度或是频繁调用程序都会造成软件的使用不合理

    2.memcache 长短链接测试,其中false代码是短链接的.马上释放.

    3.js ,jpg ,css 在网站的优化也相当的重要的

  • memcache 性能优化测试

    2011-06-14 11:29:06

     memcache 性能测试:对于memcache 版本V1.4.5 针对不同的参数进行了如下的测试测试结果如下:

     

    场景名称 参数 响应时间 PV CPU CONN TCP
    100user-m-2024 -m-2024 0.071 1368 70-80% 20-31 5800-6000
    200user-m-2024 -m-2024 0.138 1387 80-90% 40-60 5800-6006
    300user-m-2024 -m-2024 0.207 1391 80-90% 50-70 5800-6000
    400user-m-2024 -m-2024 0.271 1380 85-92% 60-80 4400-5100
                 
    300user-m-2024-t-1 -m-2024-t-1 0.203 1410 80-92% 40-60 4900-5200
    300user-m-2024-t-1-c-2048 -m-2024-t-1-c-2048 0.202 1412 80-92% 40-60 4900-5400
    300user-m-2024-t-64-c-2048 -m-2024-t-64-c-2048 0.215 1304 80-92% 240-260 5000-6000
    300user-m-2024-t-2-c-2048 -m-2024-t-2-c-2048 0.204 1393 80-92% 40-70 5000-6000
    300user-m-2024-t-1-c-5000 -m-2024-t-1-c-5000 0.198 1420 80-92% 40-60 5000-5800
    300user-m-2024-t-1-c-5000-f-1.1 -m-2024-t-1-c-5000-f-1.1 0.202 1415 80-92% 40-60 5000-5800

     

     从图中可以发现,在本环境中,单个线程比多个线程的效果更了,根据官方的资料显示,memcache对多线程的支持不是太好的.

       如果并发量不是很大的话,建议采用单线程进行.

  • Browser emulation

    2011-05-06 13:05:23

    Browser emulation 实验
    实验一:
      1.默认设置 
      结果
      1.数据量为:
       123784 body bytes, 4956 header bytes  
    实验二:
      1.设置为 simulate a new user on each iteration 去掉对钩
             clear cache on eache iteration
        结果
       1.数据量为:
        107159 body bytes, 4953 header bytes 
    实验三:
       1.设置为:
         download non-html resources 去掉对钩 其它默认值
       结果
       1.数据量为: 2254 body bytes, 428 header bytes
    结论:
       1.默认设置是请求数据是最大的,也就是每一个用户都是一次新的请求,没有做过处理,是用户真实的操作行为
       2. 实验二:将部分的页面缓存起来,但是还要进行下载的。
       3. 实验三:不下载图片资源,其它的资源都在缓存中已经存在的。所以下载的数据量比较小的。只下载html的资源 
  • action and step 区别

    2011-05-06 09:43:06

    action and step 区别
    实验一:
      1.一个脚本中两个 web_url aaa ,bbb
      2.放置在一个action 中
      3.选择 define each action as a transaction
    结束分析中:
     sum tps: 16.2
     hits: 240 左右
    实现二:  
      1.一个脚本中两个 web_url aaa,bbb
      2.放置在一个 action 中 
      3.选择 define each step as a transaction
    结果分析中:
     sum tps : 32 左右
     hits :240 左右
    实现三:
     1.一个脚本中两个 web_url aaa,bbb
      2.放置在一个 action 中 
      3.选择 define each action as a transaction
      4.给 aaa 增加事务为: aaa-trans
    结果分析中:
     sum tps : 32 左右
     hits :240 左右
    实现四:
     1.一个脚本中两个 web_url aaa,bbb
      2.放置在一个 action 中 
      3.选择 define each step as a transaction
      4.给 aaa 增加事务为: aaa-trans
    结果分析中:
     sum tps : 48 左右
     hits :240 左右
     总结:loadruner会自动将用户自己定义的事务和脚本的事务相加后,得到一个总共的sum tps 其实这样就会重复计算里面的事务数量。
     但是loadrunner有一个过滤的功能,可以将这一部分自己定义的事务去掉,提到真实的TPS,也是我们平时说的 PV/S 。
     其实真正反映服务器的性能转点是 HITS,通过它我们可以直接看到服务性能的容量。我一般都会看这个指标,但是有一个问题,就是它会统计:js ,css,jpg等等这也算是一个请求,这样的请求其实对服务器的压力比较小的,如果算一个PV 其实也是不准确的。
      所以我们现在测试,就按每一个web_url web_submit_form 按步来进行计算这样更真实的反映我们服务器的PV值。
      这个也是自己以前不太清楚的地方,今天做了几个实验,验证了自己的想法。高兴。。。


  • loadrunner错误Error: Function two_way_comm_create_connector failed.

    2011-02-23 11:13:05

      本想利用loadrunner来实现扩充一下JAVA的并发用户数量,但是现在跑10个用户 ;线程池的大小是3个并发 ... 遇到这样的问题:
      1.Error: Two Way Communication Error: Function two_way_comm_create_connector failed.
      2. Error: Two Way Communication Error: Function two_way_comm_post_message / two_way_comm_post_message_ex failed.
      3. java Abnormal termination, caused by mdrv process termination.
      4. Error: Communication error: Cannot send the message since reached the shared memory buffer max size.
     
      上网上查看别人的提问, 听说需要打一个补丁: CPT 12533补丁(controller crash) 
     
      可惜没有找到.... 可怜的商业工具... 信息总是那么的不公开啊...
  • loadrunner不支持java多线程

    2011-02-21 18:06:47


    =========java代码=========================
    import java.io.IOException;
    import java.net.URL;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.Semaphore;
    public class TT {
    public static void main(String[] args) {
    // 线程池
    ExecutorService exec = Executors.newCachedThreadPool();
    // 只能5个线程同时访问
    final Semaphore semp = new Semaphore(10);
    // 模拟20个客户端访问
    for (int index = 0; index < 20; index++) {
    final int NO = index;
    Runnable run = new Runnable() {
    public void run() {
    try {
    // 获取许可
    semp.acquire();
    int c;

    try {
     URL url = new URL("http://localhost:7080/webjava/");    
     java.net.URLConnection uc = url.openConnection();
     java.io.InputStream in =  uc.getInputStream(); 
     System.out.println("Accessing: " +NO +"   "+ in.toString());
     in.close();
    } catch (IOException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    }      
    //System.out.println("Accessing: " + NO);
    //Thread.sleep((long) (Math.random() * 10000));
    // 访问完后,释放
    semp.release();
    } catch (InterruptedException e) {
    }
    }
    };
    exec.execute(run);
    }
    // 退出线程池
    exec.shutdown();
    }
    }
     
     
    ===========loadrunner 代码============
     

     public int init() throws Throwable {
      return 0;
     }//end of init

     public int action() throws Throwable {
               // Tweb.main((String []) null);
                TT.main((String []) null);
      return 0;
     }//end of action

     public int end() throws Throwable {
      return 0;
     }//end of end
     
     
    在Vuser中测试通过,但是在controller里面报如下的错误
    错误1:   Abnormal termination, caused by mdrv process termination.
     
    错误2:
      Error (-17998): Failed to get [param not passed in call] thread TLS entry.
     
    初步估计是loadrunner防止别人扩充 JAVA多线程的特点,故意做一个限制.唉...不知道是不支持呢,还是别的原因....
  • loadrunner v11 新特性

    2010-11-03 17:41:54

    loadrunner v11 兼容IE8.0
    V11.版本还有许多的新功能如:

    What's New

    Protocols

    • Ajax TruClient - An advanced protocol for modern JavaScript. based applications (including Ajax) emulating user activity within a web browser. Scripts are developed interactively in Mozilla Firefox.
    • Silverlight - A new protocol for Silverlight based applications emulating user activity at the transport level. Allows generating high level scripts by automatically importing and configuring WSDL files used by the application.
    • Java over HTTP - A new protocol designed to record java-based applications and applets. It produces a Java language script. using web functions. This protocol is distinguished from other Java protocols in that it can record and replay Java remote calls over HTTP.
    • Citrix
      • The Citrix Protocol now supports Citrix Online Plugin versions 11.2 and 12.0.
      • Added support for Citrix XenApp Server 5.0
    • Oracle NCA - NCA Java object property support now provides automated creation and registration within a script. of a query-answer table of communication between client-side Java objects and the Oracle NCA server.
    • SAPGUI - Added support for SAPGUI for Windows Client version 7.20.
    • Service Test - The LoadRunner Controller can run scripts created in HP Service Test 11.00, HP's solution for creating and running automated tests for SOA and headless technologies. Refer to the Service Test documentation for details of creating Service Test scripts for a load testing scenario.

    Features

    • Data Format Extension (DFE) - Enhanced data format capabilities for the Web (HTTP/HTML) protocol family. Allows converting raw HTTP traffic into a maintainable and structured XML format and enables correlations by XPATH.
    • Correlation Studio - Web (HTTP/HTML) automatic correlation mechanism has been enhanced to search for possible correlations in the larger scope of snapshot data created during code generation including data formatted by DFE.
    • Snapshot View - New snapshot view for Web (HTTP/HTML) protocol steps allows viewing complete HTTP traffic in both raw and DFE generated formats.
    • VuGen - HP ALM Integration - Enhanced integration with HP Application Lifecycle Management platform. that serves also Quality Center and Performance Center editions.
    • Windows Support - Added support for Windows 7 and Windows Server 2008. See below for limitations.
    • Analysis Reports - Enhanced Analysis reports are more customizable. Analysis data can be exported to a variety of formats, including Word, Excel, PDF, and HTML. New report templates allow saving report definitions and generating reports based on a template.

    Installation and Configuration Information

    Prerequisite Software

    Specific software needs to be installed before you can install LoadRunner. When you run the LoadRunner installation wizard, if the prerequisite software is not already installed on your computer, the wizard detects which software is missing and provides the option to install it.

    The following prerequisite software needs to be installed:

      • .NET Framework 3.5 SP1
      • Microsoft Data Access Components (MDAC) 2.8 SP1 (or later)
      • Microsoft Windows Installer 3.1
      • Microsoft Core XML Services (MSXML) 6.0
      • Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
      • Microsoft Visual C++ 2008 Redistributable Package (x86)
      • Web Services Enhancements (WSE) 2.0 SP3 for Microsoft .NET Redistributable Runtime MSI
      • Web Services Enhancements (WSE) 3.0 for Microsoft .NET Redistributable Runtime MSI
      • Strawberry Perl 5.10.1

    System Requirements for VuGen, Controller, and Analysis

    The following table describes the system requirements for installing VuGen, the Controller, or Analysis:

    Processor
    CPU Type: Intel Core, Pentium, Xeon, AMD or compatible
    Speed: 1 GHz minimum. 2 GHz or higher recommended
    Operating System
    • Windows Vista SP2 32-bit
    • Windows XP Professional SP3 32-bit
    • Windows Server 2003 Standard Edition/Enterprise Edition SP2 32-bit
    • Windows Server 2008 Standard Edition/Enterprise Edition SP2 32-bit and 64-bit
    • Windows 7
    Note: VuGen recording is not supported on 64-bit operating systems.
    Memory (RAM)
    Minimum: 2 GB
    Recommended: 4 GB or higher
    Screen Resolution
    Minimum: 1024 x 768
    Browser
    • Microsoft Internet Explorer 6.0 SP1 or SP2
    • Microsoft Internet Explorer 7.0
    • Microsoft Internet Explorer 8.0
    Available Hard Disk Space
    Minimum: 2 GB


    Load Generator for Windows System Requirements

    The following table describes the system requirements for installing the Load Generator on a Windows machine.

    Processor
    CPU Type: Intel Core, Pentium, Xeon, AMD or compatible
    Speed: 1 GHz minimum. 2 GHz or higher recommended
    Note for Pentium Processors: Intel Hyper-Threading technology is not supported. Hyper-Threading can be disabled in the BIOS. For more information, see:
    Operating System
    The following Windows operating systems are supported:
    • Windows Vista SP2 32-Bit
    • Windows XP Professional SP3 32-Bit
    • Windows Server 2003 Standard Edition/Enterprise Edition SP2 32-Bit
    • Windows Server 2008 Standard Edition/Enterprise Edition SP2 32-Bit and 64-bit
    • Windows 7
    Memory (RAM)
    Minimum: 1 GB
    Note: Memory depends on protocol type and system under test and can vary greatly.
    Browser
    • Microsoft Internet Explorer 6.0 SP1 or SP2
    • Microsoft Internet Explorer 7.0
    • Microsoft Internet Explorer 8.0
    Available Hard Disk Space
    Minimum: 2 GB


    Load Generator for UNIX System Requirements

    This section describes the system requirements necessary for installing the HP Load Generator on a UNIX machine.

    Memory (RAM)
    256 MB minimum
    Note: Memory depends on protocol type and system under test and can vary greatly.
    Available Hard Disk Space
    150 MB minimum


    The following table describes the supported operating systems on which you can install a UNIX HP Load Generator.

    OS Type
    OS Version
    Platform.
    Sun Solaris
    • Solaris 9 (2.9)
    • Solaris 10 (2.10)
    Sun UltraSPARC-based systems
    HP-UX
    HP-UX 11iv2 (11.23)
    HP PA-RISC
    Red Hat Linux
    • Enterprise Linux 4.0
    • Enterprise Linux 5.0
    • CPU Type: Intel Core, Pentium, AMD or compatible
    • Speed: 1 GHz minimum. 2 GHz or higher recommended


    Product Compatibility

    LoadRunner 11.00 is compatible with the following HP product versions:

    • HP Quality Center version 10.00
    • HP Application Lifecycle Management version 11.00
    • HP QuickTest Professional versions 10.00 and 11.00
    • HP Diagnostics versions 8.04 and 9.00 (Note: To use Diagnostics 8.x with LoadRunner 11.00, the Diagnostics 9.00 LoadRunner Add-in must be installed. For more details, see the HP Diagnostics documentation)
    • HP SiteScope versions 10.12 and 11.00

    Pre-Installation Notes and Limitations

    This section includes:

    Windows
    • On Vista machines, if you want to add a new license from the LoadRunner Launcher (Configuration > LoadRunner License > New License), you need to have Administrator privileges on the Vista machine.
    • If you are running McAfee or Aladdin's eSafe anti-virus applications, close them before installing LoadRunner.
    • To use Windows 2003 with a HASP plug, download Aladdin's latest HASP driver.
    UNIX
    • The LoadRunner UNIX installation is based on native packages per operating system. This requires you to be logged in as root user to run the installation.
    • If you are installing a UNIX load generator on an HP-UX operating system, you cannot install it from a network location. You can install it directly from the installation disk or you can copy the installer onto the local directory of the target machine.
    Virtual Environment Installation
    • LoadRunner supports Vmware version ESX 3.0, ESX 3.5, and VM Workstation 5.5 and is certified for the following Windows platforms: Windows XP SP2/SP3, Windows Server 2003 SP2, and Windows Vista SP1.
    • Running Vusers on virtual machines may adversely affect performance due to the sharing of physical resources.
    Diagnostics for J2EE/.NET Requirements

    A unique transaction name must be used for each scenario.

    ContentCheck in Multilingual Environments

    This version supports ContentCheck rules in French, German, Spanish, and Italian. The correct language file should be installed according to the system locale.

    The suitable language file can also be copied from the installation disk:

    ..\lrunner\MSI\setup\international\<lang>\dat\LrwiAedInstallation.xml

    to the <LoadRunner>\dat directory.

    Windows Firewall Considerations

    In most Windows environments, Windows Firewall is turned on by default. The firewall does not allow certain LoadRunner components to communicate with each other. The Windows firewall therefore needs to be turned off.

    Note: Turning off Windows Firewall increases the risk to your computer's security.

    For each process that needs the firewall you can unblock the process by clicking the unblock button in the popup window that indicates that the program needs it, or by manually tuning the Windows firewall from the Exceptions tab.

    WAN Emulation
    • Make sure that the relevant 3rd party components are installed on the load generator machines. Note that in addition to the load generators, you may be required to install the relevant 3rd party component on additional LoadRunner components. For more information, see the relevant 3rd party software installation documentation.
    • The relevant 3rd party component licenses must be purchased from the 3rd party vendor and not from HP.
    HP Performance Validation SDK

    HP Performance Validation SDK version 11.00 can be used only with LoadRunner version 11.00 and above.

    Notes and Limitations

    This section includes:

    General

    • To run LoadRunner on Windows 7 or Window Server 2008, you must have Administrator privileges and User Account Control (UAC) must be disabled.
    • Internet Explorer 8
      • For Click and Script. based protocols, address bar operations and pop-up windows are not supported.
      • The Internet Explorer SmartScreen Filter must be disabled when recording with Citrix Web Access (formerly known as Citrix NFuse).
    • Internet Explorer Enhanced Security Configuration should be disabled when recording with Citrix Web Access (formerly known as Citrix NFuse) recording on Windows 2003/2008 Server.
    • WinInet recording is not supported.
    • Recording on 64 bit machines is not supported, however replaying scripts on 64 bit machines is supported.
    • FTP active mode with SSL is not supported in both explicit and implicit flavors.
    • The network speed simulation settings in the Network: Speed Simulation node in the Run Time Settings do not work with Windows 7. Virtual users will use the maximum bandwidth regardless of which option was selected.
    • It is not recommended to install and uninstall a Load Generator standalone installation on the same machine with a VuGen standalone installation.
    • The Load Generator cannot run Citrix scripts in service mode when the script. was recording using Citrix Client version is 11.2 or higher.
    • The Agent icon does not appear in Windows 2008 and Vista when the LoadRunner Agent service is launched.
    • When LoadRunner Agent runs as service (magentservice.exe), files that are stored on remote network drives or referred to by UNC path cannot be accessed (script, parameter file, etc.). If you want to access files this way, run the LoadRunner Agent as process (magentproc.exe). If this is not possible, please contact Customer Support.

    VuGen

    • SAP (Click and Script) recording. During recording, if you use a keyboard option instead of a UI element (for example, pressing Enter instead of clicking the log on button), the step may not be recorded. In general, when recording your script, it is recommended to use UI elements rather than keyboard options.
    • Citrix snapshots. Black snapshots may appear during record or replay when using Citrix Presentation Server 4.0 and 4.5 (before Rollup Pack 3).
    • Possible workaround: On the Citrix server select Start Menu > Settings > Control Panel > Administrative Tools > Terminal Services Configuration > Server Settings > Licensing and change the setting Per User or Per Device to the alternative setting (i.e. If it is set to Per User, change it to Per Device and vice versa.)

    • Recording Window Size and XenApp Plugin for Hosted Applications 11. The recording window size options does not work properly with the XenApp Plugin for Hosted Applications 11. The size of the client window is installed, but the server screen resolution is not. This is a Citrix Client bug and will be fixed in future Citrix Client versions.
    • Workaround: When recording, set the window size equal to the local screen resolution. When replaying/load testing, set the VuGen or Load Generator's screen resolution to equal the resolution used when the script. was recorded. To verify the recorded resolution, view the Window property in the <Script. Folder>\default.cfg file.

    • For the following protocols, replay is supported but recording is no longer supported: Siebel DB2, Siebel MSSQL, Siebel Oracle, and Voice XML.
    • In Test Result reports, you can only use the Export to HTML file utility for scripts replayed in version 9.50 and later. To generate an HTML report for scripts created with earlier versions, run the script. again in the 9.50 version (or later) of the product.
    • If you terminated the Protocol Advisor immediately after the detection process started, the Protocol Advisor may leave a zombie process of the detected application, causing all recordings and detection sessions that follow to fail. Workaround: Manually terminate the zombie process.
    • The new Web snapshot model is backward compatible with previous versions of LoadRunner, however some snapshot data may be missing. If this occurs, regenerate the script.
    • The JSON Data Format Extension does not work in UNIX environments.
    • Recording a network based application on Windows 7. To record a network-based application (including Web), IPv6 communication must be disabled. Follow the instructions in http://www.addictivetips.com/windows-tips/how-to-disable-ipv6-in-windows-7/ to disable IPv6 in Windows 7.
    • For protocols using XML, replay fails to create a request when a parameterized input argument contains the ampersand (&) character.
    Correlation Studio
    • In VuGen, when correlating large amount of snapshot data, in some cases the parameter is not created and data is not correlated.
    • Scan for correlation will work on a script. that was regenerated and replayed with the early access version.

    VuGen Protocols

    AJAX (Click and Script)
    • ActiveX objects and Java applets are only supported on Windows platforms.
    Ajax TruClient
    • The Ajax TruClient protocol can only be used with applications that support the Mozilla Firefox browser.
    • Documentation and further limitations about this protocol will be provided separately.
    Citrix
    • Installation of the registry patch is required for the support of all version of Citrix clients over 10.x. Additionally, you need to install Enable_Citrix_API.reg from the LoadRunner\dat folder on Vugen or LG machines if a Citrix Client will be installed after installing LoadRunner.
    • Running Citrix Vusers on virtual machines may adversely affect performance due to the sharing of physical resources.
    • Citrix XenApp Desktop cannot be recorded with Citrix Web Access (formerly known as Citrix NFuse) if Desktop View (Desktop Toolbar) is enabled.
    • Citrix Agent text trapping does not work on Citrix servers installed on Windows Server 2008.
    Click and Script. (All)
    • Does not support VBScript
    • Does not support user actions on ActiveX objects and Macromedia Flash
    • Scalability is lower than the Web HTML protocol, depending on the size and functionality of the business process
    • Replay snapshots may differ from the actual Web page
    • Support of right-to-left languages is limited (e.g., bi-directional or reversed text may not be processed as expected). This is defined by the default operating system translation table.
    • Recording of an application in a specific language (e.g., French, Japanese) must be performed in a machine whose default locale (in Settings > Control Panel > Regional Options) is the same language
    • The locale of the load-generator machine, including the default non-Unicode character set, must be configured to be the same as that of the recording machine. It cannot be assumed that the UNIX default character set is the same as in Windows, even for US-English machines, and this has to be explicitly verified. For example, the default character set in some UNIX machines, such as Linux, is UTF-8.
    • The Recording Options dialog box may take a long time to open.
    • Citrix Clients 11.2 and higher do not support the TCP/IP mode in the Citrix > Login node of the Recording Options dialog box.
    • When recording Citrix Web Access (formerly known as Citrix NFuse) applications, set the window size to "No preference" in the Citrix XenApp web portal preferences page.
    • Web (Click and Script) no longer supports replay of Applets and ActiveX objects. This functionality is now part of the AJAX (Click and Script) protocol.
    Java (All)
    • Java Record Replay Protocol: Recording of JMS applications requires JDK version 1.6u17 or lower.
    • Java over HTTP Protocol: Requires the JDK version 1.5 or higher.
    Listing Directory Service (LDAP)
    • If an LDAP version 3 script. fails during replay, modify the mldpa_logon_ex statement to specify the version number by adding "Version=3" after "URL=.."
    • When recording LDAP scripts, the binary parameter values for certain LDAP functions (such as mldap_add or mldap_modify) are not recorded. Recording of binary parameters is part of the protocol's extended functionality and is not supported by VuGen.
    Media Player (MMS)

    Media Player scripts fail with the error: Error -86801:Host access denied, <hostname> not available or missing.

    Workaround: Call the mms_disable_host_check function in all Media Player scripts.

    Microsoft .NET
    • When the application under test retrieves a server-activated object by calling new RemoteObject(), VuGen generates a RemotingServices.Connect function.
    • Applications using multiple processes or multiple application domains are only partially supported.
    Microsoft Remote Desktop Protocol (RDP)
    • Clipboard sharing supports only short simple textual content.
    • When recording with RDP Agent, applications which were developed using CBuilder may not record properly.
    • RDP 6.1 is not supported in Windows 7, Windows Server 2008, Windows Vista SP1 and Windows XP SP3.
    SAP (Click and Script)
    • Cannot define transactions to measure time of a subset of steps done in a modal dialog.
    • During recording, if a user double-clicks on a tree-view tree cell outside of its text, VuGen records "Select" instead of "Activate." This results in a missing POST in replay.
    • If the list of retrieved values contains a scroll bar, cannot select an item that requires scrolling in order to get it from the server.
    • Scalability is lower than the SAP Web protocol, depending on the size and functionality of the business process.
    • Does not support the Replace with Alternate Navigation run-time setting.
    • In certain SAP environments (such as 6.20 and 6.40), the replay fails for tests that call the web_element function and select an element whose tag name is "TD".
    SAPGUI
    • Due to a SAP-related bug, do not use the sapgui_tree_set_column_order API function in LoadRunner version 9.5.
    Silverlight
    • REST services do not generate Silverlight service calls however they can be recorded and replayed.
    • You cannot edit the WSDL location in the Protocol and Security Scenario dialog box.
    • The Update button in Silverlight Service node of the Recording Options dialog box is not working (always reporting success).
    • Duplex (Polling) Binding for WCF Web Services is not supported.
    • Silverlight 4 Client is supported, however applications developed using the new communication features such as net.tcp binding are not supported.
    • VuGen snapshot viewer does not support Silverlight controls.
    • The Silverlight Protocol does not support applications which use Japanese, Korean, Simplified Chinese, and Traditional Chinese.
    WAP
    • Cannot record in secure mode. Workaround: Record script. in non-secure mode and then replay it in secured mode.
    • Cannot replay a script. in connection-less mode.
    Web Services
    • In VuGen Tree view, you may experience problems viewing/editing the following types of elements: any_object, CDATA, derived and recursive.
    • For large SOAP envelopes, Record and Replay snapshots are disabled.
    • The Import SOAP feature is not supported for envelopes containing a single element larger than 500KB.
    • The recording of requests with attachments or security is not supported.
    • For Axis toolkit, Web service calls that include both attachments and security are not supported.
    • For .NET toolkit, SOAP version 1.2 is not supported for asynchronous calls.
    • You can enter text strings up to 10 KB to encode to base 64. If your string is larger, use the Get from file option.
    • For Axis toolkit, to use base64Binary encoding in scripts created before version 9.10, you must update your WSDL.
    • VuGen supports Web Service messages over JMS message Queue, but does not support JMS Topics.
    • JMS Bindings Extensions are not supported.
    • All services in your script. should have the same security scenario. This can be configured via the Protocols and Security tab.
    • Asynchronous Web Service calls and custom user handlers are not supported for WCF.
    • The IsNonceIncluded and TimestampFormat properties of web_service_set_security are only supported in Script. view-not in Tree view. LoadRunner cannot replay scripts containing the soa_xml_validate function.
    • Note: For more detailed Web Services limitations, refer to the HP Service Test readme.

    Controller

    Secure Channels
    • You cannot use the Host Security Manager utility to update security settings on UNIX load generators that use rsh (remote shell) to connect to the Controller.
    • You cannot use the Host Security Manager utility to change the security mode of the load generator located over a firewall from off to on.
    • When the load generator is located over a firewall, if the load generator and Controller have different security modes, communication cannot be established.
    • If the Controller machine is using secure channel communication, the MI Listener should not be installed on the same machine as the Controller.
    • If the Controller machine is using secure channel communication, it will not be able to connect to an HP-UX load generator.
    GUI Vusers
    • LoadRunner supports GUI Vuser scripts created using HP QuickTest. GUI Vuser scripts created in WinRunner are no longer supported.
    • Windows Load Generator machines can only run one GUI Vuser at a time. To run multiple GUI Vusers in a load test, you need to open a terminal server session for each GUI Vuser. For more information, see the HP LoadRunner Controller User Guide.
    SiteScope
    • If you are configuring the SiteScope System Resources Graph (System Resources Graphs > SiteScope), you cannot specify a specific SiteScope user account. LoadRunner uses the default SiteScope Administrator user.
    • For Sitescope 9.51 Users: If you want to configure SiteScope monitoring with a SiteScope account other than the default SiteScope Administrator account, you need to explicitly assign a group with monitors to that account in SiteScope.

    Analysis

    • Analysis currently supports Microsoft SQL Server versions 2005 and up.
    • If you are using Microsoft SQL Server 2000, you need to either migrate Analysis data or upgrade the server to 2005. The following two tasks describe how to perform. the migrating and upgrading procedures:

    To migrate old Analysis data to a SQL 2005 server:

    1. From the SQL Server Management Studio, using Object Explorer, connect to an instance of SQL Server Database Engine.
    2. Expand Databases, right-click Analysis database, select Tasks\Copy Database.
    3. Follow the instructions in the wizard.

    To upgrade SQL 2000 to SQL 2005:

    1. Backup Analysis database on the SQL 2000 (http://msdn.microsoft.com/en-us/library/cc966495.aspx)
    2. Uninstall SQL 2000.
    3. Install SQL 2005.
    4. Restore Analysis data from backup. (http://msdn.microsoft.com/en-us/library/ms177429(SQL.90).aspx)
    • If you are using Microsoft SQL Server 2005 to store Analysis data and you apply a global filter on the Analysis graphs, you may receive errors due to a Microsoft limitation. If you receive an error, try and apply the global filter again.
    • If you are using your own policy in an MS SQL server, you may need to add your own account to the Analysis database template (in the <LR Installation>\bin\dat folder).
    • When exporting Analysis reports to MS Word, take into account that the content load may affect the table format within the document.
    • The following Analysis default settings have been modified: Include Think Time is disabled and Generate complete data only is enabled.
    • There is a limitation with MS Access and SQL queries when filtering a large number of transactions (greater than 100).
    • Even after running the <Language> User Interface Pack, the Analysis UI data generated from the sample session (in the <LR Installation>\tutorial folder) will display in English. Filtering on the graphs will fail. Workaround: Re-generate the graphs and then the corresponding language from the <Language> User Interface Pack will display and filtering will work.

    LoadRunner Integration with HP Service Test

    • To use a Demo or Commuter type license in LoadRunner with Service Test, run sntinit.exe from the product installation's bin folder after the installation.
    • To use a Commuter type license in LoadRunner with Service Test, in the WCommute utility, you must choose the entry Feature "Service Test", version 9.0 —not a later version.

    For more information about Service Test licenses, refer to the HP Service Test Installation Guide.

    WAN Emulation

    • There is no backward compatibility between the current LoadRunner/WAN Emulation integration and any previous integrations.
    • The integrated 3rd party software may not comply with accepted Internationalization (I18N) conventions.
    • Selecting either Use bandwidth, or Use custom bandwidth in the Network: Speed Simulation node in the Run Time Settings, may interfere with the WAN Emulation settings and could lead to unexpected behavior.
    • WAN Emulation is disabled if the host used as the Load Generator is also used as the Controller.
    • WAN Emulation is not supported if the load generator is running on a UNIX platform.

    Windows Vista

    • To run LoadRunner on Windows Vista, User Account Control (UAC) must be enabled for users with User privileges. For users with Administrator privileges, UAC can be enabled or disabled.
    • Running the Windows Aero user interface on Vista machines, may slow down VuGen UI performance.
    • On Vista machines, icons may not appear correctly in some dialog boxes.
    • If LoadRunner is installed on a machine running Vista, LoadRunner cannot be integrated with WinRunner.
    • On Vista machines, replay for LDAP scripts recorded over SSL is not supported.
    • If you want to connect to HP Quality Center from a LoadRunner machine running Vista and the Quality Center client is not installed on your machine, you need to have Administrator privileges on the Vista machine.
    • Replaying a VB Vuser on a load generator machine with Windows Vista requires administrator privileges.
    • When running a LoadRunner Agent on a Load Generator machine running Vista, it is recommended that you restart your machine after installing LoadRunner, before running Vusers.
    • When running the LoadRunner Agent service on a Vista machine, the Agent Configuration will not restart the agent service if it is already running. To manually restart the Agent service, Choose Start > Administrative Tools > Services. Select the LoadRunner Agent service and choose Stop from the right-click menu. Restart it by selecting the LoadRunner Agent service and choosing Start from the right-click menu.
    • On Vista machines, when recording with MS Exchange (MAPI) protocol, the read_next_mail and mapi_read_next_mail_ex functions work only once per script, resulting in reading only the first message in the mail box.
    • On Vista machines with UAC enabled, FTP sessions cannot be recorded on Internet Explorer.
    • Workaround: Change the following Internet Explorer options:

      • Disable Protected Mode by clearing the Enable Protected Mode check box under Tools > Internet Options > Security.
      • Check the Every time I visit the webpage option under Tools > Internet Options > General > Browse history > Settings.

    Multilingual Support

    • Language support. LoadRunner only supports English and the native language of the machine's operating system. For example, if you are using Japanese Windows XP, you can work with LoadRunner in Japanese and in English.
    • Installation path. The path in which installation files for LoadRunner are located, and the path in which LoadRunner is installed, can contain only English characters.
    • .NET Framework 3.5 failure. Installing LoadRunner on a localized machine may result in a failure in the .NET Framework 3.5 installation process, and you will be asked to terminate the installation. This happens because the .NET 3.5 Framework installation attempts to download the Framework Language Pack but fails.
    • Workaround: Terminate the LoadRunner installation according to the Installation wizard's instructions and invoke the LoadRunner installation again.

    • Japanese characters in Web (HTTP/HTML) scripts. If you set the advanced recording option to specify the encoding of an application, and the application uses different character encoding for different pages, then the recording log or script. may display invalid Japanese characters. This does not cause any errors in the script. replay.
    • Non-breaking spaces in Web protocols for Far Eastern languages. A non-breaking space (&nbsp; &#160; &#xA0; `\xA0', etc.) cannot be represented in some Far Eastern locale character sets (in which it is considered a lead byte). Instead, non-breaking spaces are converted to regular spaces (` `, `\x20', etc.), both during script. code generation and replay. This may cause replay problems, such as mismatches in length due to eliminating multiple regular spaces. To work around this issue, either:
      • Remove/add space(s) from/to the script. so the comparison succeeds.
      • Specify regular expressions to avoid the issue.
    • Tutorial scripts. After the Language Pack installation, all sessions and scripts in \HP\LoadRunner\tutorial are still in English.
    • Standalone installations. The installation interface of the VuGen and Analysis standalone are in English and not localized.
    • Flex AMF call properties. Multibyte symbols in Flex AMF call properties will be corrupted in the script. text view.

    HP Software Support

    You can visit the HP Software Support Web site at:

    http://www.hp.com/go/hpsoftwaresupport

    This web site provides contact information and details about the products, services, and support that HP Software offers.

    HP Software online software support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the support site to:

      • Search for knowledge documents of interest
      • Submit and track support cases and enhancement requests
      • Download software patches
      • Manage support contracts
      • Look up HP support contacts
      • Review information about available services
      • Enter into discussions with other software customers
      • Research and register for software training

    Most of the support areas require that you register as an HP Passport user and sign in. Many also require a support contract. To find more information about access levels, go to:

    http://h20230.www2.hp.com/new_access_levels.jsp

    To register for an HP Passport ID, go to:

    http://h20229.www2.hp.com/passport-registration.html

    Legal Notices

    © Copyright 2010 Hewlett-Packard Development Company, L.P.

    Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.

    The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

    The information contained herein is subject to change without notice.


  • loadrunner 指标计算

    2010-10-26 17:30:47

    loadrunner 指标计算

    1.吞吐量计算

       吞吐量计算 = tps * 每一个用户的请求的带宽 ;

    2.Hits per second

       Hits per second  = HTTP per second requests

       (如:http_200 + http_302 + ..)

    3.Per second connections

       New connections =

       New TCP/IP connections open = 

       tps * 步长(一个用户中总的请求数量如:web_url)

    4. Connections

       Connections = opened  tcp/ip  ;

  • 回归性能测试

    2010-09-15 15:51:41

      已经快2年没有做性能测试,突然有一个性能测试的工作,真的是让我心情澎湃... 一直做想做性能测试的我,今天又来机会,不管钱的多少.

      我想,这是一个不错的机会...

      银行性能测试,前年做过一个时间,今年又有机会去做. 其实在银行工作其实不是很开心的. 原因是多方面的...

       但是自己在那确实学了许多的东西, 所以从建行出来自己的工资马上上一个当次.这次去银行做项目,希望自己还有一个不错的发展...

       希望自己能学到更多的东西. 让自己的基础更加牢固. 为1W的目标奋斗...

      

     

     

  • HP LoadRunner 9.50 新特性

    2010-09-14 10:40:05

    HP LoadRunner - Readme

    Software version: 9.50 / January 2009

    This file provides information about HP LoadRunner 9.50.

    What's New

    Version 9.50 provides the following feature enhancements and fixes. For more details about these features, refer to the online documentation.

    New Feature Highlights

    General

    • Windows Vista support. LoadRunner can now be run on Windows Vista SP1 operating systems. For information about Vista limitations, see the Windows Vista Limitations section in the Limitations section.
    • .NET Framework 3.5 support. Support is provided for following protocols: .NET and Web Services.

    New in VuGen

    • Protocol Advisor. VuGen now offers a special Protocol Advisor tool. The Protocol Advisor helps you to determine an appropriate protocol for recording a Vuser script. The Protocol Advisor scans your application for elements of different protocols and displays a list of the detected protocols. These protocols provide a starting point for finding the optimal protocol for your application.
    • Test Results in VuGen. You can export the Test Result reports to HTML and open Quality Center defects directly from the report.
    • HP Service Test Integration. By purchasing a Service Test license for LoadRunner, you can run VuGen with all of the Service Test capabilities.

    New in Controller

    • WAN Emulation. LoadRunner is integrated with 3rd party software that enables you to accurately test point-to-point performance of WAN-deployed products under real-world network conditions. By introducing highly probable WAN effects such as latency, packet loss, and link faults over your LAN, your load test performs the test in an environment that better represents the actual deployment of your application. To learn more about this feature, visit our partners page.
    • Post Collate Command. Allows you to define a command that the Controller will run directly after it collates the results of a scenario run.
    • Secure Channels. You can create secure communication channels between the LoadRunner Controller and load generators, preventing hackers from attacking the corporate networks, and allowing for confidentiality, integrity, and user authenticity within the scope of LoadRunner. You can use the Host Security Manager utility to manage the security settings for all the host machines remotely, or you can manage them locally on each host machine.

    New in Analysis

    • Analysis API. Analysis exposes a new API set that can be used for extracting load test data. Among other capabilities, the API allows you to create an analysis session from test results, analyze raw results of an Analysis session, and extract key session measurements for external use. An application can be launched from the LoadRunner Controller at the completion of a test.
    • Cross Results summary. New summary report for Cross Results analysis.
    • WAN Emulation. Ability to view WAN Emulation (Emulated Locations) information in Analysis sessions.
    • Copy Legend data. Ability to copy and export graph legend data.
    • Filter by measurement. Ability to filter graph by selected measurement directly from Legend window.
    • Advanced database options. New advanced database options to increase performance when processing LoadRunner results or importing data from other sources.
    • SQL Server 2005. Added support for Microsoft SQL Server 2005.

    Enhancements to Existing Protocols

    Citrix
    • Added support for Citrix Presentation Server 4.5.
    • In addition to 32-bit operating systems, the Agent for Citrix Presentation Server (Citrix agent) can now run on a 64-bit operating system.
    • Enhanced image comparison capabilities.
    Oracle (2-Tier)
    • Enhanced support for UTF-16 encoding.
    • Enhanced support for UTF-8 encoding. UTF-8 support is limited to the ASCII range of Unicode characters
    • Added support for Oracle 11g.
    Oracle NCA
    • Added support for Oracle NCA configurator for scripts created with HTML-based recording level.
    • Added support for Oracle E-Business Suite - R12.
    Flex
    • Added support for Real Time Messaging Protocol (RTMP).
    • Added Support for BlazeDS and LifeCycle Data Services environments.
    • Enhanced ability to parse externalizable objects.
    RDP
    • A new agent, the RDP Agent for Microsoft Terminal Server, has been introduced in this version as part of the RDP protocol. The agent provides intuitive and readable scripts, built-in synchronization, detailed information about relevant objects, and other benefits. The agent is provided in the product's DVD and you can install it on any RDP server.
    • Enhanced synchronization reacts to minor changes in UI, such as tooltips or highlighted objects.
    Web Services
    • Database Interaction. The ability to integrate with a database in real-time, to save results of SQL queries, and iterate through data sets.
    • XML editor. Standalone editor to edit XML code independent of the script, scroll through value sets, and duplicate entire arrays.
    • WCF Testing. Support for WCF (Windows Communication Foundation) security, selected WCF proprietary standards, and WCF transports. Ability to configure settings on a service level.
    • Advanced WS-Security. Support for several WS-Security scenarios.
    • MTOM support. Generates and accepts SOAP messages using MTOM.
    • WSDL Reference Tool. A tool for obtaining all files referenced by the WSDL.
    • JMS WSDL Reader. Run-Time settings and Manage Services dialog box automatically load JMS properties from the WSDL.
    • Automatic Toolkit Detection. Built-in tool automatically detects the most appropriate toolkit for your Web Service.

    LoadRunner Feature Videos

    HP LoadRunner contains video presentations describing new features. To view the videos, you must download the Camtasia(c) coder. To download Camtasia coder, click here.

    Feature Videos from Recent Versions

    New Features in Recent Versions

    WebWorks_WriteAnchorOpen("exwp165124", false);WebWorks_WriteAnchorClose("exwp165124", false); WebWorks_WriteDIVOpen("exwp165124", false);

    A new SLA Wizard helps to define goals or service level agreements (SLAs) for the performance metrics. When you run a scenario, LoadRunner gathers and stores performance-related data. When you analyze a run, Analysis compares this data against the SLAs and determines SLA statuses for the defined measurements.

    WebWorks_WriteDIVClose();

    WebWorks_WriteAnchorOpen("exwp171998", false);WebWorks_WriteAnchorClose("exwp171998", false); WebWorks_WriteDIVOpen("exwp171998", false);

    The Controller Classic Scheduler provides the opportunity to create a simple scenario schedule without the real-life schedule emulation features. Users can access the Classic Scheduler from the Controller interface, and continue working with the scheduling features in the same way that they worked prior to the new versions.

    WebWorks_WriteDIVClose();

    WebWorks_WriteAnchorOpen("exwp172000", false);WebWorks_WriteAnchorClose("exwp172000", false); WebWorks_WriteDIVOpen("exwp172000", false);

    • Provides a Business Process Report (Microsoft Word format) that summarizes the VuGen script.
    • The User-Defined Template enables you to save a script. with a specific configuration as a template. You can then use this template as a basis for creating future scripts.
    • Parameter simulator for File type parameters simulates the parameter substitution in an actual scenario.
    • The script. editor contains many enhancements, including Find in Files, and support for a custom comparison tool.
    • Supports an XML viewer for .NET & Java protocols.
    WebWorks_WriteDIVClose();

    WebWorks_WriteAnchorOpen("exwp172006", false);New Protocols in VuGen 9.1 WebWorks_WriteAnchorClose("exwp172006", false); WebWorks_WriteDIVOpen("exwp172006", false);

    LoadRunner 9.10 supports the Flex 2.0 framework with the Flex protocol. Using this technology, LoadRunner records and replays underlying protocols, including AMF3. This allows you to test full Flex applications, or applications that use Flash components.

    WebWorks_WriteDIVClose();

    WebWorks_WriteAnchorOpen("exwp172008", false);WebWorks_WriteAnchorClose("exwp172008", false); WebWorks_WriteDIVOpen("exwp172008", false);

    HP Performance Validation SDK (Software Development Kit) provides you with the tools to create a custom protocol. The protocol enables LoadRunner to record and run load tests on a previously unsupported application. As part of the QME (Quality Management Extensibility program), the SDK allows you to expand LoadRunner and create a record and replay protocol to fit your unique performance testing requirements.

    WebWorks_WriteDIVClose();

    WebWorks_WriteAnchorOpen("exwp172010", false);WebWorks_WriteAnchorClose("exwp172010", false); WebWorks_WriteDIVOpen("exwp172010", false);

    • AJAX (Click and Script)
    • AMF (Adobe's protocol for Flash applications)
    • RTE (Remote Terminal Emulation)
    • RDP (Remote Desktop Protocol - Terminal Emulation)
    • Web Services and SOA
WebWorks_WriteDIVClose();

Installation and Configuration Information

Prerequisite Software

Specific software needs to be installed before you can install LoadRunner. When you run the LoadRunner installation wizard, if the prerequisite software is not already installed on your computer, the wizard detects which software is missing and provides the option to install it.

The following prerequisite software needs to be installed:

    • .NET Framework 3.5
    • Microsoft Data Access Components (MDAC) 2.8 SP1 (or later)
    • Microsoft Windows Installer 3.1
    • Microsoft Core XML Services (MSXML) 6.0
    • Microsoft Visual C++ 2005 Redistributable Package (x86)
    • Microsoft Visual C++ 2008 Redistributable Package (x86)
    • Web Services Enhancements (WSE) 2.0 SP3 for Microsoft .NET Redistributable Runtime MSI
    • Web Services Enhancements (WSE) 3.0 for Microsoft .NET Redistributable Runtime MSI

System Requirements

VuGen, Controller, and Analysis

The following table describes the system requirements for installing VuGen, the Controller, or Analysis:

Processor
CPU Type: Intel Core, Pentium, AMD or compatible
Speed: 1 GHz minimum. 2 GHz or higher recommended
Note for Pentium Processors: Intel Hyper-Threading technology is not supported. Hyper-Threading can be disabled in the BIOS. For more information, see:
Operating System
The following 32-bit Windows operating systems are supported:
  • Windows Vista SP1
  • Windows XP Professional SP2 or SP3
  • Windows Server 2003 Standard Edition/Enterprise Edition SP2
  • Windows Server 2003 Standard Edition/Enterprise Edition R2 SP2
  • 没明确说明WIN7 是否支持...唉
Memory (RAM)
Minimum: 512 MB
Recommended: 1 GB or higher
Screen Resolution
Minimum: 1024 x 768
Browser
  • Microsoft Internet Explorer 6.0 SP1 or SP2
  • Microsoft Internet Explorer 7.0
Available Hard Disk Space
Minimum: 1.5 GB


Load Generator for Windows System Requirements

The following table describes the system requirements for installing the Load Generator on a Windows machine.

Processor
CPU Type: Intel Core, Pentium, AMD or compatible
Speed: 1 GHz minimum. 2 GHz or higher recommended
Note for Pentium Processors: Intel Hyper-Threading technology is not supported. Hyper-Threading can be disabled in the BIOS. For more information, see:
Operating System
The following 32/64-bit Windows operating systems are supported:
  • Windows Vista SP1
  • Windows XP Professional SP2 or SP3
  • Windows Server 2003 Standard Edition/Enterprise Edition SP2
  • Windows Server 2003 Standard Edition/Enterprise Edition R2 SP2
Memory (RAM)
Minimum: 1 GB
Note: Memory depends on protocol type and system under test and can vary greatly.
Browser
  • Microsoft Internet Explorer 6.0 SP1 or SP2
  • Microsoft Internet Explorer 7.0
Available Hard Disk Space
Minimum: 1 GB


Load Generator for UNIX System Requirements

The following table describes the memory requirements for installing the Load Generator on a UNIX machine.

Memory (RAM)
256 MB minimum
Note: Memory depends on protocol type and system under test and can vary greatly.
Available Hard Disk Space
150 MB minimum


The following table describes the supported operating systems on which you can install a UNIX load generator.

OS Type
OS Version
Platform.
Sun Solaris
  • Solaris 9 (2.9)
  • Solaris 10 (2.10)
Sun UltraSPARC-based systems
HP-UX
  • HP-UX 11i (11.11)
  • HP-UX 11iv2 (11.23)
HP PA-RISC
IBM AIX
  • AIX 5.2
  • AIX 5.3
PowerPC
Red Hat Linux
  • Enterprise Linux 3.0
  • Enterprise Linux 4.0
  • Enterprise Linux 5.0
  • CPU Type: Intel Core, Pentium, AMD or compatible
  • Speed: 1 GHz minimum. 2 GHz or higher recommended


Product Compatibility

LoadRunner 9.50 is compatible with the following HP product versions:

  • HP Quality Center versions 9.2 and 10.0
  • HP QuickTest Professional versions 9.5 and 10.0
  • HP Diagnostics version 8.0
  • HP SiteScope version 9.02 and 9.51 (9.51 is included in the LoadRunner package)

Pre-Installation Notes and Limitations

Windows
  • To run the LoadRunner installation, you must have full local administrative rights on the designated machine.
  • If LoadRunner 8.1 FP4 or earlier is installed on your machine, uninstall the current version before you begin the new installation.
  • You cannot use the UNC (Universal Naming Convention) path to run the installation. Therefore, if the LoadRunner installation directory is located on a network drive, the network drive needs to be mapped before you can run the installation.
  • LoadRunner does not support installation via terminal service. Installation must be performed at the destination machine.
  • You cannot install LoadRunner on a machine that contains an existing installation of HP Performance Center or a standalone installation of either Analysis, Virtual User Generator, or Service Test.
  • On Vista machines, if you want to add a new license from the LoadRunner Launcher (Configuration > LoadRunner License > New License), you need to have Administrator privileges on the Vista machine.
  • If you are running McAfee or Aladdin's eSafe anti-virus applications, close them before installing LoadRunner.
  • To use Windows 2003 with a HASP plug, download Aladdin's latest HASP driver.
  • LoadRunner no longer supports Windows 2000.
UNIX
  • The LoadRunner UNIX installation is based on native packages per operating system. This requires you to be logged in as root user to run the installation.
  • If you are installing a UNIX load generator on an HP-UX operating system, you cannot install it from a network location. You can install it directly from the installation disk or you can copy the installer onto the local directory of the target machine.
Virtual Environment Installation
  • LoadRunner supports Vmware version ESX 3.0, ESX 3.5, and VM Workstation 5.5 and is certified for the following Windows platforms: Windows XP SP2/SP3, Windows Server 2003 SP2, and Windows Vista SP1.
  • Running Vusers on virtual machines may adversely affect performance due to the sharing of physical resources.
Diagnostics for J2EE/.NET Requirements:
  • A unique transaction name must be used for each scenario.
ContentCheck in Multilingual Environments
  • This version supports ContentCheck rules in French, German, Spanish, and Italian. The correct language file should be installed according to the system locale.
  • The suitable language file can also be copied from the installation disk:

    ..\lrunner\lrunner\WebInfra.nt\setup\international\<lang>\dat\LrwiAedInstallation.xml

to the <LoadRunner>\dat directory.

Windows Firewall Considerations

In most Windows environments, Windows Firewall is turned on by default. The firewall does not allow certain LoadRunner components to communicate with each other. The Windows firewall therefore needs to be turned off.

Note: Turning off Windows Firewall increases the risk to your computer's security.

For each process that needs the firewall you can unblock the process by clicking the unblock button in the popup window that indicates that the program needs it, or by manually tuning the Windows firewall from the Exceptions tab.

Oracle NCA Forms Support
  • Support forms 4.5, 6, 9, and 10. Refer to the HP Virtual User Generator User Guide for configuration instructions for forms 4.5.
WAN Emulation
  • Make sure that the relevant 3rd party components are installed on the load generator machines. Note that in addition to the load generators, you may be required to install the relevant 3rd party component on additional LoadRunner components. For more information, see the relevant 3rd party software installation documentation.
  • The relevant 3rd party component licenses must be purchased from the 3rd party vendor and not from HP.
HP Performance Validation SDK
  • HP Performance Validation SDK version 9.50 can be used only with LoadRunner version 9.50 and above.

Limitations

VuGen

General
  • For the following protocols, replay is supported but recording is no longer supported: Siebel DB2, Siebel MSSQL, Siebel Oracle, and Voice XML.
  • In Test Result reports, you can only use the Export to HTML file utility for scripts replayed in version 9.50 and later. To generate an HTML report for scripts created with earlier versions, run the script. again in the 9.50 version (or later) of the product.
  • To compare snapshots, you cannot use a custom comparison tool.
Data Execution Prevention

Data Execution Prevention (DEP) may cause VuGen to stop recording. DEP was introduced in Windows XP SP2 and Windows Server 2003 SP1, and is included in Windows Vista.

If you experience unusual behavior. during recording in these environments, modify the DEP settings.

To modify the Windows DEP settings:

  1. Open Start > Control Panel > System.
  2. In the Advanced tab, click Performance settings.
  3. In the Performance Options Data Execution Prevention tab, select the first option, DEP for essential services only.
  4. If you cannot change this option, click Add. Browse to the client program, for example IEXPLORE.EXE.

    If neither of these options are possible, try to disable DEP completely.

    1. In the Control Panel, click the Advanced tab under System section.
    2. Under Startup and Recovery, click Edit.
    3. Replace NoExecute=OptOut with NoExecute=AlwaysOff.
  5. Click OK to save the settings.
  6. Reboot the machine.

Controller

Secure Channels
  • You cannot use the Host Security Manager utility to update security settings on UNIX load generators that use rsh (remote shell) to connect to the Controller.
  • You cannot use the Host Security Manager utility to change the security mode of the load generator located over a firewall from off to on.
  • When the load generator is located over a firewall, if the load generator and Controller have different security modes, communication cannot be established.
  • If the Controller machine is using secure channel communication, the MI Listener should not be installed on the same machine as the Controller.
GUI Vusers
  • LoadRunner supports GUI Vuser scripts created using HP QuickTest. GUI Vuser scripts created in WinRunner are no longer supported.
  • Windows Load Generator machines can only run one GUI Vuser at a time. To run multiple GUI Vusers in a load test, you need to open a terminal server session for each GUI Vuser. For more information, see the HP LoadRunner Controller User Guide.
SiteScope
  • If you are configuring the SiteScope System Resources Graph (System Resources Graphs > SiteScope), you cannot specify a specific SiteScope user account. LoadRunner uses the default SiteScope Administrator user.
  • For Sitescope 9.51 Users: If you want to configure SiteScope monitoring with a SiteScope account other than the default SiteScope Administrator account, you need to explicitly assign a group with monitors to that account in SiteScope.

Analysis

  • If you are using Microsoft SQL Server 2005 to store Analysis data and you apply a global filter on the Analysis graphs, you may receive errors due to a Microsoft limitation. If you receive an error, try and apply the global filter again.
  • If you merge graphs in Analysis, you cannot use the Filter current graph by selected measurements button in the Legend window, to filter the graph.

WAN Emulation

  • There is no backward compatibility between the current LoadRunner/WAN Emulation integration and any previous integrations.
  • The integrated 3rd party software may not comply with accepted Internationalization (I18N) conventions.
  • Selecting either Use bandwidth, or Use custom bandwidth in the Network: Speed Simulation node in the Run Time Settings, may interfere with the WAN Emulation settings and could lead to unexpected behavior.
  • WAN Emulation is disabled if the host used as the Load Generator is also used as the Controller.
  • WAN Emulation is not supported if the load generator is running on a UNIX platform.

Windows Vista Limitations

  • To run LoadRunner on Windows Vista, User Account Control (UAC) must be enabled for users with User privileges. For users with Administrator privileges, UAC can be enabled or disabled.
  • Running the Windows Aero user interface on Vista machines, may slow down VuGen UI performance.
  • On Vista machines, icons may not appear correctly in some dialog boxes.
  • On Vista machines, replay for LDAP scripts recorded over SSL is not supported.
  • If you want to connect to HP Quality Center from a LoadRunner machine running Vista and the Quality Center client is not installed on your machine, you need to have Administrator privileges on the Vista machine.
  • Replaying a VB Vuser on a load generator machine with Windows Vista requires administrator privileges.
  • When running a LoadRunner Agent on a Load Generator machine running Vista, it is recommended that you restart your machine after installing LoadRunner, before running Vusers.
  • When running the LoadRunner Agent service on a Vista machine, the Agent Configuration will not restart the agent service if it is already running. To manually restart the Agent service, Choose Start > Administrative Tools > Services. Select the LoadRunner Agent service and choose Stop from the right-click menu. Restart it by selecting the LoadRunner Agent service and choosing Start from the right-click menu.
  • On Vista machines, when recording with MS Exchange (MAPI) protocol, the read_next_mail and mapi_read_next_mail_ex functions work only once per script, resulting in reading only the first message in the mail box.
  • On Vista machines, FTP sessions cannot be recorded on Internet Explorer.

Multilingual Support

  • Language support. LoadRunner only supports English and the native language of the machine's operating system. For example, if you are using Japanese Windows XP, you can work with LoadRunner in Japanese and in English.
  • Installation path. The path in which installation files for LoadRunner are located, and the path in which LoadRunner is installed, can contain only English characters.
  • Japanese characters in Web (HTTP/HTML) scripts. If you set the advanced recording option to specify the encoding of an application, and the application uses different character encoding for different pages, then the recording log or script. may display invalid Japanese characters. This does not cause any errors in the script. replay.
  • Non-breaking spaces in Web protocols for Far Eastern languages. A non-breaking space (&nbsp; &#160; &#xA0; `\xA0', etc.) cannot be represented in some Far Eastern locale character sets (in which it is considered a lead byte). Instead, non-breaking spaces are converted to regular spaces (` `, `\x20', etc.), both during script. code generation and replay. This may cause replay problems, such as mismatches in length due to eliminating multiple regular spaces. To work around this issue, either:
    • Remove/add space(s) from/to the script. so the comparison succeeds.
    • Specify regular expressions to avoid the issue.

Protocols

Microsoft .NET
  • When the application under test retrieves a server-activated object by calling new RemoteObject(), VuGen generates a RemotingServices.Connect function.
  • Applications using multiple processes or multiple application domains are only partially supported.
Citrix
  • Running Citrix Vusers on virtual machines may adversely affect performance due to the sharing of physical resources.
Web (HTTP/HTML)
  • In the web_link function, the value of the text argument cannot exceed 1 KB.
Click and Script. (All)
  • Does not support VBScript
  • Does not support user actions on ActiveX objects and Macromedia Flash
  • Scalability is lower than the Web HTML protocol, depending on the size and functionality of the business process
  • Replay snapshots may differ from the actual Web page
  • Support of right-to-left languages is limited (e.g., bi-directional or reversed text may not be processed as expected)
  • Recording of an application in a specific language (e.g., French, Japanese) must be performed in a machine whose default locale (in Settings > Control Panel > Regional Options) is the same language
  • The locale of the load-generator machine, including the default non-Unicode character set, must be configured to be the same as that of the recording machine. It cannot be assumed that the UNIX default character set is the same as in Windows, even for US-English machines, and this has to be explicitly verified. For example, the default character set in some UNIX machines, such as Linux, is UTF-8.
Web (Click and Script)
  • No longer supports replay of Applets and ActiveX objects. This functionality is now part of the new AJAX (Click and Script) protocol.
AJAX (Click and Script)
  • The ajax_auto_complete function with the Select argument does not work with versions of script.aculo.us AJAX framework that are earlier than 1.8.
  • ActiveX objects and Java applets are only supported on Windows platforms.
SAP (Click and Script)
  • Cannot define transactions to measure time of a subset of steps done in a modal dialog
  • During recording, if a user double-clicks on a tree-view tree cell outside of its text, VuGen records "Select" instead of "Activate." This results in a missing POST in replay.
  • If the list of retrieved values contains a scroll bar, cannot select an item that requires scrolling in order to get it from the server.
  • Scalability is lower than the SAP Web protocol, depending on the size and functionality of the business process.
  • Does not support the Replace with Alternate Navigation run-time setting.
  • In certain SAP environments (such as 6.20 and 6.40), the replay fails for tests that call the web_element function and select an element whose tag name is "TD".
SAPGUI
  • Due to a SAP-related bug, do not use the sapgui_tree_set_column_order API function in LoadRunner version 9.5.
Microsoft Remote Desktop Protocol (RDP)
  • Clipboard sharing supports only short simple textual content.
Listing Directory Service (LDAP)
  • If an LDAP version 3 script. fails during replay, modify the mldpa_logon_ex statement to specify the version number by adding "Version=3" after "URL=.."
  • When recording LDAP scripts, the binary parameter values for certain LDAP functions (such as mldap_add or mldap_modify) are not recorded. Recording of binary parameters is part of the protocol's extended functionality and is not supported by VuGen.
Media Player (MMS)

Media Player scripts fail with the error: Error -86801:Host access denied, <hostname> not available or missing.

Workaround: Call the mms_disable_host_check function in all Media Player scripts.

WAP
  • Cannot record in secure mode. Workaround: Record script. in non-secure mode and then replay it in secured mode.
  • Cannot replay a script. in connection-less mode.
Web Services
  • In VuGen Tree view, you may experience problems viewing/editing the following types of elements: any_object, CDATA, derived and recursive.
  • For large SOAP envelopes, Record and Replay snapshots are disabled.
  • The Import SOAP feature is not supported for envelopes containing a single element larger than 500KB.
  • The recording of requests with attachments or security is not supported.
  • For Axis toolkit, Web service calls that include both attachments and security are not supported.
  • For .NET toolkit, SOAP version 1.2 is not supported for asynchronous calls.
  • You can enter text strings up to 10 KB to encode to base 64. If your string is larger, use the Get from file option.
  • For Axis toolkit, to use base64Binary encoding in scripts created before version 9.10, you must update your WSDL.
  • VuGen supports Web Service messages over JMS message Queue, but does not support JMS Topics.
  • JMS Bindings Extensions are not supported.
  • All services in your script. should have the same security scenario. This can be configured via the Protocols and Security tab.
  • Asynchronous Web Service calls and custom user handlers are not supported for WCF.
  • Note: For more detailed Web Services limitations, refer to the HP Service Test readme.

Documentation

The first page of this readme document contains the following identifying information:

    • Version number, which indicates the software version.
    • Publish date, which changes each time the document is updated.

To check for recent updates or to verify that you are using the most recent edition, visit the following URL:

http://h20230.www2.hp.com/selfsolve/manuals

This site requires that you register for an HP Passport and sign-in. To register for an HP Passport ID, go to:

http://h20229.www2.hp.com/passport-registration.html

Or click the New users - please register link on the HP Passport login page.

You will also receive updated or new editions if you subscribe to the appropriate product support service. Contact your HP sales representative for details.

Note: To view files in PDF format (*.pdf), Adobe Acrobat Reader must be installed on your system. To download Adobe Acrobat Reader, go to the following URL: www.adobe.com.

Support

You can visit the HP Software Support Web site at:

http://www.hp.com/go/hpsoftwaresupport

This web site provides contact information and details about the products, services, and support that HP Software offers.

HP Software online software support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive

  • 性能测试的感受

    2010-07-30 11:10:11

      做了三年的性能测试,自己感觉越来越迷茫了... 可能是在一个公司待的时间长了吧.没有新鲜感,没有激情了...

       做的项目也没有什么挑战性...都是很简单,很小的项目...我感觉自己都有点荒废了... 自己学的东西都用不上. 时间长了,对自己都有点不满意了.

       我想换工作了...

       性能测试,其实还是不错的前途,但是一个公司只做性能测试,很少很少,除非是银行的项目. 现在都感觉自己的还能不能继续走下去了..

       性能测试建议学习的东西:

       性能测试工具: loadruner

       数据库: oracle

       中件间: weblogic ,tuxedo等

       web server: appach ; tomcat 等容器

       操作系统: unix ; linux 基本的shell命令.

      其实上面的东西... 要是都是精通了真的是不容易的,. 所以打算做性能测试的人就要首先将自己的基本功给夯实了. 否则不建议你性能测试是你的发展方向.

       我这几天也在不断的面试, 但是感觉大部分的大公司都要求有开发经验的,如果你要的工资在8k以上的.这对没有开发经验的我,真是一个弱项啊...

       测试必须要会开发吗? 其实不然的,如果会当然更好的,可以增加你的身价.以前我做银行的项目的性能测试也就那么会事.

       当你入门后,其实技术并不难的. 难的是自己如果来经营管理自己的团队,如果和各个部门很好,有效的沟通. 将遇到的问题给解决了.

       所以如果真的想拿到高的工资,技术是基础,而你的管理能力是相关重要的... 一家之言... 希望大家的指点...和讨论/

      

  • loadrunner 用户百分比和业务百分比关系

    2010-04-08 18:04:07

    loadrunner 用户百分比和业务百分比关系?
      做了两年的性能测试吧, 但是一直感觉用户提的业务模型和我们平时讲的 loadrunner用户百分比不是一回事. 但是如何将 业务百分比转化成 用户的百分比呢? 其实这个问题 loadrunner如果是解决不了的.
       所以其实大家做的许多性能测试,我感觉不是太准确的.甚至有的时候就按用户的百分比来进行的.这样对客户也是太不负责了. 只是个人感觉. 如果将用户的业务模型和我们的性能测试工具联系在一起,我想还是一个比较难做的事情.
      原因: 业务百分比其实就是 事务的比例. 但是这个事务的比例是服务器来决定的,不是一个不确定的因素. 而客户提出的要求是一个确定的东西.如果将一个不变的东西,转化成loadrunner里面一个不变的东西.感觉不太实现的
      我做一个小小的实现,本想通过 goal-oriented scenario 来实现,但是发现这个只能模拟 基于事务或是响应时间,基于目标的方法.但是和我们平时讲的百分比还不是一回事的.
       如果真想做到这一点的话. 那就是使用一个脚本,设置每一个脚本的循环次数,这样才可以保证所以的业务都是按这个设置的值来进行的.
       但是一个脚本,会有一个问题,业务间的并发问题就很难来模拟的.所以就想,建议大家和HP公司都想想办法,如果将这两个部分有机的结合在一起.
       没有做过性能测试的人或是做的很少的人,可能会不明白我在讲什么.但是你如果真的深入性能测试,你就会明白....
       好了,下班了... 回家睡觉了... 明天继续奋斗...
  • jmeter测试oracle

    2010-03-18 18:56:05

    1.将oracle10.jar放置到 jmeter/lib目录下

    2.新创建一个 线程组 jdbc_user

    3.创建一个链接池 JDBC Connection Configuration

    输入的信息为:

    variable name: oracle

    dataurl:  jdbc:oracle:thin:@10.215.4.10:1521:caac

    jdbcdriverclass: oracle.jdbc.driver.OracleDriver

    username: xiao

    passsword:xiao

    4.创建一个JDBC Request

    参数输入:

     variablename: oracle <与第三步保持一致variable name:oracle>

     sql query: select * from table_name(输入要查询的SQL语句)

    5.加入察看结果树

     通过这个 可以查看查询结果是否正确.

     

  • loadrunner中JAVA环境变量设置

    2009-12-25 13:26:04

    众所周知,Java语言是一门非常适合网络开发的语言,用Java语言进行性能测试脚本开发将会大大提高测试开发效率。LoadRunner中提供了对Java虚拟用户的支持。Java虚拟用户依托于JDK,这大大扩充了LoadRunner的脚本开发功能。测试人员既可以用Java虚拟用户来测试基于Java的应用系统的性能,又可以使用Java语言的强大开发脚本功能来测试其他平台的系统性能。

    本章将和读者一起探索LoadRunner的Java世界,重点讨论如何开发Java自定义的虚拟用户脚本。本章主要内容如下:

    n  认识Java虚拟用户

    n  Java脚本开发基础

    n  Java算法测试案例

    7.1  认识Java虚拟用户

    7.1.1  Java虚拟用户协议

    Java虚拟用户脚本主要有Java Vuser、Corba-Java、RMI-Java、EJB等类型。这些类型的虚拟用户脚本均可以用Java语言来手工编写。下面将对各类Java虚拟用户简单地进行介绍。

    Java Vuser

    Java Vuser是自定义的Java虚拟用户脚本,脚本中可以使用标准的Java语言。这种虚拟用户不可以录制,只能采用纯手工编写,其适用范围和C Vuser一样,非常广泛。

    本章主要探讨Java Vuser的开发方法。

    Corba-Java

    Corba-Java类型的虚拟用户主要用来测试用Java编写的、使用Corba应用程序或小程序的性能,用户可以先运行VuGen录制的脚本,然后使用标准的Java库函数以及LoadRunner特有的Java方法来增强该脚本。

    RMI-Java

    RMI-Java 虚拟用户适用于测试RMI(远程方法调用)Java应用程序或小程序。选择RMI-Java 用户进行录制,VuGen可以创建对应的Java脚本。完成录制后,可以使用JDK或自定义类,通过标准的Java代码来增强或修改脚本,还可以通过特定于LoadRunner的Java方法增强该脚本。

    EJB

    EJB虚拟用户专门用于测试Enterprise Java Beans对象。采用EJB协议,VuGen会自动创建脚本以测试EJB功能,无需录制或编程,这和标准的Java Vuser明显不同。

    在使用EJB协议类型的虚拟用户生成脚本前,需要指定JNDI属性和关于应用程序服务器的其他信息。LoadRunner的EJB检测器首先扫描应用程序服务器并确定哪些EJB可用;接着选择要测试的EJB,LoadRunner将生成要测试每个EJB方法的脚本,并为每个方法创建事务,便于度量其性能并找出问题。

    需要注意的是,创建EJB虚拟用户测试脚本必须在应用程序服务器主机上安装LoadRunner EJB检测器,而且检测器必须处于活动状态。EJB检测器是一个独立的代理程序,必须将其安装在要扫描查找EJB的每一台计算机上。安装EJB检测器前,计算机上还需要安装有效的JDK环境。

    本书中将以Java Vuser为例来讲解Java虚拟用户的开发和使用方法。Corba-Java、RMI-Java、EJB、Jacada Vuser等类型的虚拟用户使用方法可以参考LoadRunner的联机帮助手册,但是其手工脚本的开发方法与Java Vuser是一样的。

    在“新建虚拟用户”对话框中的“自定义”或“全部协议”类别下选择“Java Vuser”即可创建空的Java Vuser脚本,如图7-1所示。

    在自动生成的脚本中,vuser_init、vuser_end部分没有任何内容,Actions部分生成的脚本如图7-2所示。对于Java类型的虚拟用户,可以编辑Actions类,而init、end部分则不可以进行编辑。在Actions类中,有三个方法init、action和end,通常在init方法中编写初始化代码、在action方法中编写业务流程、在end方法中编写诸如释放资源之类的代码。

    图7-1  选择Java Vuser协议

    图7-2  Java Vuser自动生成的Actions部分

    Java Vuser脚本中可以放置任何标准Java代码,这也是Java虚拟用户的魅力所在。

    7.1.2  Java虚拟用户适用范围

    LoadRunner完全支持C语言,原则上可以用C语言实现任何想要录制的功能。但是C语言的特点决定了这样做是不现实的:一是性能测试脚本开发成本非常高;二是很多企业的测试人员开发基础不好。因此,性能测试开发多选用C++、C#、Java等面向对象语言——因为这类语言既有成熟的集成开发工具,又有庞大的类库来支撑,测试脚本开发速度会更快。下一章将重点介绍如何用.NET来开发性能测试脚本。

    Java虚拟用户适用范围非常广,归纳起来主要有两大类:一类是不太适合录制的业务功能点的性能测试,例如网页上Http文件的下载过程、视频播放等;另一类是基于Java语言开发的应用系统的性能测试,这类应用更适合采用Java虚拟用户进行测试。

    用Java Vuser实现无法录制的测试需求

    这类测试需求往往关注于对服务器产生的压力,重点测试在一定压力下服务器的负载情况,为评估、部署、调优系统提供参考。在这类测试工作中,Java的作用仅是一门语言,用于辅助测试人员完成测试程序的开发。

    在性能测试工作中,不能录制的测试点很多,主要有以下几类:

    l  含有控件的Web应用

    在Web应用中,很多包含一些插件的浏览器应用经常不能录制。这类应用往往涉及很多协议,因此录制起来不是特别方便。

    对于这类应用,可以用Java语言调用其功能来完成用户行为的模拟。

    l  一些和媒体播放、文件下载等相关的应用

    媒体播放或文件下载等过程的录制往往不容易控制,如果是应用基于P2P的协议,则会更加复杂。因此,这类测试只能由测试人员开发虚拟用户脚本来完成。

    用Java Vuser测试基于Java语言的应用系统性能

    相比前面,基于Java语言开发的应用系统,在性能测试中采用Java虚拟用户更显得“门当户对”。这类虚拟用户主要应用在下面两类测试中:

    l  核心算法或业务的执行效率

    对银行、电信等大型的基于J2EE的架构应用系统中,开发阶段的性能测试是必不可少的。为了降低后期遇到性能问题的风险,往往在开发阶段进行一些核心业务的性能测试。这些核心业务或要求较高的执行效率,或者要求支持较多用户的并发。因此,可以利用Java Vuser来测试这些业务的执行效率。

    l  Java应用中不能录制的业务模块

    很多时候,一些J2EE架构的业务系统用LoadRunner录制起来不是特别方便,例如一些Java智能客户端程序。这时可以手工编写测试代码,完成测试任务。与非Java应用相比,Java应用中不能录制的业务功能更适合采用Java虚拟用户,因为可以直接对一些方法进行调用。

    由于Java语言的强大功能,Java虚拟用户的应用远不止上面这些,读者可以慢慢挖掘。

    7.1.3  脚本开发环境配置

    Java虚拟用户需要Java开发与运行环境的支持,因此首先要安装JDK。JDK是Java开发工具包的简称(Java Development Kit),Sun公司将JDK1.2以后的版本通称为Java 2。JDK的另外一种叫法是J2SDK(Java 2 Software Development Kit),现在比较常见的J2SDK是1.4以上的版本。JDK可以从http://java.sun.com/网站上下载,这里不再赘述。

    下面简单介绍Java虚拟用户开发与运行环境的配置。在本章中,JDK安装在“C:\j2sdk1.4.1”路径下,LoadRunner安装在“D:\Program Files\Mercury Interactive\Mercury LoadRunner”目录下,系统调试环境以Windows XP为例。

    第一步:在桌面上右键点击“我的电脑”,进入到“系统属性”设置界面,切换到“高级”选项卡,如图7-3所示。

    第二步:点击图7-3中的“环境变量”,进入到环境变量配置界面,如图7-4所示。

    第三步:在图7-4的“系统变量”中,选中CLASSPATH,点击编辑,如果没有CLASSPATH,则点击“新建”,同样会进入图7-5所示的界面。

    通常安装了LoadRunner等软件的系统会创建CLASSPATH变量。这里需要注意的是,一定要在CLASSPATH变量值的最前面输入当前路径“.”和JDK的类库路径,例如“.;C:\j2sdk1.4.1\lib; C:\j2sdk1.4.1\jre\lib;”,否则将可能导致Java虚拟用户的运行错误。

    例如:在图7-4中,CLASSPAT变量值是“.;C:\j2sdk1.4.1\lib; C:\j2sdk1.4.1\jre\lib;D:\ Tomcat-5.0\common\lib; D:\Program Files\Mercury Interactive\Mercury LoadRunner\ classes;D:\ Program Files\ Mercury Interactive\Mercury LoadRunner\lib”。

    图7-3  系统属性界面

    图7-4  环境变量设置

    图7-5  系统类路径设置

    第四步:在图7-4的“系统变量”中,选中Path,点击编辑,会进入图7-6所示的界面。在变量值的最前面填上JDK开发工具包的bin目录路径。

    图7-6  系统Path设置

    这里仍然要在Path变量值的最前面输入当前路径“· ”和JDK的bin目录路径,如“.;C:\j2sdk1.4.1\bin;C:\j2sdk1.4.1\jre\bin;”,否则Java虚拟用户可能产生运行错误。

    例如在图7-6中,Path变量值是:

    “.;C:\j2sdk1.4.1\bin;C:\j2sdk1.4.1\jre\bin;D:\Program Files\Mercury Interactive\Mercury LoadRunner\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem; C:\Program Files\Intel\Wireless\Bin\”。

    开发环境的配置会因操作系统和应用程序的安装路径不同而有所差异,根据实际情况进行相应的修改即可。

  • 341/212>

    用户菜单

    我的栏目

    我的存档

    数据统计

    RSS订阅

    Open Toolbar