Saturday 16 August 2014

QTP- Quick Test Professional



                                    Introduction:

Testing is done to check whether the developed product works as required.
Testing can be either manual or automated testing. Manual testing has lot of limitations such as wastage of time, lot of human resources and tedious. These problems can be addressed by using automated tools and one such type tool is Quick Test Professional

                                    HP Quick Test Professional

QTP is an automated functional GUI testing tool created by HP.
QTP is used for regression test automation. It uses VB script as the scripting language to specify the test procedure.QTP is based on the principle of identifying the objects in the application UI and performing the desired operations on them.
The functionality of QTP is based on record and playback method.i.e the automated tests are recorded in QTP.the user actions are captured and changed to comprehensible actions using VBScript.The commands are re-executed against the application which is under test when user selects the play button.
To summarize the seven basic steps followed in Quick test Testing are:
a)      Setup before Record :
The application and the quick test should match the need of the test.
b)      Recording a session.
The user action is captured when there is a change in the application such as clicking image or data entry...Etc.
c)      Enhancing the test:
This is done with help of check points, adding loop statements and broadening the      scope.
d)     Debugging the test:
Making sure that the test works as required.
e)      Running the test:
Run the test on the application to check its behavior
f)       Analyzing the test results:
Check the test results and to find the defects if any.
g)      Reports the defects:
Report the defects if any.


Verification by Checkpoints:
            Checkpoints are normally used to verify whether the application under test is working as expected or not. Checkpoints are added to verify whether particular object, text is working correctly or not.
      QTP allows 10 types of checkpoints like bitmap image, text, and data with in table etc.User can also create user defined check points.

Verification by regular Expressions:
Check points are normally used to find the specific object or string where as regular expressions can be used to find out the varying string values. In the regular expression special characters like period (.), caret (^) and asterisk (*) are used to define the search condition


Exception handling in QTP:

Exception handling is used to run the tests if there is an unexpected failure. For example, if the application crashes then a message should appear. Also it should restart the application and continue with test cases following it.
QTP commands:
a)      Activate: To activate current Dialog Box

object. Activate [BUTTON]





b)      CaptureBitmap: To capture screen of the object as a .png or .bmp

object.CaptureBitmapFullFileName, [OverrideExisting]




c) ChildObjects: To return the child objects

object.ChildObjects (pDescription)
           



A Tip to improve script performance:
Sometime the QTP runs faster compared to application or the QTP doesn’t perform its action in particular page since the page is not loaded fully.
            In the above case, do the following settings in IE.
For Fire fox browser, do the following settings




0 comments :

Post a Comment