QTP automation Test Planning

By | April 4, 2010
QTP automation Test Planning:

Hello Friends, Before starting any new project with QTP, Please keep in mind some points so that you can easily accomplish your automation project in minimum time and effort. Today I am going to share my practical experience in Automation project planning with QTP.

1 QTP Test Planning Before Recording:
You can plan your QTP test in following ways but before that you must have Object repository concept clear in you mind:
Way:1– If you have 4 automation developer than, you will have 4 QTP Test projects and in future you need to merge these 4 projects, so try to avoid this methodology because when you merge 4 QTP test projects there will be many objects that can conflict ( Object conflicts means same object name [with same or different properties] in two or more QTP test recorded on different webpages ) and  leads to re-recording and re-working stuffs.

Way:2– Maintain only one Shared object repository accross all QTP Test projects, the only drawback of this way is only one person can do a recording at a time so here all 4 developers will be dependent on each other. Once the recording of one developer is completed He/She can export all objects in shared object repository and then second developer can use that latest shared object repository and can go ahead with his recording stuffs and so on.

Way:3– If you want to avoid each other developers dependency and also If there are more developers than way-2 becomes difficult to manage. When any developers record the object using QTP, QTP automatically gives the object name here in this method developers need to re-name the object (Should be unique) in object repository and same in script thus you can avoid object conflics in future If you plan to merge all QTP Test in one QTP Test project.

2 Recording With QTP:
While recording follow the steps you expect users to perform as they move within your webpage or application.If you are beginner in QTP visit here: QTP Scripts example for beginner

3 Enhance and Modifying your recorded script.

  • Add checkpoints to search for specific values of a page,text string,table or image.
  • You can create output values to retrieve data during run time.
  • You can use regular expressions to increase the flexibility and can avoid redundant script.
  • You can further enhance your test script with programming and conditional and loop statements(If Else…End If, For Loop..etc), which add logic to your test script.
  • You divide your scripts in function and Subroutine so that your script will become more modular and generic.
  • If you want to perform basic operation like File,Folder delete,Create,copy etc. You can perform it through vbscripting. Visit File system object in QTP for more information.

4 Debugging your script with QTP.

  • Debug your test script to check that it operates smoothly and without interruption.You can check the value of variables at run time using debug viewer pane.The Debug Viewer pane contains the Watch, Variables, and Command tabs. Please look in to the QTP help for more information on debugging.
  • Once your script is developed and tested try to put it for regression test as much as you can, In this way you can make your script more stable and reliable. If you want to know more about QTP regression framework you can visit here and can modify the framework according to your requirement.

Please share your practical experience and thoughts so that we together can share our friends best knowledge in the automation test planning in QTP.

If you like this article, You can subscribe through mail.

Leave a Reply

Your email address will not be published. Required fields are marked *