Automating Using QTP Day1

Automation Testing using QTP  with Flight.exe needs to be understood at its very basic level to take this to an unexplorable level. Generally , any trainer expects us to be well equipped with the very basic features of QTP and we feel that the best application to start with is the application that is shipped by default with the QTP software the Filght.exe application. This application is a window based application and has with associated all the features that can be used to an optimum level in order to explore the features of QTP .

Automation of a window based application though has some intrinsic differences with respect to others such as Web based application, or peoplesoft application, SAP applications.

But the very basic thing that needs to be concerned upon is that  we will be able to explore all of the basic and more important features of the QTP, as well as how to use them effectively as per the business requirement.

To start with we can just open the sample flight.exe application and just record the login feature and then book a flight ticket for one person by entering the relevant date details as well as the flight boarding details.

On having recorded the complete scenario we stop recording and then one by one we shall explore several features that can be brought to our use and hence know more about toll's overall features.

So to start with, we will keep that very folder open wherein we have out QTP set up installed, under that directory, we have another sub-directory called Samples. Go into that directory and search for the Flight3.exe application. Donot open it now.
Go into the QTP IDE and click the Red Coloured button from the toolbar for starting with the Record Button clicking. Now, just go into the flight.exe file and double click it.  Do all the steps as are expected to be done in the application for booking a ticket. Once you are done with ticket booking, Check for the confirmation message stating the confirmed ticket booking status. Now, you can stop recording by clicking the stop record button. In the QTP IDE we can see some set of codes getting generated and it generally is called the Expert View that loads defaut, however there is a yet another tab beside the Expert View called the Keyword View, which is more easy to understand in common language terms.
The expert view reflects the lines of code that get generated for the sequence of actions performed during the course of recording, and the same set of code when executed in the same environment which was used during record time will be capable of generating the Replicated behavior of the Application Under Test that is our Flight.exe. The coding language used is VBSCript and in the Keyword View it is the Hierarchial view of the complete sequence of action that has been recorded. Now what we can explore in next session is how to explore more into the same.

For the time being you can just give Run button click and visualise the behavior of the QTP and the Flight.exe application to get some idea on how scripts automate manual behavior.


Post a Comment