Micro Focus QTP (UFT) Forums
How to Build Your QTP Scripts? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to Build Your QTP Scripts? (/Thread-How-to-Build-Your-QTP-Scripts)



How to Build Your QTP Scripts? - Vilkas1 - 08-27-2009

Hello,

I have a basic question about QTP scripting.
My question is what is the ideal order in which to build your script?

It seems to me that you could record your script and then break it down into actions, while copying the VBScript found in the Expert view, and then associate the object repositories. On the other hand you could build a skeleton composed of your actions and then your associated object repositories and then record the code for each or the actions (or do the recording first and then the object repository associations).

So, which is the ideal? Which is the most common? And what are the pitfalls or advantages of each method?

Your comments are much appreciated.

From the documentation it seems that the traditional way is that you add the Actions, then add the object repositories, associate the object repositiories, and then add your steps. After all this you do and then you add your enhancements of checkpoints, parameterization, and functions, etc. Is this the way to do it most of the time? Is this the best way?

Thank you,
Brian


RE: How to Build Your QTP Scripts? - Saket - 08-27-2009

This can be implemented based on
1. the requirements of Application Under Test.
2. experience of the automation developer
3. Time and budget
so on..
In my opinion - first thing we should take in concideration is the AUT and the designing the test cases, depeding on these we can devide the test in suitable different Actions i.e. Reusable , Prepare and associate the repository to the actions and proceed with designing the reusables covering all possible test scenarios for particular action. finally all the actions can be assembled in a test to cover the whole scenario.

I think this is the best way to proceed with QTP scripting, although we can do this by any convenient method, we have some nice articles on this see at https://www.learnqtp.com/