未来已来

发布新日志

  • linux shell 编程中经常用的linux系统信息 命令

    2008-10-09 11:54:50

    获得KDE Desktop版本:

    konqueror --version

    获得Gnome Desktop版本:

    gnome-panel --version

    获得Mozilla browser 版本:

    mozilla --version

    获得Firefox browser 版本:

    firefox --version

    获得当前系统Language设定:

    set | egrep '^(LANG|LC_)'

    获得disk space usage:

    df -h

    获得file space usage:

    du -h

    获得Linux glibc 版本:

    ls -l /lib/libc-*.so /lib/libc.so*

    获得用户资源限制:

    ulimit -a

    获得系统安装了那些模块(modules)

    lsmod

    获得X server信息:

    xdpyinfo

    可以发现如下信息:

    • 显示名称:
    • 版本号码 
    • 提供商名称 (such as The XFree86 Project)
    • 提供商发布版本号 
    • XFree86 版本号

    获得Linux CPU信息

    cat /proc/cpuinfo

    获得Linux Memory信息

    cat /proc/meminfo

    OR

    free -m

    OR

    free -g

    获得用户shell名称:

    ps -p $$ | tail -1 | awk '{ print $4 }'

    Dump Linux kernel variables

    /sbin/sysctl -a

    获得正在运行的Linux kernel version:

    uname -mrs
    uname -a
    cat /proc/version

    以字节(mb)形式显示 memory信息以及swap信息:

    free -m

    获得网卡和ip地址信息:

    ifconfig -a
    ifconfig -a|less

    读取Debian/Ubuntu Linux 网络配置文件(如eth0,eth1,...ethN)

    more /etc/network/interfaces

    读取Redhat / CentOS / Fedora Linux 网络配置文件(eth0)

    more  /etc/sysconfig/network-scrīpts/ifcfg-eth0

    Note replace eth1 for 2nd network card and so on.

    显示路由信息

    route -n
    route

    显示所有打开的端口

    netstat -tulpn

    查看登陆日志:

    tail -f /var/log/secure
    vi /var/log/secure
    grep 'something' /var/log/secure

    查看mail server日志

    tail -f /var/log/maillog
    vi /var/log/maillog
    grep 'something' /var/log/maillog

    获得系统运行时间

    uname
    w

    显示谁登陆系统并在做什么

    w
    who

    显示任务信息

    top

    显示所有进程

    ps aux
    ps aux | grep process-name

    显示Redhat / CentOS / Fedora所有安装软件的信息

    rpm -qa
    rpm -qa | grep 'software-name'
    rpm -qa | less

    显示安装在Debian / Ubuntu上的所有软件信息

    dpkg --list
  • hp-WinRunner 百问 二

    2008-10-05 16:26:15

      

        WinRunner使用TSL脚本,主要是类c的语法,wr调用com对象难度比较大,这里利用另类办法调用底层com对象,主要利用wr中file的操作以及dos_system的调用方法,实现,通过这种方法可以加强wr的脚本扩展能力的缺陷。例子如下:

    public function send_outlook_mail(in to, in cc, in bcc, in subject, in body, in attach)
    {
    auto i, scrīpt;

    scrīpt = getvar("exp") & "\\send_outlook_mail.vbs";

    file_open(scrīpt,FO_MODE_WRITE);
    file_printf(scrīpt,"Dim objOutlook\r\n");
    file_printf(scrīpt,"Dim objOutlookMsg\r\n");
    file_printf(scrīpt,"Set ōbjOutlook = CreateObject(\"Outlook.Application\")\r\n");
    file_printf(scrīpt,"Set ōbjOutlookMsg = objOutlook.CreateItem(olMailItem)\r\n");
    file_printf(scrīpt,"objOutlookMsg.To = \"%s\"\r\n", to);
    file_printf(scrīpt,"objOutlookMsg.CC = \"%s\"\r\n", cc);
    file_printf(scrīpt,"objOutlookMsg.BCC = \"%s\"\r\n", bcc);
    file_printf(scrīpt,"objOutlookMsg.Subject = \"%s\"\r\n", subject);
    file_printf(scrīpt,"objOutlookMsg.Body = \"%s\"\r\n", body);
    file_printf(scrīpt,"objOutlookMsg.attachments.add \"%s\"\r\n", attach);
    file_printf(scrīpt,"objOutlookMsg.Send\r\n");
    file_close(scrīpt);
    dos_system("wscrīpt \"" & scrīpt & "\"");
    #dos_system("del \"" & scrīpt & "\"");
    return(E_OK);
    }

    Example:

    send_outlook_mail("pcl@51testing.com.com","","","Daily reports","Winrunner scrīpt to check the status of Daily reports is Completed.Check the results attached.Thanks.",file);

     

  • IIS 站点流量监控方法

    2008-10-04 00:39:01

    1、开始→控制面板-〉管理工具→性能
    2、系统监控器,点工具添加
    2、性能对象,选择 Web Service
    4、“从列表中选择计数器”,选择 Bytes Total/sec ,即每秒字节数。
    5、“从列表中选择实例”,选择要查看的站点,可以按Ctrl键多选,也可以点上面的“所有实例”。
    6、点击“添加”按钮,点击“关闭”按钮。

     

    备注:Web Service:Bytes Total/sec   显示Web服务器发送和接受的总字节数。低数值表明该IIS正在以较低的速度进行数据传输

  • 一个特别的假期

    2008-10-01 23:27:23

     

         假期按道理应该好好休息下,但是老婆公司有个项目启动做性能测试,老婆是一个对工作很负责任的人,由于时间比较紧张,老婆在家加班28日到今天都在开发脚本,性能测试不是简单的利用lr录制回放,需要根据业务流程开发符合用户使用习惯的脚本,老婆每天开发脚本要做到夜里12点多,前一段时间还是我教,现在已经开始独立做了。

        

    附:老婆总结: 

        这里把老婆把工程文件夹建立如下结构:

         Proj_Name
                 -LR_scrīpts
                 -Scenarios
                 -TestDocs
                     -TestPlanAndReport
                     -TestExecution
                     -Recommendations
                 -Reports
                     -LR_Reports
                           -Cycle1
                           -Cycle2
                     -HTML_Reports
                           -Cycle1

         脚本中需要提交时间

         Action()
        {
                 //code

                 lr_save_datetime("Today is  %Y/%m/%d", DATE_NOW, "Today");
                 lr_output_message(lr_eval_string("{Today}"));

                 //code

                 return 0;
         }

        
      

       

  • LoadRunner MySql 自定义监控器开发

    2008-10-01 20:05:34

     

        来深圳3个多月,每天工作都很紧张,好不容易等到十一放假,正好把以前答应朋友和学员提出的问题解答下。记得上次有人问过如何监控MySql,我提供了一种SiteScope和Lr整合的办法,最近在网络上搜索下发现我那篇文章blog网上有很多转载,那么另外一种监控mysql的方法怎么处理呢?

        首先确认mysql需要监控的性能指标,然后确认如何采集这些性能数据。这里我以采集hits值为例子,第一步利用vc开发dll,然后在lr中开发监控器,这里我不是写教程,所以很多细节就不罗嗦了(以下脚本代码在winxp sp2 vc 6.0 lr9.1中调试)

       vc 6.0 dll中的代码:

    // mysql_dll.cpp : Defines the entry point for the DLL application.
    //

    #include "stdafx.h"
    #include "stdlib.h"

    MYSQL *conn=NULL;
    MYSQL_RES *p_res_ptr=NULL;
    MYSQL_ROW sqlrows;


    BOOL APIENTRY DllMain( HANDLE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
          )
    {
        return TRUE;
    }

    extern "C" int _declspec(dllexport) init_mysql_connection(char *str_server,char *str_username,char *str_pwd,char *str_Table)
    {
     conn=mysql_init(NULL);

        if(!conn)
     {
      printf("\nFailed to initate MySQL connection");
      return 1;
      exit(0);
     }
        else
     {
      printf("\nSuccess to initate MySQL connection");
      if (!mysql_real_connect(conn,str_server,str_username,str_pwd,str_Table,0,NULL,0))
      {
       printf( "Failed to connect to MySQL: Error: %s\n", mysql_error(conn));
      }
      else
      {
       printf("\nLogged on to %s sucessfully",str_server);
       return 0;
      }
      return 0;
     }
    }

    extern "C" int _declspec(dllexport) close_mysql_connection()
    {
     if(conn=NULL)
     {
      printf("\nConnection is Null");
      return 1;
      exit(0);
     }
     else
     {
         mysql_free_result(p_res_ptr);
      printf("\nClose connection");
      mysql_close(conn);   
      return 0;
     }
    }

    //"show status like \'qcache%\'"

    extern "C" int _declspec(dllexport) get_mysql_table_query(char *str_query)
    {
     int res=0;
     res=mysql_query(conn,str_query);
     if(res)
     {
      printf("Failed to mysql query: Error: %s\n", mysql_error(conn));
      return 1;
     }
     else
     {
      printf("\nSucess in Mysql Query");
      return 0;

     }

    }

     

    extern "C" int _declspec(dllexport) get_mysql_query_data(char *str_query,char *str_data)
    {
        unsigned long u1_numrow=0;
        unsigned int i_index = 0;
     p_res_ptr=mysql_use_result(conn);

     if(p_res_ptr){
     
      while((sqlrows=mysql_fetch_row(p_res_ptr))){
      
       if(*sqlrows[0]=*str_query)
       {
        strcpy(str_data,sqlrows[1]);
       
        
       }
      }
     }

     return NULL;

    }

     

    lr 9.1中代码:

    Action()
    {

            int i=0; 
            double x;
            char *str_data;
     
     
            str_data=(char *)malloc(20*sizeof(char));
            lr_load_dll("D:\\vc\\mysql_dll\\Debug\\mysql_dll.dll"); 
            i= init_mysql_connection("localhost","root","123456","mysql");
            lr_output_message("%d",i);
        
           for(;;)
           {
                get_mysql_query_data("Qcache_hits",str_data);
                i=get_mysql_table_query("show status like \'qcache%\'");
                lr_output_message("%d",i);
                x = atof(str_data);
                lr_user_data_point("hits",x);
                lr_think_time(5);
           }
            lr_output_message("%d",x);
         close_mysql_connection();
     return 0;
    }
     
       
  • 今天遇到QQ 诈骗

    2008-10-01 16:45:42

     

      今天在家写性能测试脚本,有个朋友跟我聊天,

    ℡风流§狂傲 15:57:54
    有没有开了网银的卡?
    爱用一生 15:58:14
    我这里没有 我老婆有
     
    爱用一生 15:58:16
    需要?

    ℡风流§狂傲 16:00:46
    我想跟你借1000可以吗
    爱用一生 16:03:05
    没有那么多,我老婆的那张卡信用额度只有2000,你要是缺钱,明天我给你汇.
    ℡风流§狂傲 16:03:24
    那现在你老婆的卡在你手上吗
    爱用一生 16:03:33
    我老婆出去了 等会回来
    ℡风流§狂傲 16:03:47
    那你现在能不能去躺银行帮我汇一下?
    爱用一生 16:03:56
    你怎么了 
    ℡风流§狂傲 16:04:09
    我有点事情要用
    爱用一生 16:04:11
    这么着急 等下我给老婆电话 
    爱用一生 16:04:23
    让他回来给你汇
    爱用一生 16:04:29
    你怎么跑去安徽乐
    ℡风流§狂傲 16:05:27
    安徽?
    ℡风流§狂傲 16:08:06
    在吗
    爱用一生 16:08:18
    在呢
    爱用一生 16:08:22
    给老婆电话了
    爱用一生 16:08:29
    等会她回来
    ℡风流§狂傲 16:08:43
    那他回来的时候能去躺银行吗
    爱用一生 16:10:18
    还要跑银行?等会别着急
    ℡风流§狂傲 16:10:30
    哦,她大概什么时候回来
    爱用一生 16:12:12
    回来了 
    爱用一生 16:12:18
    你把帐号给我
    ℡风流§狂傲 16:12:31
    什么帐号?
    爱用一生 16:12:12
    回来了 
    爱用一生 16:12:18
    你把帐号给我
    ℡风流§狂傲 16:12:31
    什么帐号?
    爱用一生 16:12:40
    给你汇款阿
    ℡风流§狂傲 16:12:52
    信用卡也可以汇吗
    爱用一生 16:13:21
    你不给我帐号 怎么给你化帐
    ℡风流§狂傲 16:13:43
    我的卡现在没带。。用我朋友的工商卡可以吗
    爱用一生 16:15:09
    你帐号给我下
    ℡风流§狂傲 16:15:51

    ℡风流§狂傲 16:18:22
    6222 0237 0000 6956 694 蒋健
    ℡风流§狂傲 16:18:27
    工商的

    上面帐号就是骗人的帐号,在中间说老婆回来的时候,我已经让老婆给该qq号码的主人打电话确认了,知道qq号码被盗了。

    到处都是陷阱。

     

  • 北京 上海 深圳 三地感受

    2008-09-28 22:31:21

    由于工作需要,分别在北京上海深圳三地工作生活过,三地给人的感觉各不相同:

    一.人员素质:

    在上海工作的人整体素质比较高,做事细致;深圳电子行业比较发达,虽然也有很多it公司,但是周边基本上是工厂,由于深圳原来是一个小渔村,由于政策的扶持,深圳依靠当年的各路探路者其聚于此发展起来了,所以深圳本身就是一个开发的城市宽容的城市,所以这里对学历要求不是很严格,更多是对能力的要求,这里整体感觉是一个没有归属感的城市;北京处于北方,北方人的性格粗放,做事情事情更多依赖人的关系

    二.公司规模:北京是政治中心,很多大公司的总部为了在国内拿项目一般都会设立在北京,服务于这里的大企业。在北京的很多项目都是全国性,或者是跨国大型项目,比较锻炼人;上海是由于是经济中心,最接近国际化大都市的城市,无论是城市建设、规模、人员素质和教育方面,在国内都是一流的。其硬实力及软实力,让上海成为一个吸盘,不断吸纳国内及国际的人才流入,并且带来新鲜的活力及先进的经验;深圳大多公司是草创性的公司,加班在这里很严重,但是在这个城市有很多成功的企业,如中兴,华为,腾讯,金蝶等等,在这个城市要想由于公司大多是成长性的,所以上升的机会还是比较多的。

    三.生活环境 深圳的服务行业是最发达的,有个朋友大半夜12点多说要吃饭,可以叫外卖送来;上海次之,北京可能是最不好的

    以上是个人感受,不代表大多数人感受 


     

  • 说说房产(转)

    2008-09-27 12:38:52

    转自北京的一个朋友

     

          睡不着,就说说上周末去看房的情况吧。  
          因为有了小孩,房子的事情就迫在眉睫了。本来一直打算租房住的,但是在现实面前不得不重新考虑了。北京的房价涨得厉害是有目共睹的,从自身来说薪水涨的幅度缺赶不上房价的涨幅——这个事情好像也不是我不努力的原因造成的,可能大城市就是压力大吧。
          现在住的地方附近的房子在两三年前如果没有记错的的话应该是6000多每平米,因为房价就标在路片的广告牌上,而至今这里的房子都到了1.2万每平米以上了。如果买这里的房子那就真是跳进火坑,自我献身成了房奴了。好在最近北边地区又有几处新建的楼盘,比如宝盛北里、动街区、紫金新干线、富力桃园,相对来说离上班的地方都不是很远。
          紫金新干线的房子位于霍营城铁站的东北角,直线距离2.3公里,路线距离2.8公里,目前好像仅有一辆公交车经过。我去时是先到另外附近的矩阵小区打车过去的,矩阵正好也有几套顺便去看了看,没想到售楼小姐直接把钥匙给我们并告诉门禁密码让自己去看。由于是第一次看房,真感觉到有些受宠若惊。简单看看了看,房子都是一层的,分别是80,135,153的,只有墙面刷了白灰,地上还处于毛坯状态。感觉上当然是越大越好,不过由于是一楼,跟其他楼层还是有所不同的,尤其是我们最喜欢的落地式的窗户是没有的,可能是由于安全的因素吧,所以感觉上折扣不少。不过相比来说看现房自己心里还比较有底,因为紫金新干线是期房,来年6月才能入住,所以看房也只是看设计图纸,一点都不直观。可恶的是有些户型没有彩页,销售人员复印了一张,让我从背面看,我还一直在纳闷这房子到底怎么建的。由于没有事先预约,所以到售楼处也没有专门的人招呼,也因为是周末办公的人员也不多,所以想了解情况的话得主动找人去问。沙盘摆放的还不错,不过有三栋楼上已经打上“售罄”的牌子,还有四栋楼上打着类似“本次销售”的牌子,也就是只能看这几栋楼了。而且由于是一期,学校,商场之类的都没有。剩余的两居户型都不在理想之列,要么没有阴台,要么就是客厅窗户朝北。房间了还摆放了许多销售进度表,上面粘贴上了红绿标志,也没看明白什么意思,太术语了。问了问大概意思就是贴牌的就是已经有人买了或者已经订了的,所以要想找到心仪的房子还是得在开盘时就去看的。看了相关的户型后找销售人员大概计算了一下首付和月供,选了个近100平米的两居计算了一下,总价在80万左右,首付30几万,月供3800,也可能不是这个数,我只清楚地记得这个了。在我看来70万以下是一档,75万到95万一个档次,后来跟同事聊时被不屑地批了一顿,95-75,差价20万,怎么可能到一个档次,也是啊,好像这个也符合边际效益的规律啊。对于饥饿的人来说,一个馒头的作用大于对富人来说一顿美味到作用。
          接下来是富力桃园,也不是很远,从紫金新干线出来打车10几块钱就到了。不过从紫金出来后我们围着工地边的马路走了一段,但觉还不错,东边一片地种着农作物,往南有个村子-兰各庄,不过路上来往的私家车很多。要不是有人从市内打车来这里,恐怕我们还要继续走下去了。相对来说富力桃园看房的人就比较多了,毕竟有多辆公交在这里都有站。听了售楼小姐的介绍后去看了样板间,的确很不错,让人觉得很满意。这里的方式是精装修,每平米均价1W左右,不过要等两年才能住上,可真是期期房了。最近那栋楼离城铁130多米,可是没有站正在思考。由于时间还早就又去看看了户型较大的——也真够大的,记得是200平米以上,四室两厅两卫,还有储藏间,厨房也很大,卫生间也格外大,样板间装修的很豪华,至少比我至今住过的旅馆、酒店都要豪华些,不过也就是让人看着很舒服,自己看房可不能被这些假象给迷惑了。
          好了不早了,2点24分了。第一次看房就这么结束了,毕竟不像买衣服鞋子之类的看中就买,还有些其他情况需要考虑的。本来不想在这些事情上操心的,不过这是我们这类北漂的人不可避免的问题,即使这样接下来还要考虑装修等等的问题,这都是后话。不过感觉搞这些东西挺累的,或许一辈子就买一次房,或许就只装修一次,就是多耗费些时间和精力,如果感兴趣还是可以掺和掺和的。
          这里没过多的讨论房价,我觉得这个问题不是可以放这里探讨的。毕竟每个人都情况不一样,而且自己是什么情况,看了房子后我也在重新估量。到这里想起一个故事来印证我此刻的心情,由一句话相信你就知道了“长安米贵,白居不易”。
  • 经济危机影响你我

    2008-09-25 19:48:01

     

           昨天一个认识4-5年的朋友过来找我,这个朋友从事测试工作5年多,为人朴实,具有有东北人的豪迈,他找我是刚从公司离职,因为雷曼银行破产导致他们公司解散,他也因此离开了公司。记得前两个月我来深圳,他还告诉我他们公司计划今年从100人发展到1000人,没想到因为雷曼银行的倒闭而使他们也受到牵连。前一段时间另外一个哥们,也由于受到雷曼倒闭的影响,没有进入到ibm(测试经理的职位薪水2w5左右),

        由于美国受到次贷危机影响,政府7000亿美金救市,全球一体化很高这样必然涉及到其他国家,中国持有美国大量国债,大约5000多亿,美国所谓救市,就是用美国国债做担保。一旦国债出问题,中国这些钱就找不到了,中国的经济就受到很大的影响,业务项目萎缩,紧接着就是就业企业倒闭,大家找工作变得困难。

  • 读取LoadRunner Analysis信息

    2008-09-25 13:11:14

    Dim Conn

    Dim Rst

    set Conn=CreateObject("Adodb.Connection")
    Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=xxxx\analysis.mdb"
    Set Rst=CreateObject("Adodb.RecordSet")

    Rst.Open "Select * from Result",Conn

    Do while not Rst.EOF:
      scenario  = Rst.Fields("Scenario Name").Value
      name      = Rst.Fields("Result Name").Value
      tz        = Rst.Fields("Time Zone").Value / 3600
      startTime = Rst.Fields("Start Time").Value
      endTime   = Rst.Fields("Result End Time").Value
      Rst.MoveNext

    Loop


    Wscrīpt.Echo " "
    Wscrīpt.Echo "  Scenario: %s " % scenario
    Wscrīpt.Echo "    Run ID: %s " % name
    Wscrīpt.Echo "        TZ: %s " % tz
    Wscrīpt.Echo "Start Time: %s " % time.asctime(time.localtime(startTime))
    Wscrīpt.Echo "  End Time: %s " % time.asctime(time.localtime(endTime))

  • SilkTest 脚本代码实例赏析

    2008-09-25 09:26:56

    获得对象中所有的子对象?

    public LIST OF WINDOW GetChildObjects(Window wContainer, DATACLASS dcObject)
        [ ] // To get All child objects.
        [ ] // Used recursive method.
        [ ] LIST OF WINDOW lwndObjects, lwTemp1, lwTemp2
        [ ] LIST OF WINDOW lwndChildren = {...}
        [ ] WINDOW wParent, wChild, wTemp
        [ ]
        [-] do
            [-] if (wContainer.Exists (10))
                [ ] lwndChildren = wContainer.GetChildren (TRUE, FALSE)
                [ ]
                [-] for each wChild in lwndChildren
                    [-] if wChild.IsOfClass(dcObject)
                        [ ] ListAppend (lwndObjects,wChild)
                    [-] else
                        [ ] lwTemp1 = wChild.GetChildren(TRUE, FALSE)
                        [-] if (ListCount(lwTemp1) > 1)
                            [ ] lwTemp2 = GetChildObjects(wChild,dcObject)
         //To get particular objects
                            [-] if (ListCount(lwTemp2) > 0)
                                [ ] ListMerge (lwndObjects, lwTemp2)
            [-] else
                [ ] Print ("Container {[STRING]wContainer} is not available.")
        [+] except
            [ ] ExceptLog ()
        [ ]
        [ ] return lwndChildren

    获得ip地址?

    [+] public String GetIpAddress(String sMachineName)
        [ ] //To get IP Address for the particular machine in Network
        [ ] List of String lsOutput
        [ ] String sCommand
        [ ] String sTemp, sItem
        [ ] String sResult = NULL
        [ ] Boolean bResult = FALSE
        [ ] Integer iPos1, iPos2
        [ ]
        [ ] sCommand = "ping -a {sMachineName}"
        [ ] Sys_Execute (sCommand,lsOutput)
        [ ]
        [ ] //ListPrint (lsOutput)
        [-] for each sItem in lsOutput
            [-] if (MatchStr("*pinging*", sItem))
                [ ] bResult = TRUE
                [ ] break
            [ ]
        [-] if (bResult)
            [ ] iPos1 = StrPos ("[", sItem)
            [ ] iPos2 = StrPos ("]", sItem)
            [-] if ((iPos1 > 0) && (iPos2 > 0))
                [ ] sResult = SubStr(sItem,iPos1+1, iPos2-iPos1-1)
                [ ] Print ("Found IP Address: {sResult}")
        [ ] return sResult

     

    获得子文件夹?

    [ ]
    [+] LIST OF STRING GetDirectories (STRING sDirPath)
    [ ]
    [ ] LIST OF FILEINFO lfFiles
    [ ] FILEINFO file
    [ ] LIST OF STRING lsDirsFound = {...}
    [ ]
    [ ]
    [-] if ! SYS_DirExists ( sDirPath )
    [ ] LogWarning ( "Cannot find '{sDirPath}' on file system" )
    [ ]
    [ ] lfFiles = SYS_GetDirContents (sDirPath)
    [ ]
    [-] for each file in lfFiles
    [-] if (file.bIsDir)
    [ ] ListAppend (lsDirsFound, sDirPath + "\" + file.sName)
    [ ]
    [ ] ListSort (lsDirsFound)
    [ ]
    [ ] return lsDirsFound


     

  • 纪录51Testing成长历程与我

    2008-09-22 14:16:58


    2004年2月, 51Testing在上海慧谷创业中心成立;
    2004年4月, 51Testing举办首期软件测试沙龙活动;
    2004年5月, 51testing网站正式运营;

          2004年5月11日 我注册51testing论坛会员


    2004年5月, 51testing首次为客户提供企业内训服务;

          2004年8月26日乘火车27日早到上海,成为51testing历史上的第五位员工,员工代码005


    2004年8月, 51Testing率先在国内举办软件测试就业培训;

          2004年11月 给51testing上海第一期就业培训班培训


    2005年5月, 51Testing成为Mercury公司国内唯一培训认证合作伙伴;

          2005年2月份 考mercury LoadRunner cpc认证,由于本人获得认证,使51testing和merucry认证合作成为可能,使mercury认证得以在国内普及(价格降低以及考试地点增多)


    2005年12月,51Testing首次为客户提供软件测试工具服务;

          2005年11月  开始做工具实施,提供客户性能测试服务

     


    2006年3月, 51Testing首次为客户提供软件测试外包服务;
    2006年10月,51Testing人民广场分中心成立;
    2006年10月,51Testing成立控股子公司,专注于为客户提供软件测试工具代理、咨询、实施以及外包业务;        
    2007年1月, 51Testing北京子公司在北京中关村成立;

          2006年12月 到北京,筹建北京51testing,2007年1月成立北京51testing分公司,任负责人。


    2007年11月,51Testing举办首届软件测试经理人沙龙;

          2007年 在北京策划测试经理人沙龙,并成功举办 


    2007年11月,51Testing发起软件测试巡回沙龙;
    2007年12月,51Testing推出软件测试周末精品班服务;
    2008年3月, 51Testing成功举办“中国首届软件测试专场招聘会”;

          2008年1月 由北京公司小韩提议,在北京51testing组织和推动下,成功举办中国软件行业历史上第一次软件测试现场招聘会,并于举办当天晚上庆功会上喝醉

    2008年5月, 51Testing推出高校合作计划;

          2008年5月 在北京组织举办51testing第一次高校教师培训

    2008年5月, 51Testing总部迁址至上海人民广场商圈;
    2008年5月, 51Testing深圳子公司在深圳华强北成立;

     

          2008年6月到深圳,开始主持深圳公司日常工作 


    2008年7月, 51Testing软件测试系列丛书开始发行;

          2006年  策划和推动51testing图书的出版,后由于其他事情工作交接。   


    2008年7月, 51Testing论坛会员数突破20万。

  • hp - WinRunner 百问 一

    2008-09-21 14:03:34

    How to Close all Browsers that were opened before WinRunner?

    1.The close_browsers function will close browsers that were opened
    before WinRunner
    function close_browsers()
    {
       auto count, count2;
       count = 0;
       while (win_exists("{class: window,MSW_class:browser_main_window,location:" & count & "}")==0)
          count++;
       for (count2 = 0; count2 < count; count2++)
          win_close("{class: window,MSW_class:browser_main_window,location:"0"}"); 
       # close IE-spawned browser windows
       count = 0;
       while (win_exists("{class: window,MSW_class: IEFrame,location:" &
    count & "}")==0)
          count++;
       for (count2 = 0; count2 < count; count2++)
          win_close("{class: window,MSW_class: IEFrame,location:"0"}");

       # close browsers open before WinRunner

       set_class_map("mic_unknown_class", "window");
       set_record_attr("mic_unknown_class", "class", "MSW_class",
    "location");
       set_record_method("mic_unknown_class", RM_RECORD); 
       count = 0;
       while (win_exists("{class: window,MSW_class:
    mic_unknown_class,location: " & count & "}")==0)
          count++;
       for (count2 = 0; count2 < count; count2++)
          win_close("{class: window,MSW_class: mic_unknown_class,location:" & count & "}");
    }

    2. This version of the function may execute a little faster when using
    Netscape:

    public function close_all_browsers()
    {
        auto desc = "{class: window,MSW_class:
    browser_main_window,NSTitle: \"Browser Main
    Window\",location:",x,y,done;
        auto desc2 = "{class: window,label: \"!.*Microsoft Internet
    Explorer\",MSW_class: IEFrame,location:";
        auto val = 50; # this line acutally sets the number of browser
    windows to close
        x = val;
        done=0;
        while(x >= 0)
        {
            y = desc&x--&"}";
            if(E_OK == win_exists(y))
            {
                win_activate(y);
                win_close(y);
            }
        }
        x = val;
        while(x>=0)
        {
            y = desc2&x--&"}";
            if(E_OK == win_exists(y))
            {
               win_activate(y);
                win_close(y);
            }
        }
        return E_OK;
    }

    3. You can use the undocumented _web_browser_close function to close
    all browsers that were opened after WinRunner. Using empty quotes ""
    will close all browsers opened after WinRunner. To close a specific
    browser, pass the logical name of the browser to the function.

    _web_browser_close("");

    EXAMPLE:
    # Close all open browser windows:
    _web_browser_close("");

    Here is a function which uses _web_browser_close to close the browsers
    opened after WinRunner and will also close the browsers opened before
    WinRunner.

    public function close_all_browsers2()
    {

        # close browser opened after WinRunner
        _web_browser_close("");

        # close browsers open before WinRunner
        set_class_map("mic_unknown_class", "window");
        set_record_attr("mic_unknown_class", "class", "MSW_class",
    "location");
        set_record_method("mic_unknown_class", RM_RECORD);

        while (win_exists("{class: window, MSW_class: mic_unknown_class,
    location: 0}") == E_OK)
        {
           win_activate("{class: window, MSW_class: mic_unknown_class,
    location: 0}");
           win_close("{class: window, MSW_class: mic_unknown_class,
    location: 0}");
        }

    }

    4. If the functions above have problems closing browsers opened before
    WinRunner, you can try using the following code in one of the
    functions. This code checks the items in the Shell Tray (the toolbar
    at the bottom that lists the running applications) and selects the
    ones that correspond with the browsers. This should bring the browser
    to the foreground, at which point the type function can be used to
    press Alt-F4 in order to close the window. This should work on Windows
    95, 98, NT 4.0, and 2000. This will not work on Windows XP in its
    current form, due to the way that Windows XP represents the items in
    the Shell Tray as a toolbar, rather than a tab control. Similar
    functionality should work, however, for Windows XP using toolbar
    functions, instead of tab functions.

    set_window("Shell_TrayWnd", 3);
    tab_get_info("tab", "count", count);
    for(i = count-1; i > 0; --i)
    {
        tab_get_item("tab", i, item);
        if(match(item, ".*Microsoft Internet Explorer") > 0 || match(item,
    ".*Netscape") > 0)
        {
           tab_select_item("tab", "#" & i);
           wait(1);
           type("<kAlt_L-kF4>");
           wait(1);
        }

    }

  • 遗憾

    2008-09-21 11:59:38

          

          自从2000年开始触网,就与网络结下了不解之缘,从此生活,工作,感情都围绕着网络转。2004年初开始进入江湖(测试论坛),只要在江湖上混的人都给自己起了一个很响亮的名字,比如51testing上的司空公子、影子杀手,杨柳青风上的牛魔王、涅磐,中国测试社区中的冬天的云等等。

          江湖说大不大说小不小,大家通过别人的事迹(帖子 帮助别人的帖子),互相佩服而认识,在这里我认识了很多人认识了朋友jackei,sincky等,认识了老板bwf,也认识了爱人我的老婆。2004年因为我自己写的一篇文章认识了oldsidney(台湾人),当时他在merucry代理商的公司工作,还记得走的时候,我还帮他找过关系希望可以帮他进merucury,最后由于mercury香港公司和渠道商关系的问题,没有成,后来他去了另外一家公司。这些年由于大家工作忙也很少在网上交流,虽然没有说但是大家都认为对方是朋友,记得他生孩子把自己老婆和孩子的照片都放在网站上,看到他幸福的家庭都有点妒嫉了,呵呵。上周五他在msn上告诉我22日要到上海,以前一直希望能有个见面的机会,但这次他出差上海只有一天,而且时间很紧,而我人在深圳,也没办法赶回去,后来他从台湾打过来电话,聊了半天,看来一个多年的朋友就没有办法见到了。

          希望下次有机会可以再见

  • LoadRunner 试题 你能打多少分 题目第一部分

    2008-09-18 21:54:46

    22.  Standard monitors do not require any separate licenses. Select the three standard monitors available in LoadRunner. Choose THREE. (3 points)

     

       Apache

       Netscape

       IIS

       Oracle

       Unix

       SNMP

       Windows Resources

     

    21.  Which of the following measurements are monitored by LoadRunners Web server monitors?

     

       Throughput

       CPU usage

       Cache hits

       Page faults

     

    20.  A LoadRunner ______________________ measures the performance of the server by measuring the time it takes for the server to respond to specified Vuser requests. (1 point)

     

       Checkpoint

       Thinktime

       Transaction

       Server monitor

     

    19.  For which of the following requirements would you select a Goal-Oriented Scenario? Choose TWO. (2 points)

     

       Be able to change the number of Vusers during the load test.

       Run the load test with the objective of validating response time.

       The Controller schedules and runs Vusers on its own.

       The load test expert has the ability to control how many Vusers run.

     

    18.  A scenario can contain several sets of Vusers to represent different user profiles and emulate real users interacting with the application. These sets of Vusers are called the ______________________________. (1 point)

     

       Vuser group

       Test set

       Scenario set

       Test run group

     

    17.  Which of the following statements is TRUE for the web_submit_form statement? (1 point)

     

       Playback minimizes hardware resource demands because parts of an HTTP request are cached.

       Action tag and values are not hard-coded; they are retrieved from memory.

       You can easily use WDiff to compare captured dynamic values to debug the scrīpt.

     

    16.  You can add Vuser scrīpts and load generators from: (1 point)

     

       The Controller

       The Remote Agent

       The Virtual User Generator

       Analysis

       The Tuning Console

     

    15.  Complete the statement:

    To validate that the hardware to be used for the test environment is sufficient to meet the performance tests, a ____________________ is performed using a small number of business processes and users. (1 point)

     

     

       production run

       benchmark run

       aggregation run

       run for tuning

     

    12.  The Controller is installed on which platform? (1 point)

     

       UNIX

       Windows

       Apache

       JBoss

     

    11.  While setting up the test environment, you are running into problems connecting a load generator to the Controller which indicates the status of the agent as Down. What are THREE ways to check the connection between the Controller and the load generator? (3 points)

     

       Ping the load generator.

       Run the command line: Kill -9.

       Confirm agentservice is active and listed.

       Uninstall and re-install the load generator.

       Check firewall access.

       Turn the service agent to process.

     

     

    8.  One of your customers requirements is that their web site can handle 25,000 users at any time, logged in and performing different transactions. Part of your information gathering is to determine concurrency. What level of concurrency represents the customers requirement? (1 point)

     

       Application

       Business

       Transaction

     

    7.  Which of the following statements reflect best practice on managing the test environment? (1 point)

     

       A test environment is a subfolder under the production environment.

       A test environment is rebooted during test runs without affecting the production environment.

       A test environment uses live data from the production environment.

       A test environment is a controlled environment that should not mirror the production environment.

     

     

    6.  What information about a web site under test is important to collect if you are planning to consider network latency and packet loss in your load test? (1 point)

     

       Task distribution diagram C

       Peak load

       Transactional concurrency

       Customer geography

     

    5.  What type of information will you need to gather to determine how business processes affect different components in the system architecture? This is especially useful during the load test; it can help isolate the source of bottlenecks. (1 point)

     

       Task Distribution Diagram

       System Monitoring

       Transcontinental Remote Users

       Business Process Mapping

     

    2.  Select the three criteria by which you will identify the business processes (BPs) to use for a performance test. (3 points)

     

       Passed unit testing

       Mission-critical BPs

       Uses unique data

       Returns dynamic data

       Heavy throughput

       Include all BPs

       Affects legacy systems

     

    1.  Which of the following statements is considered best practice for setting up the test environment? (1 point)

     

       The test environment uses the production database but not the production system.

       The test environment selects functional components of the application under test.

       The test environment undergoes benchmark testing.

       The test environment can be a folder within the production environment.

  • LoadRunner 试题 你能打多少分 题目第二部分

    2008-09-18 21:49:36

    49.  What conclusion can you draw for File Data Operations? (1 point)

     

       Processor queue and file data operations correlate and show that the system is backlogged.

       Rising CPU and file data operations indicate the system is backlogged.

       Processor queue and file data operations are in contrast and the system is not backlogged.

       Rising CPU and file data operations correlate to show the system is well tuned for I/O operations.

    48.  To determine if the network had issues with increasing traffic (or number of Vusers) during the load test, what merging graphs will you use to make this determination? Choose Two. (2 points)

     

       Running Vusers with Transaction Response Time

       Running Vusers with Hits per Second

       Running Vusers with Throughput

       Running Vusers with Transaction Peformance Summary

     

    47.  What do the readings for processor queue length indicate? (1 point)

     

       Processor queue length is average; the system is processing on acceptable levels.

       Processor queue length is above normal and indicates system congestion.

       Processor queue length is below normal and indicates too little hardware is utilized by the system.

     

    46.  What was the average CPU utilization (in percentage)? (2 points)

     

    Note: Your answer should be in whole integers only. Decimals are not allowed.        

     

    45.  If you want to show the correlated values (for automatic correlations) only for the current step in your scrīpt, what feature will you use? 

     

       Scan scrīpt for correlations

       Show Differences In

       Show only differences that appear in scrīpt

       Show Scan for correlations popup after replay

     

    44.  Which utility do you use to identify dynamic values in a recorded scrīpt by comparing two scrīpts of similar recorded steps and data for correlation? 

     

       Automatic correlation

       Correlation by recording

       Compare with Vuser

       Scan

     

    43.  Which of the following functions adds a checkpoint in your scrīpt? Choose TWO. (2 points)

     

       web_reg_find ( );

       web_reg_save_param ( );

       web_reg_add_cookie ( );

       win_get_text ( );

       obj_get_text ( );

     

    42.  What is the correct syntax to initialize a variable in VuGen?

     

       int var1,

       int var1;

       int var1=2;

       int var1==2;

     

    40.  If the load test objectives were to evaluate transaction response times and monitor server resources, which types of monitors would best meet these objectives? Choose TWO. (2 points)

     

       Running Vusers

       Transaction Response Time

       Total Trans/Sec

       Hits per Second

       Throughput

       Windows Resources

       Apache

     

    39.  What setting will you use so that all Vusers are initialized before starting the scenario? (1 point)

     

       Reset

       Run/Stop Vusers

       Initialize Vusers before run

       Load all Vusers simultaneously

     

    38.  An application has an actual peak load value of 150 users. If you are creating an Overload scenario that comprises 120% of the actual peak load value, how many Vusers will you run? (3 points)          

     

    37.  Which feature allows you to configure the ramp up, ramp down, and duration options during a load test? (1 point)

     

       Schedule builder

       Design tab

       Edit Schedule

       Run tab

     

    36.  What setting will you configure to add the machines whose resources you want to monitor?

     

       Under Tools > Options

       Under Add Measurements…

       Under Freeze

       Under Configure…

     

    35.  Thinktimes are included in the Vuser scrīpt you are debugging. Since this is not yet a load test, you want to reduce the thinktime values to only a portion of the original recorded values. Which thinktime settings can you use to meet this requirement? Choose TWO. (2 points)

     

       As recorded

       Multiply thinktime by

       Use random percentage of recorded thinktime

       Limit thinktime to x number of seconds (where x is 1)

     

     

    34.  Dynamic data that you may need to correlate can best be investigated using which logging feature? (1 point)

     

       Send messages only when an error occurs

       Standard log

       Parameter substitution

       Data returned by the server

       Advanced trace

     

    33.  One of the requirements for a Vuser scrīpt is to include dynamic values in the execution log. What LoadRunner feature will you use to include dynamic values in the execution log without modifying the scrīpt? (1 point)

     

       lr_output_message

       Extended log

       Web_reg_find

       Advanced log

     

    32.  Match the scenario type with the action being described. (4 points) 选ABCD

     

      This scenario run shows the responsiveness of a site under low stress and helps you validate business process functions for concurrent usage with data being used in the test. ()

    This scenario applies the entire load through slow ramp up. The scenario is repeated until any bottlenecks found are investigated and corrected for optimum system performance. ()

    This scenario allows you to see the final limits of the system and helps determine a safety factor for your system.()

    ABCD This scenario is run to help you isolate the slowest transactions and helps you identify any system bottlenecks on major problem areas. ()

     A. Debug

    B. TopTime

    C. Full Load

    D. Scalability

     

    30.  What setting would you configure to view the execution log that includes parameter substitution, data returned by the server, and advanced trace? (1 point)

     

       Send messages only on error

       Advanced automatic log

       Standard log

       Extended log

     

    29.  To control the time between iterations in a Vuser, you will need to configure which run-time feature? 

     

       Run Logic

       Pacing

       Think Time

       Network Speed

     

    28.  Which TWO statements represent best practice when selecting monitor measurements during an initial load test? (2 points)

     

       Add specific monitors to allow backend experts to confirm their diagnosis of the system under test.

       Add default monitors to get a broad spectrum of how the system is behaving under load.

       Add specific monitors to help you target suspected problems in specific servers or components.

       Add default monitors to help you isolate potential bottlenecks during the load test.

     

    27.  Which Run-Time Setting ensures that when a scrīpt is played back, there is caching in the browser, and each iteration simulates a new user? (1 point)

     

       Additional attributes

       Browser emulation

       Miscellaneous

       Preferences

       Advanced options

     

     

    26.  What setting do you use to meet the requirement that the recording option for the scrīpt type be set to A scrīpt describing user actions. (1 point)

     

       URL-based scrīpt

       URL advanced

       HTML-based scrīpt

       HTML advanced

     

    25.  You want a Vuser scrīpt to capture a screenshot in case an error occurs during playback. Which setting will you configure to capture these errors? (1 point)

     

       Continue on error

       Fail open transactions on lr_error_message

       Generate snapshot on error

       Save snapshot resources locally

     

    24.  Which of the following statements follows the rendezvous definition policy? (1 point)

     

       Transaction times and rendezvous can be referenced at the same time.

       Fifty percent of users arrive between eight and nine in the morning.

       A rendezvous presents a separation of points in a business process.

     

    23.  You modified your Vuser scrīpts run time settings before running a new scenario. What feature in the Controller will you use to reflect the new run-time settings in the Controller? (1 point)

     

       Refresh

       Update

       Renew

       Reset

     

  • 什么文件组成了虚拟机(vm) (转)

    2008-09-17 16:41:03

    虚拟机在我们测试项目中经常用来搭建测试环境,所以

    一个虚拟机一般以一系列文件的形式储存在宿主机中,这些文件一般在由Workstation为虚拟机所创建的那个目录中。
    这里列出了这些关键文件的扩展名。在这些例子中,<vmname>表示你的虚拟机名字。
    (举例格式)
    扩展名
    文件名
    描述
    .log 
    <vm name>.log or vmware.log
    这个文件记录了VMware Workstation对虚拟机调节运行的情况。当你碰到问题时,这些文件对我们做出故障诊断非常有用。这个文件和虚拟机的配置文件(.vmx)储存在一个目录里面。
    .nvram 
    <vm name>.nvram or nvram
    这是一个储存虚拟机BIOS状态信息的文件。
    .vmdk 
    <vmname>.vmdk 
    这是一个虚拟磁盘文件,它储存了虚拟机硬盘驱动器里的内容。
    一台虚拟机可以由一个或几个虚拟磁盘文件组成。如果你已经特别指定了虚拟磁盘每2GB为一单独文件的话,虚拟磁盘的大小就决定了虚拟磁盘文件的数量。随着数据写入虚拟磁盘,虚拟磁盘文件将变大,直到这些文件为2GB。(如果你在创建虚拟磁盘时已经把所有的空间都分配了,那么这些文件将在初始时就具有最大尺寸并且不再变大了)。几乎所有的虚拟磁盘文件内容关于虚拟机里的磁盘数据,仅仅一小部分是虚拟机的分区信息。
    如果虚拟机是直接与物理硬盘所连接而不是虚拟磁盘的话,虚拟磁盘文件则保存着虚拟机能够访问的分区信息。
    早期版本的VMware产品用.dsk扩展名来表示虚拟磁盘文件。
    <disk name>-<###>.vmdk 
    这是一个再次命名文件,当虚拟机有一个或多个快照时,就会自动创建它。当虚拟机运行时,这个文件就用来储存对虚拟磁盘作更改的内容。可能这样的文件有多个。虚拟机通过加###这种文件名不重复出现的后缀的命名方式以避免文件重名。
    .vmem 
    <uuid>.vmem 
    虚拟机页面文件,它用来备份客户机保存在宿主机上主内存信息。这个文件只有在虚拟机运行时或崩溃后存在。
    <snapshot name and number> 
    每个虚拟机运行时所建立的快照对应一个.vmem文件,它包含了客户机的驻内存信息,它是快照的一部分。
    .vmsd 
    <vm name>.vmsd 
    这是一个集中储存了快照的相关信息和元数据的文件。在它的目录中,可能其它一些文件只有在虚拟机运行时才存在。(而它不会消失)
    .vmsn 
    <vmname>-Snapshot.vmsn 
    这是一个快照状态信息文件,它记录了你在建立快照时虚拟机的状态信息
    <vmname>-Snapshot<###>.vmsn 
    这也是储存快照状态信息的文件。
    .vmss 
    <vmname>.vmss 
    这是一个储存虚拟机挂起状态信息的文件。一些早期版本的VM产品用.std来表示这个文件。
    .vmtm 
    <vmname>.vmtm 
    这是含有虚拟机组资料的配置文件。
    .vmx 
    <vmname>.vmx 
    这是一个初始的配置文件,它储存着创建虚拟机向导或虚拟机编辑器对虚拟机的一些设置。如果你用的是Linux下的VM虚拟机,这个文件的扩展名将是.cfg。
    .vmxf 
    <vmname>.vmxf 
    这个文件是虚拟机组中补充的配置文件。注意当虚拟机组被移除后,这个文件将保留下来。

    目录中的一些文件仅仅在虚拟机运行时才存在。
  • Winrunner_Robot_数据驱动脚本代码

    2008-09-17 13:04:56

    WinRunner
    读取文件没有循环:
    # Flight Reservation
    win_activate ("Flight Reservation");
    set_window ("Flight Reservation", 5);
    file_open("C:\\Win_execirses\\Dat2.txt",FO_MODE_READ);
    file_getline("C:\\Win_execirses\\Dat2.txt",line);
    split(line,array,";");

    obj_type ("MSMaskWndClass",array[1]);
    list_select_item ("Fly From:",array[2]);  # Item Number 0;
    list_select_item ("Fly To:", array[3]);  # Item Number 0;
    obj_mouse_click ("FLIGHT", 32, 45, LEFT);

    # Flights Table
    set_window ("Flights Table", 2);
    button_press ("OK");

    # Flight Reservation
    set_window ("Flight Reservation", 8);
    edit_set ("Name:", array[4]);
    button_set ("First", ON);
    button_press ("Insert Order");
    set_window ("Flight Reservation", 8);
    obj_mouse_click ("Button", 7, 13, LEFT);

    #obj_mouse_click ("Button_4", 12, 11, LEFT);
    file_close("C:\\Win_execirses\\Dat2.txt");


    优化上面脚本,带有循环驱动:
    # Flight Reservation
    win_activate ("Flight Reservation");
    set_window ("Flight Reservation", 5);
    file_open("C:\\Win_execirses\\Dat2.txt",FO_MODE_READ);
    while(file_getline("C:\\Win_execirses\\dat2.txt",line)==0)
    {
    # file_getline("C:\\Win_execirses\\Dat2.txt",line);
    split(line,array,";");


    obj_type ("MSMaskWndClass",array[1]);
    list_select_item ("Fly From:",array[2]);  # Item Number 0;
    list_select_item ("Fly To:", array[3]);  # Item Number 0;
    obj_mouse_click ("FLIGHT", 32, 45, LEFT);
    # Flights Table
    set_window ("Flights Table", 2);
    button_press ("OK");
    # Flight Reservation
    set_window ("Flight Reservation", 8);
    edit_set ("Name:", array[4]);
    button_set ("First", ON);
    edit_set ("Tickets:", array[5]);
    button_press ("Insert Order");
    set_window ("Flight Reservation", 8);
    # Flight Reservation
    set_window ("Flight Reservation", 4);
    obj_mouse_click ("Button", 18, 10, LEFT);
    # obj_mouse_click ("Button_4", 12, 11, LEFT);
    }
    file_close("C:\\Win_execirses\\Dat2.txt");


    Rational Robot脚本:
    数据驱动脚本-数据池技术:
    '$include "SQAutil.sbh"
    Sub Main
        Dim dp_Result As Integer
        dim dp_id as long
        'dim dp_result as string
        dim dp_Date as string
        dim dp_Flyfrom as string
        dim dp_Flyto as string
        dim dp_Name as string
        
        
        dp_id = SQAdatapoolopen("datapooltest1",FALSE, SQA_DP_SEQUENTIAL,FALSE)
        
        dp_result = SQAdatapoolfetch (dp_id)    
        Window SetContext, "Caption=Flight Reservation", ""
        dp_result = SQAdatapoolvalue (dp_id,1,dp_Date)
        InputKeys dp_Date
        ComboBox Click, "ObjectIndex=1", "Coords=120,13"
        dp_Result=SQADatapoolvalue(dp_id,2,dp_Flyfrom)
        ComboListBox Click, "ObjectIndex=1", "Text="&dp_Flyfrom
        ComboBox Click, "ObjectIndex=2", "Coords=117,8"
        dp_result=SQADatapoolvalue(dp_id,3,dp_Flyto)    
        ComboListBox Click, "ObjectIndex=2", "Text="&dp_Flyto
        PushButton Click, "Text=FLIGHT" 
        Window SetContext, "Caption=Flights Table", ""
        'ListBox Click, "ObjectIndex=1", "Text=16877   LAX   08:00 AM   LON   08:45 AM   SR     $162.30;Coords=272,23"
        PushButton Click, "Text=OK"
        
        Window SetContext, "Caption=Flight Reservation", ""
        dp_result = SQAdatapoolvalue (dp_id,4,dp_Name)
        InputKeys dp_Name
        PushButton Click, "Text=Insert Order"
        PushButton Click, "ObjectIndex=9"
      
        dp_result=SQADatapoolClose (dp_id)

    End Sub


    数据驱动脚本-数据池技术 优化版本:

    '$include "SQAutil.sbh"
    Sub Main
        Dim dp_Result As Integer
        dim dp_id as long
        'dim dp_result as string
        dim dp_Date as string
        dim dp_Flyfrom as string
        dim dp_Flyto as string
        dim dp_Name as string
        dim i as integer  
        
        dp_id = SQAdatapoolopen("datapooltest1",FALSE, SQA_DP_SEQUENTIAL,FALSE)    
        for i = 1 to 3
        dp_result = SQAdatapoolfetch (dp_id)    
        Window SetContext, "Caption=Flight Reservation", ""
        dp_result = SQAdatapoolvalue (dp_id,1,dp_Date)
        InputKeys dp_Date
        ComboBox Click, "ObjectIndex=1", "Coords=120,13"
        dp_Result=SQADatapoolvalue(dp_id,2,dp_Flyfrom)
        ComboListBox Click, "ObjectIndex=1", "Text="&dp_Flyfrom
        ComboBox Click, "ObjectIndex=2", "Coords=117,8"
        dp_result=SQADatapoolvalue(dp_id,3,dp_Flyto)
        
        ComboListBox Click, "ObjectIndex=2", "Text="&dp_Flyto
        PushButton Click, "Text=FLIGHT"
        
        Window SetContext, "Caption=Flights Table", ""
        'ListBox Click, "ObjectIndex=1", "Text=16877   LAX   08:00 AM   LON   08:45 AM   SR     $162.30;Coords=272,23"
        PushButton Click, "Text=OK"
        Window SetContext, "Caption=Flight Reservation", ""
        dp_result = SQAdatapoolvalue (dp_id,4,dp_Name)
        InputKeys dp_Name
        PushButton Click, "Text=Insert Order"
        PushButton Click, "ObjectIndex=9"
        next i
        dp_result=SQADatapoolClose (dp_id)

    End Sub


    数据驱动 - 文件技术:
    Sub Main
    Dim date1 as string
    Dim flyfrom as string
    Dim flyto as string
    Dim name1 as string
    Dim file as string

    file="C:\Rational_files\datafile1.txt"
    open file for input access read as #1
    while not eof(1)
    Input #1, date1,flyfrom,flyto,name1 
        Window SetContext, "Caption=Flight Reservation", ""
        InputKeys date1
        ComboBox Click, "ObjectIndex=1", "Coords=108,15"
        ComboListBox Click, "ObjectIndex=1", "Text="&flyfrom
        ComboBox Click, "ObjectIndex=2", "Coords=118,11"
        ComboListBox Click, "ObjectIndex=2", "Text="&flyto
        PushButton Click, "Text=FLIGHT"
        Window SetContext, "Caption=Flights Table", ""
        PushButton Click, "Text=OK"    
        Window SetContext, "Caption=Flight Reservation", ""
        InputKeys name1
        PushButton Click, "Text=Insert Order"
        PushButton Click, "ObjectIndex=9"
        wend
        close #1
    End Sub

  • HP 测试工具的支持环境

    2008-09-14 19:17:04

       到今天,hp性能测试工具LoadRunner已经支持多达60种协议,qtp提供25种插件环境,并且其他厂商提供了扩展插件2种,另外hp合作伙伴在测试管理工具qc基础上集成了13种插件,hp测试软件功能越来越强大同时软件包也变得越来越大

    HP LoadRunner Protocols:
    Action Message Format(AMF O)
    c#.Net Template(Visual Studio add-in)
    C++.net Template(Visual Studio add-in)
    Citrix_ICA
    COM/DCOM
    CORBA-Java(tm)
    C vuser
    DB2 CLI
    Domain Name Resolution(DNR)
    Enterprise Java Protocol
    HP WinRunner Software
    HP QuickTestProfessional Software
    i-mode
    internet messaging(imap)
    jacada
    java Vuser
    Javascrīpt Vuser
    Lightweight Director Access Protocol(LDAP)
    MediaPlayer(mms)
    MQSeries-Client
    MQSeries-Server
    MS Exchange(MAPI)
    MS Sequel Server Informix
    Multimedia Messaging Service(MMS)
    ODBC
    Oracle(2-tier)
    Oracle NCA
    Oracle Web Application 11.i(c&s for Oracle)
    Palm
    PeopleSoft Tuxedo
    Peoplesoft Enterprise(c&s for PeopleSoft)
    Post office Protocol(POP3)
    RealPlayer
    Rmi-java
    SAPGUI
    SAPGUI/SAP-WEB Dual Protocol
    SAP-WEB
    Siebel-DB2 CLI
    Siebel-Oracle
    Siebel-MySql
    Siebel-web
    Simple Mail Protocol(smtp)
    Sybase CTLib
    Sybase DBLib
    Terminal Emulation(RTE)
    Tuxedo 6/7
    vb vuser
    vb scrīpt vuser
    vbnet vuser
    vbnet Template(visual studio add-in)
    VoiceXML
    WAP
    Web(http/html)
    web click and scrīpt
    web services
    windows sockets

    HP LoadRunner partner protocols:
    Cognos(Genilogix)
    JDBC(J2EE911)
    SIP(Utopia)

    HP QuickTest Professional add-ins
    Legacy 3270,5250 enulators,vt100
    activex
    citrix
    delphi8.net winforms
    htc/viewlink
    internet explorer
    java swt
    jdedwards web client
    jdk,javafoundation classes,awt
    mozilla firefox 2.0
    netscape
    oracle 11i
    peoplesoft 8.x
    sap
    siebel 7.x/8.x
    stingray
    visual basic
    visualage smalltalk
    vmware desktop support
    web forms
    web services
    windows2000,windows2003,windowsxp ,windos vista
    winforms
    wpf from.net3.0

    HP QuickTest Professional partner add-ins
    Flex(adobe)
    TestAdvantage(infragistics)

    HP Quality Center partner integrations
    AccuBridge(accurev)
    CollabNet Conector(CollabNet)
    NetProcess(Intellicorp)
    Integrity Suite(MKS)
    Personal Navigator(OnDemand Software)
    SCM System(Perforce)
    TestSmart(Sapphire infotech)
    TeamTrack(Serena)
    PVCS Version Manager(Serena)
    Profesy(Sofea)
    Solstice Integra Suite(Solstice Software)
    QAInspect(SPI Dynamics)
    Virual QA/Test Lab Management System(Surgient)

     

  • 一个开心的秘密

    2008-09-12 18:03:08

    2008-09-12 17:08:57 (R)China ~Aleon--. 朴春龙 私下给你透露一点好消息 
    2008-09-12 17:09:11 (R)China ~Aleon--. 朴春龙 李海英现在都一万多了:) 
    2008-09-12 17:09:27 (R)China ~Aleon--. 朴春龙 你还在北京? 
    2008-09-12 17:09:49 (R)China ~Aleon--. 朴春龙 什么时候有空回来,喝点小酒 
    2008-09-12 17:10:28 朴春龙 (R)China ~Aleon--. 是么 
    2008-09-12 17:10:30 朴春龙 (R)China ~Aleon--. 这么神奇 
    2008-09-12 17:10:43 (R)China ~Aleon--. 朴春龙 真的 
    2008-09-12 17:11:03 (R)China ~Aleon--. 朴春龙  xx通信 (公司名字忽略掉了) 
    2008-09-12 17:11:08 朴春龙 (R)China ~Aleon--. 好啊 我回去 咱们一起喝酒 
    2008-09-12 17:11:29 (R)China ~Aleon--. 朴春龙 她也给51争光了啊:) 
    2008-09-12 17:13:14 朴春龙 (R)China ~Aleon--. 是啊 
    2008-09-12 17:14:15 (R)China ~Aleon--. 朴春龙 
    --- 系统提示: 以下会话未被加密 --- 
    2008-09-12 17:14:15 (R)China ~Aleon--. 朴春龙 呵呵 ,这就是51出来的人,有潜力 
    2008-09-12 17:15:01 朴春龙 (R)China ~Aleon--. 你怎么样啊 
    2008-09-12 17:15:36 (R)China ~Aleon--. 朴春龙 一般般了




    备注:
    aleon 上海二期班学员
    李海英 上海八期班学员

1664/9<123456789>
Open Toolbar