Since QTP supports external add-ins, it can be used for automating testing of many different software applications and websites.
Some add-ins (e.g ActiveX, VisualBasic, Web) are built-in with QTP, and some other add-ins (e.g Java, .net, TE (terminal emulator))are external add-ins. External add-in means we need to install them separately once after installing QTP.
We have the option to load only the required add-ins when opening the QTP IDE. So, it will be helpful to improve the execution speed.
QTP will support Keyword Driven and Data Driven testing. We can create our own test automation framework (Hybrid framework) also based on our own requirements for test automation.
It is very important to understand how QTP works. Because it will help to learn any other features in QTP easily. And, it will help to design an effective automation framework. It will help to resolve any issue that may come across during automation script development and also during script execution.
It can be explained as below,
We know that every test case should have Test Steps and Expected Results.
As QTP is used for executing these test cases, QTP also should have a way for handling both Test Steps and Expected Results.
Handling Test Steps means, QTP should be capable of navigating any path/page in any website or in any software application.
For achieving this QTP should be able to recognize any control/object in any application/webpage which needs to be tested. For recognizing the object, it should know the properties of those objects beforehand. It is achieved by storing the properties of the objects in a centralized place known as Object Repository.
While running the test script, the objects in the application are identified/recognized by comparing the properties of the objects with the properties stored in the Object Repository. By doing this recognition, execution of Test Steps becomes possible.
QTP is having Datatables (similar to Excel sheet) for supporting execution for multiple iterations of same steps with different data. For example, assume that we need to execute two test cases, one for logging into a website using UPPER case username and another test case for logging into a website using lower case username.
For executing these two test cases, the steps will be same. The only difference is in the test data.
It can be easily done in QTP by putting these input usernames in Datatable and make the Script to execute it two times.
Next, we need to think about handling Expected Results. The purpose of testing is comparing the Actual result with the predefined Expected Results. It is achieved by using Checkpoints.
There are many checkpoints available in QTP. They are Standard Checkpoint, Text Checkpoint, Bitmap Checkpoint, Database Checkpoint, accessibility Checkpoint and XML Checkpoint.
Actually QTP can be used simply as Record and Play type tool for automation of simple steps on simple applications. But it should be extensively used by writing user defined functions and many other features to get more benefit from it.
QTP is not using any Proprietary Script. It uses commonly available VBscript. So, writing script will be simple. And also, vbscript is commonly used in many places such as Web development (ASP), and in windows administration works. So we can easily find lot of already available user-defined functions and help articles in the Internet.
And, QTP supports COM model. i-e Any methods and properties of any COM based application can be easily accessed from QTP. For example IE(Internet Explorer) and Excel Objects can be created within QTP script. i-e IE can be opened from QTP itself using vbscript and the script can navigate to the desired url and mostly it can do whatever we do manually in IE.
This COM support is applicable for QTP itself.
i-e Object of QTP itself can be created and handled. It is known as Automation Object Model. It will be useful for exporting the environment settings and also useful for scheduling the QTP scripts execution.
Basically, QTP is a functional/Regression testing tool. But it can be indirectly used for testing performance also. (i-e QTP scripts can be called from performance testing tool “Load Runner”). And, QTP is having limited performance testing options such as start and end transactions which will be helpful to find execution time for particular block of steps.
QTP can be closely integrated with the Test Management Tool Quality Center (QC). QC can be effectively used to run QTP scripts in multiple remote machines to complete execution of many test scripts in less time.
The user friendly IDE which has Keyword view, Expert view, Datatable, Active screen, object repository editor/manager, step generator, function generator, object highlight feature, intellisense, recovery scenario manager, update run feature and simple Test/Action handling features makes the Script developer/execution work easy. The IDE is integrated with useful tools such as ObjectSpy. The IDE has standard development features such as Debug