Automated testing tool QTP (Quick Test Professional)

Automated testing is performed by using automation tool which is able to playback pre-recorded scripts and predefined actions to compare the results to the expected output to report pass or fail. Once automated tests are created they can be used to retest the application again.

What is QTP?

QTP is an automated functional Graphical User Interface testing tool that allows the automation of user events on an application. It uses VB Scripting language to specify the test procedure, and to direct the objects and controls of the application. It works by identifying the objects in the application and performing the desired operations on them, it can also be used to capture object properties like name or Text ID etc.  Framework of QTP is designed mainly for Windows and Web-based applications. QTP is primarily used for regression testing.

Few distinct advantages QTP offers over other testing tools:

  • QTP uses VB scripting language which is more user friendly and easy to understand.
  • Better Support for VB, Java based applications due to inbuilt add-ins.
  • Able to split a single test into various actions for making debugging easier and better maintainability.
  • Enhancement of existing QTP scripts without the application being available; by using the Active Screen.
  • Ability to set up Property Recognition Order and prioritization using Object Identification menu.
  • Working with Object Repository in terms of Object Repository Comparison, Exporting Local objects, etc. in advance manner.
  • Easy integration of external function files in terms of creating Libraries.

Basic settings that need to be done in QTP before recording test scripts are:

  1. Open a blank QTP script with appropriate Add-ins.
  2. Navigate to Automation->Record and Run settings.
  3. Under Web tab select the First radio button which states “Record and run test on any open browser”.
  4. Click on Window Applications tab and select the First Radio button which states “Record and run test on any open Windows-based application”.
  5. Click on Apply button and then click on OK button.
  6. Navigate to File->Settings.
  7. Select Run on left side window.
  8. Under Data Table iterations select the first radio button which states “Run one iteration only”.
  9. Enter ’60’ in Object synchronization timeout field.
  10. Select both the check boxes which states “Disable Smart Identification during the run session” and “Save image of desktop when error occurs”.
  11. Click on Apply button and then click on OK button.

What is Keyword View and Expert View in QTP?

Keyword View: In keyword view actions which are performed by the user are shown in tree format along with the input data. Window and object details are also shown.

Expert View: In expert view script which is automatically generated by QTP in VBScript language during recording is displayed. Any changes made in the Expert View are automatically synchronized with the Keyword View.

In our next blog we will discuss about the three types of recordings (Normal, Analog and Low-Level) and also the different types of checkpoints used in QTP.

This entry was posted in Quality Assurance & Testing and tagged , , , . Bookmark the permalink.

Leave a Reply