Results 1 to 3 of 3

Thread: Manual VB script in QTP

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    2

    Manual VB script in QTP

    Would you tell me how to write the VB script manually for a sample application ,because we can not understand the need of learning VB script rather using recording option in QTP?

    What is the need of learning VB script for automation test engineer(QTP) and what are the applications of VB script in automation testing?

    Show me the differences between writing an application in vb script manually and recording it in QTP with same example ?

    Which one is better one and why?

    Up to how much VB scripting and what type of VB script knowledge is required for a QTP test engineer?


  2. #2
    Expert Member
    Join Date
    Jan 2007
    Answers
    211

    Re: Manual VB script in QTP

    Follwing are needs of vbscript for qtp automation. 1. Automation is guided by the record & playback tool like qtp, but there are limitations of the tool itself. 2. Checkpoints are one of the inbuilt feature of qtp that can be used and lot of manual vbscripting can be compromised, but at the same time qtp checkpoints do consume a lot of memory. You can go for the roproperty there vbscript comes to picture. 3. At times there are runtime validations on some rare controls (e.g. Webtable). ....where data needs to be parsed and then validated...vbscript not feasible by the recording feature. 4. Function libraries that are built using vbscript can be used adn aviod a lot of coding in the script. 5. Looping logics that are used against array of controls are guided by vbscript. 6. Efficient descriptive programming for fragile controls...vbscript. 7. If..then....else..........vbscript. 8. Numerical/string operations...vbscript. Well any automation tool if only recorded might not produce the best of validations, hence we use the assoicated language to achive optimal result. I hope experts would like to add details to the same. Regards, nawab


  3. #3
    Contributing Member
    Join Date
    Nov 2007
    Answers
    48

    Re: Manual VB script in QTP

    Hi.

    Reason 1:
    If you have segments of code that you need to use several times in your tests, you may want to create a user-defined function. A user-defined function encapsulates an activity (or a group of steps that require programming) into a keyword (also called an operation). By using user-defined functions, your tests are shorter, and easier to design, read, and maintain. A function library is a Visual Basic script containing VBscript functions, subroutines, modules, and so forth.

    Reason 2
    Some time you need to record particular step in the application in the middle of some script. In this case what you will do if you are following Recording Paradigm, you will definately open the application then bring the application at required state and then perform recording. Though you can do it through recording but it is a time consuming process. However you can do it if through VB scripting in a seconds if you have required Objects resides in Objcet Repositry.

    SYCHO
    Certified HP QuickTest Professional 9.2



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact