An Easy Quicky start to HP's Qucik Test Professional (QTP)

For a long time I have been working on HP's Quick Test Professional abbreviated as QTP which is HP's or Mercury ( HP bought Mercury) product. It is a graphical interface record-playback automation tool used for Automated functional testing for desktop,Web ActiveX controls, and Visual Basic applications. This is a great software and I would be recommending all the testers and Quality assurances to have their hands on this software. You can also Google to find millions of articles based on QTP.

So here today i will be presenting some very basic learning lessons for the newbies which I have experienced so far while using this fabulous,rich and huge automated testing giant (Apologies to the other automated software's, this is purely an individual opinion).

First of all let us have a look at the Interface (The window) and gets familiar.Below is a screen shot depicting the window along with the descriptions.


QTP works on Actions, your activity is recorded or scripted in a default Action namely Action1, you can also rename it and change its properties. That you can do by right clicking on Action1 in the Keyword view and go to Action properties or Action Call properties. I will be discussing both.

Each action is associated with Object repository, that is all the objects that exists in your recording process. Also each object belong to a Class. For all the text box in a web page 'WebEdit' object is used, WebList for the combobox / dropdown, WebRadioGroup for the radio buttons,WebCheckBox for the checkbox, Image for the images, Link for the hyperlinks and so on. Apart from all these individual properties and object QTP treats every element in a web page as a WebElement.
 
There are two ways to automate your work using QTP, both having their own pros and cons but in the end the choice is all yours.
  1. Recording
  2. Descriptive programming
Recording is as simple as the name suggest you just click the red 'Record' button on top and carry on doing your work,in the back end QTP will be recording all your actions. There are also two steps in recording.

Either Record and run test on any open browser. Or Provide the address yourself when recording a session. this somewhat is like hard coding your settings. For example I have two servers for the same application (Web application) If i need to run the script on both servers i will be selecting an open browser setting rather sticking to one provided URL.

Oh the settings can be done by Click on Automation, browse 'Record and Run settings' and a window will be displayed to select your automation criteria.

Moving on further there are also two views available.
  1. the Keyword view and
  2. the Expert view
The first view displays all the actions and commands that are been made,and the expert view displays the code associated with those actions. If you choose to do descriptive programming then that's the place you will be working on. You can also change some basic action setting by going into Expert view, if you have interest in coding :). I personally use Expert view more as i am very much interested in Coding and handling every action properties myself. You will also found a tab name Data Table, an excel like structure. Here you can provide values of your actions.

Well that is a very little introduction of QTP, we will be discussing more in the next post up til then happy knowing and getting familiar with QTP :)

Comments

Popular posts from this blog

All about Dates using QTP

LoadRunner Controller

Working with WebRadioGroup