我的地盘我做主! 博客:http://tester2test.cnblogs.com/   msn:win_soft@163.com

发布新日志

  • Why Visual Studio Team System Isn't A LoadRunner Killer[转载]

    2007-04-09 07:27:14

    Why Visual Studio Team System Isn't A LoadRunner Killer

    by Scott Moore
    Loadtester Incorporated
    04/14/2006


    Microsoft recently posted a job for a performance engineer, and I happened to see it. It started off with the question, "Do you have experience with any of the common performance testing applications such as LoadRunner and OcraCoke?" I thought, "huh?". For those of you not familiar with OcraCoke, that was the pre-launch code name for Visual Studio Team System. This peaked my interest further. I was interested in VSTS because several people have been asking me if I think Microsoft has come up with a "LoadRunner killer". I attended a meeting held at  a Microsoft facility and watched VSTS demonstrated. I can say without a doubt, this is NOT a LoadRunner killer. I can't see that it ever will be. Microsoft is has created a competitive product for specific cases. They are offering VSTS as an alternative to the "500 pound gorillas" load testing products. Did I mention that their license model allows unlimited virtual users? When you buy the license, its per CPU. This means as many virtual users as your server can run for one price. So why am I so confident that we won't see a mass move to this product by the Global 2000 companies in the US?

    VSTS is really made with a developer's frame of reference in mind, using Visual Studio's interface to build scripts and run tests. The LAST person I want running an integrated test on a huge project is the developer. They should performance test their code components and the code layer of the product. They should engineer performance into their widgets via unit performance testing, but I don't want them touching a system right before it goes live. Why? They have a skewed view of the testing and cannot remain neutral. Developers are only worried about their code. If they cannot figure out how to optimize their code, they will throw hardware at it before spending the time to rewrite. I've seen it time and time again. Since it's usually their neck on the line if the product gets delayed due to defects (whether quality or performance related), how many developers are going to resist the temptation to tell the CIO that they found a performance issue in the code and the product roll out needs to be delayed two more weeks? How many developers want to expose themselves or their team to the client stakeholders as the originators of the performance defects. This is why a performance engineer who is a third party needs to do this. It should be a QUALIFIED engineer who can get into the guts of the system, and who doesn't have political ties to the development staff, including reporting to the same manager. I prefer a person who represents production because that's who is going to end up with the final result and have to support and maintain it. Most QA teams report to the development manager, which is a mistake. What happens is the QA team is gagged and bound from doing their job because they are seen as holding up the project. That's why having a performance engineer report to the production director gets them out of that jam. I am seeing more and more of this in the market and I like it. On the other hand, we must not forget that performance testing is a discipline of product assurance. Too far the other direction (operations) and you're not looking at code, but CPU counters and bandwidth alone. This is also a mistake.

    The biggest reason VSTS is not the LoadRunner killer is because I don't know of a single Enterprise completely encapsulated in a Microsoft world and totally compatible with a limited set of technology platforms. Once you get away from the Microsoft realm, VSTS loses most of it's potency. In fact, if you are simply using the Firefox or Opera browsers as your standard, you are out of luck. When creating web scripts, the only choices are Internet Explorer or Netscape 6. This can probably be worked around by manually modifying some headers, but that is only the beginning. What happens when you need to move into that gray area between web and "other" application (like Siebel 7.7) where there is more of a challenge because of client stuff to install and it might communicate outside of port 80? How about mySAP? Oracle financials? What if you want to test a legacy application behind Citrix? Microsoft will tell you that they have an additional feature which will allow you to expand to other protocols (and I would assume some gifted MS developers are working on this now). It's a unit testing tool, much like Nunit. The only problem is you need to be a geekazoid wedge head programmer (the kind that you leave a 6-pack of Jolt cola's for outside their door and let them work in the dark) to create the stuff needed to test against these other protocols . I don't know a lot of QA folks out there testing applications with this much time on their hands. They're already overworked and underpaid. And haven't you heard, they are the reason the projects are being held up….?!?!? It is sort of like getting LoadRunner with only the web protocol and the Winsock protocol. Everything that falls outside of pure web, is Winsock. I can hear the groans and feel the anguish even as I type this up.

    The main problem Microsoft will have in developing new protocols is not limited to the technical realm. One of the real strengths Mercury has is the strong relationships at the R&D level with SAP, ORACLE, CITRIX, and others. In fact, SAP and ORACLE have standardized internally on LoadRunner. They have provided Mercury the information they need to "hook" into these custom applications and protocols and spent the last 10 years maturing and expanding these protocols so that the scripting part gets easier with each version. Because of this, you can apply the same testing methodology across projects no matter the application, protocol, or platform. Now let's think about the fact that while its entirely possible that these kinds of protocols can be developed, who's going to bet me that Oracle and SAP are going to play nice with Billy Gates and hand over the hooks into their product? Anyone? Bueller? Bueller?...

    Now that I've spent the entire time whining and standing on my soapbox (again), let me say that I think VSTS has some great qualities. Just the fact that it gets all those developers THINKING about testing is a good thing. The ability to create a simple web script directly in their tool of choice and run a test against their code - this is a VERY good thing. Being able to put a transaction around multiple page returns, adding think time, modifying in a script view, creating parameters, and real time performance monitors are all great things. There are lots of graphs to look at an analyze after the test is completed. If you have a development shop that is COMPLETELY Microsoft centric and you are only messing with web and web services in .NET, then this could be a way for you to validate the performance of your product. It will still take a solid testing methodology to make sure you are truly eliminating the risk of production deployment. That is something Microsoft won't bring to the table either, and best left to folks like us at Loadtester. We'd love to help. On the other hand, I'm not putting away my LoadRunner skills just yet. When Oracle standardizes on VSTS, I'll gladly close my laptop and open a BBQ restaurant….on the beach!!!



    测试者家园 2006-11-23 15:59 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2006/11/23/569966.html
  • 一段Winrunner的样例脚本

    2007-04-09 07:27:14

    #########################################################################################################
    #
    # Test Name     : Date Boundary
    # Subject          : Open Order Form
    #
    # Description    : Checks that the input of illegal values in the Flight Date is blocked and that error messages
    #    appear.  The following input should be tested:
    #     1. Flight Date Edit field is disabled when button is unchecked
    #     2. Characters (not accepted)
    #     3. More than six numbers (not accepted)
    #     4. Less than six numbers (OK is disabled)
    #     5. Invalid Month
    #     6. Invalid date of the month
    #     7. No entry
    #
    #
    #########################################################################################################

    #static variables:
    static ret_val,date_str,i;
    # Constant declaration
    static const DISABLED = FALSE;

    # Variable declaration.  Can be anything the user wants.
    static date_string_of_chars  = "as/cd/ef";     # Used in STEP 2.  Characters (Not accepted).
    static date_seven_numbers = "12/34/567"; # Used in STEP 3.  More than six numbers not accepted.
    static date_invalid_month    = "13/20/95";   # Used in STEP 5.  Invalid month.
    static date_invalid_day        = "12/32/95";   # Used in STEP 6.  Invalid date of month.

    static lib_path = getvar("testname") & "\\..\\flt_lib";

    # Static function reinitialize ().  Reinitializes Flight Date to OFF and clears the edit field.
    static function reinitialize ()
    {
     auto ret_val;
     set_window ("Open Order");
     obj_get_info ("FlightDateEdit", "enabled", ret_val);
     if (ret_val == TRUE) {
         set_window ("Open Order");
      edit_set_insert_pos ("FlightDateEdit", 0, 0);
      type ("");
     }
    }

    # Static function insert_date ().  Inserts the date into the FlightDateEdit field.
    static function insert_date (in date)
    {
     set_window ("Open Order");
     edit_set_insert_pos("FlightDateEdit",0,0);
     type(date);
    }

    reload(lib_path);

    # Open the flight application
    rc = open_flight();
    if (rc == E_GENERAL_ERROR){
      tl_step(initialization, FAIL,couldnt_open_flight);
     clean_up();
     texit;
    }

     

    # Initialization.
    open_OpenOrderForm ();


    # STEP 1.  Flight Date Edit is disabled

    set_window ("Open Order");

    # Checking to see if the edit field is disabled when button is unchecked
    obj_get_info ("FlightDateEdit", "enabled", ret_val);
    if (ret_val == DISABLED)
     tl_step (disabled, PASS, flight_date_disabled);
    else
     tl_step (disabled, FAIL, flight_date_not_disabled);
    reinitialize ();


    # STEP 2.  Characters (not accepted)

    button_set ("Flight Date", ON);

    # Inserting a date of characters using variable, "date_string_of_chars", defined above.
    insert_date (date_string_of_chars);
    edit_get_text ("FlightDateEdit", date_str);

    # Checking to see if application handled illegal open order procedure
    if (date_str == "__/__/__")
     tl_step (characters, PASS, chars_not_accepted);
    else
     tl_step (characters, FAIL, chars_accepted);
    reinitialize ();

    # STEP 3. More than six numbers (not accepted)

    button_set ("Flight Date", ON);
    # Inserting a date consisting of more than six numbers using variable, "date_seven_numbers", defined above.
    insert_date (date_seven_numbers);
    edit_get_text ("FlightDateEdit", date_str);

    # Checking to see if application handled illegal open order procedure
    if (date_str == "12/34/56")
     tl_step(more_than_six, PASS, more_than_six_not_accepted);
    else
     tl_step(more_than_six, FAIL, more_than_six_accepted);
    reinitialize ();

    # STEP 4. Less than six numbers (OK is disabled)

    edit_set_insert_pos ("FlightDateEdit", 0, 0);

    # Using for_loop to systematically check if OK button is disabled for any date with less than six numbers in it
    for (i = 1; i <= 6; i++) {
     type(i);
     if (button_check_enabled ("OK", TRUE) == E_OK)
      break;

    }

    #  The actual check to make sure that OK was disabled for date less than six numbers
    ts_msg = sprintf(ok_not_disabled, i);
    if (i < 6)
     tl_step (less_than_six, FAIL, ts_msg);
    else
     tl_step (less_than_six, PASS, ok_disabled);
    reinitialize ();

    # STEP 5. Invalid Month

    set_window ("Open Order");
    # Inserting a date with an invalid month using variable, "date_invalid_month", defined above.
    insert_date (date_invalid_month);

    # Checking to verify that unless there is a valid month, an error message will pop up when trying to press "OK"
    set_window("Open Order");
    button_press("OK");
    if(win_exists("Flight Reservation Message",10) != E_OK){
     tl_step (invalid_month, FAIL, invalid_month_msg_popup);
     clear_main_window();
     open_OpenOrderForm ();
    }
    else{
     set_window("Flight Reservation Message");
     static_get_text("Message", txt);
     if(txt !=invalid_month_entered_msg)
      tl_step (invalid_month, FAIL, invalid_month_wrong_msg);
     else
      tl_step (invalid_month, PASS, invalid_month_correct_msg);
     button_press("OK");
    }
    reinitialize ();


    # STEP 6.  Invalid day of month.

    set_window ("Open Order");
    # Inserting a date with an invalid day using variable, "date_invalid_day", defined above.
    insert_date (date_invalid_day);

    # Checking to verify that unless there is a valid day of the month the "OK" button will be disabled
    set_window("Open Order");
    button_press("OK");
    if(win_exists("Flight Reservation Message",10) != E_OK){
     tl_step (invalid_day, FAIL, invalid_day_no_err_msg);
     clear_main_window();
     open_OpenOrderForm ();
    }
    else{
     set_window("Flight Reservation Message");
     static_get_text("Message", txt);
     if(txt !=invalid_day_entered_msg)
      tl_step (invalid_day, FAIL, invalid_day_wrong_err_msg);
     else
      tl_step (invalid_day, PASS, invalid_day_not_accepted);
     button_press("OK");
    }
    reinitialize ();


    # STEP 7.  No Entry.

    set_window ("Open Order");
    # Inserting no date to see if OK is disabled.
    insert_date ("__/__/__");

    # Checking to see if OK is disabled without any date set in edit field
    if (button_check_enabled ("OK", TRUE) != E_OK)
     tl_step (no_entry, PASS, ok_button_disabled);
    else
     tl_step (no_entry, FAIL, ok_button_enabled);


    # Returning to initial state.
    button_press ("Cancel");
    clean_up();


    # End of test.



    测试者家园 2006-12-08 09:24 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2006/12/08/586031.html
  • 大数据量生成工具源代码(Delphi)

    2007-04-06 09:31:46

    可执行文件存放于:http://bbs.51testing.com/thread-71954-1-1.html

    unit Unit1;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, ComCtrls, ExtCtrls, shellapi;

    type
      TForm1 = class(TForm)
        pnl1: TPanel;
        edt1: TEdit;
        btn2: TButton;
        btn1: TButton;
        pnl2: TPanel;
        mmo2: TMemo;
        lbl1: TLabel;
        lbl2: TLabel;
        edt2: TEdit;
        ud1: TUpDown;
        lbl3: TLabel;
        edt3: TEdit;
        ud2: TUpDown;
        btn3: TButton;
        btn4: TButton;
        CheckBox1: TCheckBox;
        Memo1: TMemo;
        Button1: TButton;
        Button2: TButton;
        StatusBar1: TStatusBar;
        procedure btn1Click(Sender: TObject);
        procedure btn2Click(Sender: TObject);
        procedure btn3Click(Sender: TObject);
        procedure btn4Click(Sender: TObject);
        procedure Button1Click(Sender: TObject);
        procedure Button2Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.btn1Click(Sender: TObject);
    begin
      edt1.Clear;
      edt2.Clear;
      edt3.Clear;
    end;

    procedure TForm1.btn2Click(Sender: TObject);
    var
      i: integer;
    begin
      try
        strtoint(edt2.Text);
      except
        application.MessageBox('请输入整数!', '系统信息', 32);
        edt2.SetFocus;
        exit;
      end;

      try
        strtoint(edt3.Text);
      except
        application.MessageBox('请输入整数!', '系统信息', 32);
        edt3.SetFocus;
        exit;
      end;
      mmo2.Lines.Clear;
      if trim(edt2.Text) = '' then edt2.Text := '0';
      if not CheckBox1.Checked then begin
      for i := strtoint(edt2.Text) to strtoint(edt2.Text) + strtoint(edt3.Text) - 1 do
        mmo2.Lines.Add(edt1.Text + inttostr(i));
      end else begin
      for i := strtoint(edt2.Text) to strtoint(edt2.Text) + strtoint(edt3.Text) - 1 do
        mmo2.Lines.Add(edt1.Text);
      end;
      if mmo2.Lines.Count>0 then btn4.Enabled := true else btn4.Enabled := false;
    end;

    procedure TForm1.btn3Click(Sender: TObject);
    begin
      halt;
    end;

    procedure TForm1.btn4Click(Sender: TObject);
    begin
      mmo2.Lines.SaveToFile('c:\test.txt');
      ShellExecute(Handle, 'open', 'c:\test.txt', nil, nil, SW_SHOWNORMAL);
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    var
      i :integer;
    begin
      mmo2.Lines.Clear;
      for i:=0 to memo1.Lines.Count-1 do
        begin
          mmo2.Lines.Add(edt1.Text+memo1.Lines.Strings[i]);
        end;
    end;

    procedure TForm1.Button2Click(Sender: TObject);
    var
      i :integer;
    begin
      mmo2.Lines.Clear;
      for i:=0 to memo1.Lines.Count-1 do
        begin
          mmo2.Lines.Add(memo1.Lines.Strings[i]+edt1.Text);
        end;
    end;

    end.



    测试者家园 2007-04-04 12:52 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/04/04/699598.html
  • 我学员的一个问题及其我对之的解答,关于lr返回值问题

    2007-03-30 11:17:21

     

    问题:

      在创建和录制脚本的时候,发现在脚本vuser_initActionvuser_end三部分,都会有一条“return 0;”语句,那么我们平时在编写脚本时如何应用return语句,return不同的返回值又有什么含义呢?

    问题解答:

    Return标识一个过程的结束,在LoadRunner 中用return 不同的返回值根据脚本不同的返回值,表示脚本的成功或者失败。“return + 大于等于零的数字 ;”表示成功,反之,则表示失败。



    测试者家园 2007-01-24 11:27 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/01/24/628849.html
  • 防电脑辐射小贴士[转载]

    2007-03-30 11:17:21

    使用电脑时,最好在显示器前配备质量较好的防辐射屏。注意酌情多吃一些胡萝卜、豆芽、西红柿、瘦肉、动物肝等富含维生素A、C和蛋白质的食物,经常喝些绿茶等等。

    对于生活紧张而忙碌的人群来说,抵御电脑辐射最简单的办法就是在每天上午喝2至3杯的绿茶,吃一个橘子。茶叶中含有丰富的维生素A原,它被人体吸收后,能迅速转化为维生素A。维生素A不但能合成视紫红质,还能使眼睛在暗光下看东西更清楚,因此,绿茶不但能消除电脑辐射的危害,还能保护和提高视力。如果不习惯喝绿茶,菊花茶同样也能起着抵抗电脑辐射和调节身体功能的作用。

    电脑辐射是不可避免的,但可以减少。首先,应尽可能购买新款的电脑,一般不要使用旧电脑,旧电脑的辐射一般较厉害,在同距离、同类机型的条件下,一般是新电脑的1-2倍。操作电脑时最好在显示屏上安一块电脑专用滤色板以减轻辐射的危害,室内不要放置闲杂金属物品,以免形成电磁波的再次发射。使用电脑时,要调整好屏幕的亮度,一般来说,屏幕亮度越大,电磁辐射越强,反之越小。不过,也不能调得太暗,以免因亮度太小而影响效果,且易造成眼睛疲劳。还要注意与屏幕保持适当距离。离屏幕越近,人体所受的电磁辐射越大,因此较好的是距屏幕半米以外。

    电脑使用后,脸上会吸附不少电磁辐射的颗粒,要及时用清水洗脸,这样将使所受辐射减轻70%以上。

    仙人掌除了可以攻击坏人,还有一项好处喔!据说在计算机桌前放置一仙人掌有助于减少辐射。

    常用电脑的人会感到眼睛不适,视力下降,易有疲劳的感觉。常用电脑的人在饮食上应注意以下几方面:

    吃一些对眼睛有益的食品,如鸡蛋、鱼类、鱼肝油、胡萝卜、菠菜、地瓜、南瓜、枸杞子、菊花、芝麻、萝卜、动物肝脏等。

    多吃含钙质高的食品,如豆制品、骨头汤、鸡蛋、牛奶、瘦肉、虾等。

    注意维生素的补充:多吃含有维生素的新鲜水果、蔬菜等。

    注意增强抵抗力:多吃一些增强机体抗病能力的食物,如香菇、蜂蜜、木耳、海带、柑桔、大枣等。

    吃一些抗辐射的食品:电脑虽然对人体健康影响较小,但也应预防。饮茶能降低辐射的危害,茶叶中的脂多糖有抗辐射的作用。螺旋藻、沙棘油也具有抗辐射的作用。

    另外,用完电脑应洗脸,平时应注意锻炼身体。

    电脑摆放位置很重要。尽量别让屏幕的背面朝着有人的地方,因为电脑辐射最强的是背面,其次为左右两侧,屏幕的正面反而辐射最弱。以能看清楚字为准,至少也要50厘米到75厘米的距离,这样可以减少电磁辐射的伤害。

    注意室内通风:科学研究证实,电脑的荧屏能产生一种叫溴化二苯并呋喃的致癌物质。所以,放置电脑的房间最好能安装换气扇,倘若没有,上网时尤其要注意通风。

    面对电脑时间长了不好,那该怎么办?其实每天四杯茶,不但可以对抗辐射的侵害,还可保护眼睛。

    1.上午一杯绿茶:
    绿茶中含强效的抗氧化剂以及维生素C,不但可以清除体内的自由基,还能分泌出对抗紧张压力的荷尔蒙。绿茶中所含的少量咖啡因可以刺激中枢神经,振奋精神。不过最好在白天饮用,以免影响睡眠。

    2.下午一杯菊花茶:
    菊花有明目清肝的作用,有些人就干脆用菊花加上枸杞一起泡来喝,或是在菊花茶中加入蜂蜜,都对解郁有帮助。
    3.疲劳了一杯枸杞茶:
    枸杞子含有丰富的β胡萝卜素、维生素B1、维生素C、钙、铁,具有补肝、益肾、明目的作用。其本身具有甜味,可以泡茶也可以像葡萄干一样作零食,对解决“电脑族”眼睛涩、疲劳都有功效。
    4.晚间一杯决明茶:
    决明子有清热、明目、补脑髓、镇肝气、益筋骨的作用,若有便秘的人还可以在晚餐饭后饮用,对於治疗便秘很有效果。

    还有些最适合计算机族喝的茶饮,或是点心,不但可以帮您对抗辐射的侵害,还可保护您的眼睛,抗烦躁呢。

    绿豆薏仁汤
    绿豆可以清热解毒、利尿消肿,薏仁则可以健脾止泻,轻身益气,对於经常需要熬夜工作者或是心烦气躁、口乾舌燥、便秘、长青春痘时,除了多吃蔬菜水果与补充水份外,把绿豆薏仁汤当点心食用,对於消暑除烦非常有帮助。

    杜仲茶
    杜仲具有补血与强壮筋骨的作用,对於经常久坐,腰虽背痛很有帮助,男女都可以喝,若是女性朋友还可以在生理期的末期与四物汤一起服用。


    测试者家园 2007-02-05 13:43 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/02/05/640620.html
  • 养生之道

    2007-03-30 11:17:21

    晚上 9-11点为免疫系统(淋巴)排毒时间,此段时间应安静或听音乐

    晚间 11-凌晨 1点,肝的排毒,需在熟睡中进行。

    凌晨 1-3点,胆的排毒,亦同。

    凌晨 3-5点,肺的排毒。此即为何咳嗽的人在这段时间咳得最剧烈,因排毒动作已走到肺;不应用止咳药,以免抑制废积物的排除。

    凌晨 5-7点,大肠的排毒,应上厕所排便。

    凌晨 7-9点,小肠大量吸收营养的时段,应吃早餐。疗病者最好早吃,在
    6点半前,养生者在7点半前,不吃早餐者应改变习惯,即使拖到9、 10 点吃都比不吃好。

    半夜至凌晨4点为脊椎造血时段,必须熟睡,不宜熬夜。

    千万劳记:工作不是生活的全部!



    测试者家园 2007-03-07 16:34 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/03/07/666982.html
  • lr8.0脚本应用于VuGen 8.1设置

    2007-03-30 11:17:21

    lr8.0脚本应用于VuGen 8.1设置,需要在Vugen.ini文件中添加

    [Editor]
    OLDEDITOR=1


    测试者家园 2007-03-13 16:08 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/03/13/673234.html
  • 贴张我家养的狗狗们的照片!

    2007-03-30 11:17:21


    呵呵,看大老笨会坐着,小黑狗喜欢吃雪,三只小藏獒玩的还挺开心,你能发现第三只小藏獒在那吗?:)。

    测试者家园 2007-03-16 08:57 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/03/16/676755.html
  • LoadRunner Interview Questions

    2007-03-30 11:17:21

            摘自:网络

    1. What is load testing?

    Ans. Load testing is to test that if the application works fine with the loads that result from large number of simultaneous users, transactions and to determine weather it can handle peak usage periods.

    2. What is Performance testing?

    Ans. Timing for both read and update transactions should be gathered to determine whether system functions are being performed in an acceptable timeframe. This should be done standalone and then in a multi user environment to determine the effect of multiple transactions on the timing of a single transaction.

    3. Explain the Load testing process?

    Ans. Following are the steps involved in the Load testing process:

    Step 1: Planning the test - Here, we develop a clearly defined test plan to ensure the test scenarios we develop will accomplish load-testing objectives.

    Step 2: Creating Vusers - Here, we create Vuser scripts that contain tasks performed by each Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions.

    Step 3: Creating the scenario - scenario describes the events that occur during a testing session. It includes a list of machines, scripts, and Vusers that run during the scenario. We create scenarios using LoadRunner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each script. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner automatically builds a scenario for us.

    Step 4: Running the scenario - We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers.

    Step 5: Monitoring the scenario - We monitor scenario execution using the LoadRunner online runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors.

    Step 6: Analyzing test results - During scenario execution, LoadRunner records the performance of the application under different loads. We use LoadRunner’s graphs and reports to analyze the application’s performance.

    4. When do you do load and performance Testing?

    Ans. We perform load testing once we are done with interface (GUI) testing. Modern system architectures are large and complex. Whereas single user testing primarily on functionality and user interface of a system component, application testing focuses on performance and reliability of an entire system. For example, a typical application-testing scenario might depict 1000 users logging in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software applications and platforms, can it hold so many hundreds and thousands of users, etc. This is when we set do load and performance testing.

    5. What are the components of LoadRunner?

    Ans. The components of LoadRunner are The Virtual User Generator, Controller, and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.



    测试者家园 2007-03-17 22:47 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/03/17/678553.html
  • C语言应用于LR中-如何得到数组长度(原创)

    2007-03-30 11:17:21

    C语言没有提供获取数组长度的函数,最起码我不知道,所以编写了一个函数取数组的长度,调试成功,大家可以试试。另外也可以用sizeof(a)/4来取得整型数组的长度,因为整型占4个字节。效果相同。

    #include "web_api.h"

    int LenofArray(int *p)
    {
            int length=0;
            for(;*p!='\0';p++)
            length++;
            return length;
    }

    Action()
    {
        int a[]={1,2,3,4,23,234,4543,565,767};
        int m=LenofArray(a);
        lr_output_message("%d",m);
     return 0;
    }



    测试者家园 2007-03-21 13:42 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/03/21/682482.html
  • 要是下次他们放手机时戴了手套怎么办?

    2007-03-30 11:17:21

        我同学在乘坐公交车时突然旁边一个乘客 A大声喧哗,说他手机丢了,并且指正是他旁边的 B偷了, B装出一幅份很无辜的样子,说手机不是我偷的,你记得你自己的手机号码么,你找一个手机打一下,不就知道是谁偷了么。这时 C主动说把手机借给他拨一下他自己的号码,当手机拨通的瞬间,我同学兜里的手机突然响了,我们都很诧异,我同学怎么可能偷手机,但当时很安静,声音确实来自他的口袋,心想这下完了,被人陷害了,百口莫辩啊。

       
    这时丢手机的 A很凶悍的打了我同学一拳,我们心里已经知道他们三个是一伙的,在诈骗,但打也打不过,说也没理。
    我同学没有还手,只是大声的吼到:现在全车人都可以作证,在事情真相没有调查清楚之前你动手打人,我要告你。

       
    这时候我同学非常冷静沉着,从另外一个口袋拿出一张餐巾纸,用餐巾纸包着手机举起来,说:我是北大法律系的,这个手机上没有我指纹,手机不是我偷的,车上有人诈骗,请司机关好车门,我要打 110报警。

       
    不到 5分钟,警察就来了,把我们带到了警察局,我同学涉嫌偷窃,被关了起来,我们只好给我同学的博士导师打电话,出面保释。

       
    导师、学校保卫科科长都来了,问清楚了事情的经过,后来进行指纹验证,结果出来了,手机上有他们三个的指纹,没有我同学的指纹,他们是一个
    诈骗团伙。他们通过把手机偷偷塞到你兜你,然后诬陷你偷手机,从而进行诈骗和勒索。

       
    最后,我同学无罪释放。警察还非常感谢我们帮他们破获了一起团队诈骗案,并不断夸赞我同学智商怎么这么高。
    我同学其实不是北大法律系的,但他的智商的确很高,也很冷静。
    但最大功劳还多亏那张餐巾纸。

       
    现在的小偷不偷手机,改送手机了,神不知鬼不觉。


    测试者家园 2007-03-26 13:06 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/03/26/688271.html
  • 异构数据库之间的导入导出[转载]

    2007-02-03 21:17:45

    原文出处:http://blog.csdn.net/flyany2000/archive/2005/10/14/503945.aspx


    异构数据库之间的导入导出

    //MSSQL2EXCEL
    ADOConnection1.ConnectionString:=
    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\mysmallexe\excel2sql\yp.xls;'
    +'Extended Properties=excel 8.0';
    ADOConnection1.Execute('select * into [Abc] from drug_yk IN [ODBC] [ODBC;Driver=SQL

    Server;UID=sa;PWD=kcsoft58;Server=127.0.0.1;DataBase=kcsoft_his]');
    //把一个MSSQL的数据库表及数据导出到excel中,abc为excel中不存在的表名,drug_yk为MSSQL里的表, sa为

    用户,  kcsoft58为密码 , 127.0.0.1为服务大地址 ,kcsoft_his是数据库名称
    ADOConnection1.Execute('insert into [abc] select * from drug_yk in [ODBC] [ODBC;Driver=SQL

    Server;UID=sa;PWD=kcsoft58;Server=127.0.0.1;DataBase=kcsoft_his]');
    //把一个MSSQL的数据库表的记录增加到到excel中,执行以后相当于两倍量的数据,一次是导入,一次是

    insert


    //EXCEL2MSSQL
      ADOConnection1.ConnectionString:='Provider=SQLOLEDB.1;Password=KCSOFT58;Persist Security

    Info=True;User ID=SA;Initial Catalog=KCSOFT_HIS;Data Source=CHEN';
       ADOConnection1.Execute('SELECT * into [abc] FROM OpenDataSource( '
       +QuotedStr('Microsoft.Jet.OLEDB.4.0')+','
       +QuotedStr('Data Source="G:\mysmallexe\excel2sql\yp.xls";Extended Properties=excel 8.0')

    +')...[Abc]');


    //MSSQL2VFP
      ADOConnection2.ConnectionString:=
    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\mysmallexe\excel2sql;'
    +'Extended Properties=dBase 5.0';
    ADOConnection2.Execute('select * into Abc.dbf from drug_yk IN [ODBC] [ODBC;Driver=SQL

    Server;UID=sa;PWD=kcsoft58;Server=127.0.0.1;DataBase=kcsoft_his]');
    //把一个MSSQL的数据库表及数据导出到VFP中,Abc.dbf 为VFP中不存在的表名,drug_yk为MSSQL里的表, sa为

    用户,  kcsoft58为密码 , 127.0.0.1为服务大地址 ,kcsoft_his是数据库名称


    //VFP2MSSQL
       ADOConnection2.ConnectionString:='Provider=SQLOLEDB.1;Password=KCSOFT58;Persist Security

    Info=True;User ID=SA;Initial Catalog=KCSOFT_HIS;Data Source=CHEN';
       ADOConnection2.Execute('SELECT * into [abc] FROM OpenDataSource( '
       +QuotedStr('Microsoft.Jet.OLEDB.4.0')+','
       +QuotedStr('Data Source="G:\mysmallexe\excel2sql";Extended Properties=dBase 5.0')+')...

    [Abc]');


     //MSSQL2access
         ADOConnection2.ConnectionString:=
    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\mysmallexe\excel2sql\Server.MDB;'
    +'Persist Security Info=False;Jet OLEDB:Database Password=happynewyear';
    ADOConnection2.Execute('select * into Abc from drug_yk IN [ODBC] [ODBC;Driver=SQL

    Server;UID=sa;PWD=kcsoft58;Server=127.0.0.1;DataBase=kcsoft_his]');


    //access2MSSQL
      ADOConnection2.ConnectionString:='Provider=SQLOLEDB.1;Password=KCSOFT58;Persist Security

    Info=True;User ID=SA;Initial Catalog=KCSOFT_HIS;Data Source=CHEN';
       ADOConnection2.Execute('SELECT * into [abc] FROM OpenDataSource( '
       +QuotedStr('Microsoft.Jet.OLEDB.4.0')+','
       +QuotedStr('Data Source="G:\mysmallexe\excel2sql\Server.MDB";Jet OLEDB:Database

    Password=happynewyear')+')...[Abc]');


    //excel2access
        ADOConnection2.ConnectionString:=
    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\mysmallexe\excel2sql\Server.MDB;'
    +'Persist Security Info=False;Jet OLEDB:Database Password=happynewyear';
    ADOConnection2.Execute('SELECT * into [abc] FROM [excel

    8.0;database=G:\mysmallexe\excel2sql\yp.xls].[abc$]');

    //access2excel
       ADOConnection2.ConnectionString:=
    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\mysmallexe\excel2sql\yp.xls;'
    +'Extended Properties=excel 8.0';
    ADOConnection2.Execute('SELECT * into abc  from

    [G:\mysmallexe\excel2sql\Server.MDB;pwd=happynewyear].abc');


    //MSSQL2txt
     ADOConnection2.ConnectionString:=
    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\mysmallexe\excel2sql;'
    +'Extended Properties=text';
    ADOConnection2.Execute('select * into Abc#txt from drug_yk IN [ODBC] [ODBC;Driver=SQL

    Server;UID=sa;PWD=kcsoft58;Server=127.0.0.1;DataBase=kcsoft_his]');


    //txt2MSSQL
       ADOConnection2.ConnectionString:='Provider=SQLOLEDB.1;Password=KCSOFT58;Persist Security

    Info=True;User ID=SA;Initial Catalog=KCSOFT_HIS;Data Source=CHEN';
        ADOConnection2.Execute('SELECT * into [abc] FROM OpenDataSource( '
       +QuotedStr('Microsoft.Jet.OLEDB.4.0')+','
       +QuotedStr('Data Source="G:\mysmallexe\excel2sql";Extended Properties=text')+')...

    [Abc#txt]');



    测试者家园 2007-01-22 13:55 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/01/22/626850.html
  • 我学员的一个问题及其我对之的解答,关于lr返回值问题

    2007-02-03 21:17:45

     

    问题:

      在创建和录制脚本的时候,发现在脚本vuser_initActionvuser_end三部分,都会有一条“return 0;”语句,那么我们平时在编写脚本时如何应用return语句,return不同的返回值又有什么含义呢?

    问题解答:

    Return标识一个过程的结束,在LoadRunner 中用return 不同的返回值根据脚本不同的返回值,表示脚本的成功或者失败。“return + 大于等于零的数字 ;”表示成功,反之,则表示失败。



    测试者家园 2007-01-24 11:27 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2007/01/24/628849.html
  • 一样一句

    2006-12-30 12:25:20

    说话真有好听难听之别。
    最普通的例子是,英国人从来不说“你听不听得见”,而讲“我语气是否清晰”,客气与不客气差了十万八千里。
    一样一句话,负面说法是“他妒忌我”,正面讲法是“我可能有叫他不顺眼之处”。
    “他取价那么贵,交的又是行货”不如改为“我们用不起他的稿子”,反正不要,何苦再得罪人家。
    “我不知道你说什么”是怪对方表达能力差,“我没听懂”是自己笨,或许真是我们资质欠佳呢,无所谓啦。
    “我嫉恶如仇,不吐不快”,会不会是“我心胸浅窄,凡事牢骚特多”?
    “众人均针对我,故意刁难”,可能是“我得罪四方君子,犯了众怒”?
    切莫走入我是人非的窄巷,芝麻绿豆,完全是人家的错,面子里子、统统是人家的不是。
    与生计、收入,无关之琐事,谁是谁非,无关重要,我是青面獠牙的歹角?无所谓,稿照写,书照出,还有,觉照睡。
  • 一道招聘试题, (终身受用啊)

    2006-12-26 08:46:25

    请听题:

    测试一下看看你是不是通得过自己对自己的考验。这是一家公司要招收新的职员其中一个测试的问题。。。。。。

    你开着一辆车。
    在一个暴风雨的晚上。
    你经过一个车站。
    有三个人正在等公共汽车。
    一个是快要死的老人,好可怜的。
    一个是医生,他曾经救过你的命,是个大恩人,你做梦都想报答他。
    还有一个女人/男人,她/他是那种你做梦都想娶/嫁的人,也许错过就没有了。
    但你的车只能做一个人,你会如何选择呢?请解释一下你的理由。
    在你看下面的话之前仔细考虑一下。
    我不知道这是不是一个对你性格的测试,因为每一个回答都有他自己的原因。
    老人快要死了,你首先应该先救他。
    然而,每个老人最后都只能把死作为他们的终点站,你先让那个医生上车,因为他救过你,你认为这是个好机会报答他。
    同时有些人认为一样可以在将来某个时候去报答他,但是你一旦错过了这个机会,你可能永远不能遇到一个让你这么心动的人了。


    在200个应征者中,只有一个人被雇佣了说了以下的话



















    最好的答案(请选中下面的文字看):
    在200个应征者中,只有一个人被雇佣了,他并没有解释他的理由,他只是说了以下的话:
    “给医生车钥匙,让他带着老人去医院,而我则留下来陪我的梦中情人一起等公车!”
    每个我认识的人都认为以上的回答是最好的,但没有一个人(包括我在内)一开始就会想到。
    是否是因为我们从未想过要放弃我们手中已经拥有的优势(车钥匙)?有时,如果我们能放弃一些我们的固执,狭隘和优势的话,我们可能会得到更多。
  • IT从业人员必看的10个论坛

    2006-12-19 20:32:43

    IT方面的论坛太多了,有综合,有专业,有行业,在各个论坛里混了几年,体会颇深,以前是论坛哪里人多,往哪里去,新浪论坛,网易是经常去的,人多啊,好几十万,去了以后才发现没有意思,没有共同的语言,于是逛专业论坛,行业论坛,终于找到了共同语言,总结一下论坛的经验:人不在多,有仙则灵,贴不在多,有精则行,逛了大半辈子,一个IT人发展方向一定要除了技术外,业务,理论,思想一个都不能少,于是我推荐如下这些论坛,或许真能帮助您,做论坛,都是赔本的买卖,不收费还帮助你学习,得向斑竹们致敬啊。
      
      以下论坛排名不分先后,还有许多业界知名的论坛,主要有点偏门,这个不做概述,呵呵。
      
      IT技术开发综合类
      http://community.csdn.net/
      适合人群:只适合软件开发者
      技术开发最全面的论坛,里面可以遇到很多牛人,版面也很全,什么J2EE,.NET啊,该有的全上,在这里基本上可以提出任何问题,人气也是最旺的,不过一般提出的意见都有正方两面的,所以最终解决问题,还是靠自己。
      评价:专业,很牛逼,就是速度慢。
      
      http://www.52rd.com/bbs
      适合人群:研发人员
      我爱研发网,顾名思义,是针对R&D研发人员的,目前在射频,通信,手机研发是国内第一的,牛人不少,问题讨论的很彻底。论坛制度很人性化,设有资料交换区,有超大量有价值的资料。
      评价:强,速度还可以;
      
      http://bbs.chinaunix.net/forum/
      适合人员:系统工程师
      这里的特色就是操作系统方面在业界是最著名的,牛人不少,目前,在数据库,网络方面也颇有建树,当然灌水方面也不赖,呵呵,属于温柔性
      评价:强,速度还可以
      
      http://bbs.chinajavaworld.com/
      适合人员:JAVA开发
      JAVA方面非常综合的论坛了,牛人也很多,是一个难得的JAVA论坛,涉及你想象的关于JAVA目前任何技术。
      评论:强,速度还可以。

      电子工程师类
      http://21icbbs.com/
      适合人员:电子工程师
      人气不错,覆盖面比较广,老牌了,就是有点和时代脱节了,无论是设计上还是内容上
      评论:强,速度还可以

      http://www.eetchina.com/DG/eec_dg_home.htm
      适合人员:电子工程师
      环球资源的子站,页面设计很大气,技术文章也比较及时和权威,是个难得的好网
      评论:强,速度还可以
      
      网络工程类
      www.1000bbs.com
      适合人员:布线/网络工程师
      人气很旺,特色是版面比较紧凑,综合布线这一块很权威,很窄很专,时间非常久了,颜色比较明快,就是太低端了,
      评价:不错,速度一般
      
      http://www.sharecenter.net/
      适合人员:网络工程师
      之所以我喜欢是这个网站很多做CISCO工程都知道,也是别人介绍我去的,时间非常久了,颜色比较暗谈,属于忧郁型。
      评价:不错,速度也还可以
      
      IT营销管理类
      http://www.topren.net/forum/index.php
      适合人员:企业策划,CIO
      业界知名的知识站点“唐人社区”,信息化管理顾问可以去看看,人也很多,可惜,都是下载,实质性内容需要改观,我记得是非常专业的网站。
      评价:不错,速度也还可以。
      
      IT管理综合类
      http://club.amteam.org/
      适合人群:大多数,
      评论类比较多,基本上在其他媒体上看到的评论,这里都会有,要想了解IT发展的情况,就来这里看看。
      评价:很好,休闲工作都可以看。


    测试者家园 2006-11-15 13:16 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2006/11/15/560989.html
  • 小笑话

    2006-12-19 20:32:43

    抽象画

    向美术教师交作业时,一位学生只交了一张白纸。
    老师问:"画呢?"
    学生答:"这儿?"他指着白纸说。
    老师:"你画的是什么?"
    学生:"牛吃草。"
    老师:"草呢?"
    学生:"牛吃光了。"
    老师:"牛呢?"
    学生:"草吃光了,牛还站在那里干什么?"

    惯性

      惯性实例物理老师在讲惯性这一课,一个学生在下面讲废话。
    老师暗示了他一眼,可他仍我行我素。老师:我刚才讲了什么内容?
    学生:惯性
    老师:请你举个实例
    学生:刚才我在下面讲话,虽然您暗示了我一眼,但我没法马上停
    住,这就是惯性。

    上课睡觉

    某生上课时睡觉,被老师发现。
    老师:你为什么在上课时睡觉?
    某生:我没睡觉哇!
    老师:那你为什么闭上眼睛?
    某生:我在闭目沉思!
    老师:那你为什么直点头?
    某生:您刚才讲得很有道理!
    老师:那你为什么直流口水?
    某生:老师您说得津津有味!

    教授的不同

      在一所大学的操场上,政治学教授、哲学教授和语言学教授围着一
    根旗杆。数学教授走过来,问:“先生们在忙什么?”“我们需要这旗
    杆的高度,正在讨论用什么手段得到它。”政治学教授说。“瞧我的!
    ”数学教授说着,弯下腰抱紧旗杆使劲一拔,把旗杆拔出后,放倒在地,
    拿出卷尺量了量,“正好五米五”说完便把旗杆插回原地,走了。“这
    人!”语言学教授望着他离去的背影轻蔑地说,“我们要的是高度,他
    却给了我们长度,瞎添乱!”

    难题

      难题电脑课上,心不在焉的卢卡被教授点名提问。“为什么不
    回答,卢卡,我提出的问题很难吗?”“噢,不,先生。你的问题
    我完全懂,是答案把我难住了。”

    理由

      父亲:"皮埃罗,今天不要去上课了。昨晚,妈妈给你生
    了两个小弟弟。"“明天,你给老师解释一下就是了。”
      儿子:“爸爸,明天我只说生了一个,另一个,我想留着
    下星期不想上学时再说。”

    测试者家园 2006-11-22 11:20 发表评论


    Link URL: http://www.cnblogs.com/tester2test/archive/2006/11/22/568428.html
Open Toolbar