• RSS
  • Facebook
  • Twitter

One Center for all the Testing Need. OneTestingCenter is for all, for all QA, for all Automation. Automation is easy, fun and enriching experience. Happy Learning and Happy Testing!

  • Access to All QA

    At OneTestingCenter, you find lots of books,articles,blogs and detailed guides. Everyone has access to QA. Happy Learning, Happy Testing.

  • Global Trainings

    All the QA/Auotmation trainings are available at OneTestingCenter. QA, Automation, QTP/UFT, Selenium, LoadRunner, QC/ALM, Appium...

  • Automation Learning Fun

    Technology is always evolving. Automation is always challenging. To be frank, Automation is fun, enthusiastic and enrching experience.


    QTP - Overview


    Overview

    The latest version of QTP / UFT is 11.51

    QTP is a UI automation tool designed for Windows and Web-based and enterprise applications testing.
    It works by identifying the objects in the application UI or a web page and performing the desired operations on them (like mouse clicks or keyboard events); it can also be used to capture object properties like object name or handler ID , height, width etc.

    One of the most important topics in QTP is Object Identification.
    QTP uses VBScript as scripting language to specify the test procedure and to manipulate the objects and controls of the application under test (AUT)

    Though QTP is usually used for Functional / “UI Based” Test Case Automation, it can easily handle “Non-UI” based Test Cases. (Example: API testingDatabase testingetc.)

    Some of the key features of QTP are:

    Introduction to QTP
    o   Was  a Mercury Interactive Test tool
    o   Now, HP - Automation Test Tool
    o   The Latest version of QTP is called as UFT – UnifiedFunctional Testing.
    o   Functional test tool
    o   Regression test tool
    o   Supports Stand alone, Web based and Client Server Apps
    o   Supports One tier / Two tier / Three tier  / N-tier Apps
    o   Designed to provide a robust  application verification
    o   Simple and easy to use and implement
    o   As simple as a Tape recorder
    o   Best at even record and play back
    o   Can be utilized at advanced level (coding, objects creation)
    o   Supports COM/DCOM/DOM/AOM
    o   Different Environments supported (Java, .NET, SAP…)
    o   Add ins available for other environment supports
    o   “Quick Test Professional” popularly called as QTP, originally from a company known as Mercury Interactive, which was acquired by Hewlett Packard (HP) in 2006 and is now HP’s QuickTest Professional
    o   The Latest version of QTP is called as UFT – Unified Functional Testing.
    o   QTP is primarily used for functional and regression automated testing.
    o   QTP can automate user actions on a window; web or client based computer application and tests the same actions for different users, and different data sets on various windows operating systems and on different browsers.
    o   It’s an easy tool to lean and implement automation testing.
    o   Automation using QTP saves lot of time, efforts, resources, and budget.
    o   It is as simple as a Tape recorder to record and playback test scripts
    o   Quick Test Professional can be utilized at advance level coding and object creation and also support COM/DCOM/DOM/AOM.
    o   QTP supports different environments like Java, .Net, SAP, Web, Windows and so on.


    Add-ins / Plug-ins

    Add-ins / Plug-ins are used to make recording more acceptable to a specific application.
    We use web plug-ins to automate test cases with respect to web applications.
    QTP has default plug-ins for ActiveX controlsweb applications and VB objects.
    Plug-ins for other objects, such as Microsoft .NET objects, JAVA, SAP, Oracle applications are also available.
    Multimedia plug-ins and a plug-in for Windows Mobile are also available.

    In general, QTP plug-in is available to identify corresponding application and thus support that application recording and script design. 


    There are four types of licenses are available from HP:
    1. Demo License: a 30-day demo license
    2. Seat License: A permanent seat (Machine locking code) license that is specific to the computer on which QTP is installed.
    3. Floating (Concurrent): Floating allows a license to be shared between machines at any given point in time. (1 floating license allows QTP to be accessible from an entire lab’s worth of PCs but can only have 1 instance running at any given point in time).
    Commuter License:
    A commuter license is also a type of concurrent license that can avail during the unavailability concurrent license server. If you are going on a business trip and not able connect to the concurrent license server then you can ask administrator to install commuter license. A commuter license is a concurrent license that works like a seat license for a specific period.
    If you have configured 5 concurrent licenses and if you want to configure a commuter license for a person’s onsite business trip then from that time onwards you should work with 4 concurrent licenses till the specified configured period of commuter license. The Commuter license validity is up to 180 days.
    You can change your license type at any time (as long as you are logged in with administrator permissions on your computer). For example, if you are currently working with a seat license, you can choose to connect to a concurrent license server, if one is available on your network.

    Record and Playback

    Initial development of automated tests with QTP is usually done by record-and-playback.
    User actions are captured via QTP’s Record and Playbackmechanism.

    User actions/ tests are recorded into Actions, a kind of subroutine, as VBScript commands. All manipulated objects that QTP recognizes are also added to the 
    Once recorded, the scripts are editable in either Keyword View or Expert View.
    After clicking on the playback button all these actions will be played back on the application;
    During playback, QTP attempts to identify and perform operations on the same objects, again using stored objects information from its Object Repository.


    Check point is a condition to differentiate between expected and actual states / results
    Checkpoint is a verification point that compares a current value for a specified property with the expected value for that property.
    Checkpoint enables you to identify whether your Web site or application is functioning correctly.

    Checkpoints are a feature used for verifying the application under test. One can add a checkpoint to check if a particular object, text or a bitmap is present in the application during execution time.

    In short, checkpoints are used to verify that during the course of test execution, the actual application behavior or state is consistent with the expected application behavior or state.

    There are 10 types of checkpoints available in QTP:
    1. Standard Checkpoint — Checks the properties of an object.
    2. Table Checkpoint — A Standard Checkpoint that checks the properties of a table.
    3. Image Checkpoint — A Standard Checkpoint that checks the properties of an image.
    4. Bitmap Checkpoint — Compares an area of the application under test pixel-for-pixel with the screen as seen at record-time.
    5. Database Checkpoint — Used to automate back-end testing.
    6. Text Checkpoint — Checks that a section of text is found between two other sections of text.
    7. Text Area Checkpoint
    8. Page Checkpoint — Checks the properties of a web page.
    9. Accessibility Checkpoint — Checks the accessibility of an application.
    10. XML Checkpoint

    The QTP’s  Reporter.ReportEvent  utility would be used  to output results of the checkpoints used in tests.


           Recovery Scenario Manager is a mechanism that helps to deal the unexpected events, errors, and application crashes during a run session
           The Recovery Scenario Manager Dialog box enables to create recovery scenarios and save them in recovery files.
           We can create recovery scenarios using the Recovery Scenario Wizard, which leads through the process of defining each of the stages of the recovery scenario.
           We then save the recovery scenarios in a recovery file, and associate them with specific tests or components.

    o   Recovery is the name for exception handling in QTP, with the goal of enabling the tests to continue to run if an unexpected failure occurs. For instance if an application crash occurs and a message dialog appears, QTP can be instructed to attempt to restart the application and continue with the rest of the test cases from there

    o   Unexpected events, errors, and application crashes during a run session can disrupt your run session and distort results.
    o   This is a problem particularly when running tests or components unattended—the test or component is suspended until you perform the operation needed to recover.

    o   So…..Here comes the mechanism to deal such scenarios called Recovery Scenario manager


    Output Value

    o   This feature is used to store the run-time values/data that are displayed in the application into the run-time data table, so that we can use these run-time values in the script for further use.

    o   Output Values are those which are reverse of check points
    o   Output values are used to capture and to display AUT- Objects properties at run-time
    o   Output values are very similar to GetROProperty but then there are three differences between them
    o   Output Values
    o   Output values can be used to retrieve more than one property of an object
    o   Output values use Data Tables to show/display the captured AUT-Objects properties
    o   Output values directly work AUT-Objects at run-time 

    o   Say we need the value which is dynamically created or processed by application for later use, we can go for output concept. We can follow the following example to understand. If the application produces an id for the person and we need that id, that can be solved using output concept, where we store value ‘id’ of that person in the data table and we can refer to that value later. 


    The data table is an in-built utility / table in QTP, primarily used to manipulate data-driven testing.
    It is implemented as a Microsoft Excel workbook that can be accessed from within QTP. There are two types of Data Tables available in QTP: the Global data sheet and the local data sheets.
    The Global data sheet is a single sheet which is accessible from every Action in a test. By default, each row of this sheet specifies the values to be used in an iteration of the entire test. The data table can be managed by other third party tools such as Grid Tools Data maker, which offers features such as Data inheritance; substitution variables and version control.
    The local data sheet is associated with each Action. As the Global data sheet specifies iterations of an entire test, these sheets are often used to set up iterations of a single Action. The data in these sheets can only be accessed from their associated Action. While it is possible to access a different Action’s local data sheet, it cannot be done from the Object Repository or from inside a checkpoint.

    Virtual Objects

    Complex objects may not be recognized properly by QTP. The Virtual Object concept was implemented to enable users to add some degree of support for these objects. If an object is not recorded out-of-the-box, an experienced user may be able to define that object as a personal virtual object and build a virtual object repository. Assuming that the required information can be extracted from the object, this allows the users to successfully record and playback against that object. In practice, this is not always possible.

    Transactions

    This feature can be used to calculate the time required to run a particular test or particular steps in the tests. Transactions are most often used in automated software performance testing, so they are infrequently used in QTP(Quick test Professional)


    QTP generates the result file for the test cases at the end of test in the form of XML tree. The result file provides detail regarding PASS and FAILS counts, error messages, and potentially supporting information that allows users to determine the underlying cause of a failure. 


    User Interface

    QuickTest provides two main views of a script: Keyword View and Expert View. They are selected from tabs at the bottom of the QuickTest Professional window.

    Keyword View

    Keyword View is QTP’s default test procedure interface. It displays the automation steps of a test procedure as a descriptive tree of Actions and functions. The tree contains columns listing the Action or function name, any parameters, and comments. This mode is most useful for the beginners in operating with the tool. This view allows the user to select the objects either from the application or from the Object Repository and the user can select the methods to be performed on those objects. The script is automatically generated. Users can also set check points from keyword view.
      
    Expert View

    In Expert View, QTP allows display and editing of the a test’s source code. All test actions can be edited here except for the root Global action. Expert View acts as an IDE for the test. It includes most standard IDE features, such as breakpoints. This view is most suitable for the advanced users, enabling them to customize the test, such as by writing user-defined functions.

    Languages
    Supports VB Script. Supports classes but not supports polymorphism and inheritance.


    Reactions:

    QTP Overview


    QTP - Overview


    Overview

    The latest version of QTP / UFT is 11.51

    QTP is a UI automation tool designed for Windows and Web-based and enterprise applications testing.
    It works by identifying the objects in the application UI or a web page and performing the desired operations on them (like mouse clicks or keyboard events); it can also be used to capture object properties like object name or handler ID , height, width etc.

    One of the most important topics in QTP is Object Identification.
    QTP uses VBScript as scripting language to specify the test procedure and to manipulate the objects and controls of the application under test (AUT)

    Though QTP is usually used for Functional / “UI Based” Test Case Automation, it can easily handle “Non-UI” based Test Cases. (Example: API testingDatabase testingetc.)

    Some of the key features of QTP are:

    Introduction to QTP
    o   Was  a Mercury Interactive Test tool
    o   Now, HP - Automation Test Tool
    o   The Latest version of QTP is called as UFT – UnifiedFunctional Testing.
    o   Functional test tool
    o   Regression test tool
    o   Supports Stand alone, Web based and Client Server Apps
    o   Supports One tier / Two tier / Three tier  / N-tier Apps
    o   Designed to provide a robust  application verification
    o   Simple and easy to use and implement
    o   As simple as a Tape recorder
    o   Best at even record and play back
    o   Can be utilized at advanced level (coding, objects creation)
    o   Supports COM/DCOM/DOM/AOM
    o   Different Environments supported (Java, .NET, SAP…)
    o   Add ins available for other environment supports
    o   “Quick Test Professional” popularly called as QTP, originally from a company known as Mercury Interactive, which was acquired by Hewlett Packard (HP) in 2006 and is now HP’s QuickTest Professional
    o   The Latest version of QTP is called as UFT – Unified Functional Testing.
    o   QTP is primarily used for functional and regression automated testing.
    o   QTP can automate user actions on a window; web or client based computer application and tests the same actions for different users, and different data sets on various windows operating systems and on different browsers.
    o   It’s an easy tool to lean and implement automation testing.
    o   Automation using QTP saves lot of time, efforts, resources, and budget.
    o   It is as simple as a Tape recorder to record and playback test scripts
    o   Quick Test Professional can be utilized at advance level coding and object creation and also support COM/DCOM/DOM/AOM.
    o   QTP supports different environments like Java, .Net, SAP, Web, Windows and so on.


    Add-ins / Plug-ins

    Add-ins / Plug-ins are used to make recording more acceptable to a specific application.
    We use web plug-ins to automate test cases with respect to web applications.
    QTP has default plug-ins for ActiveX controlsweb applications and VB objects.
    Plug-ins for other objects, such as Microsoft .NET objects, JAVA, SAP, Oracle applications are also available.
    Multimedia plug-ins and a plug-in for Windows Mobile are also available.

    In general, QTP plug-in is available to identify corresponding application and thus support that application recording and script design. 


    There are four types of licenses are available from HP:
    1. Demo License: a 30-day demo license
    2. Seat License: A permanent seat (Machine locking code) license that is specific to the computer on which QTP is installed.
    3. Floating (Concurrent): Floating allows a license to be shared between machines at any given point in time. (1 floating license allows QTP to be accessible from an entire lab’s worth of PCs but can only have 1 instance running at any given point in time).
    Commuter License:
    A commuter license is also a type of concurrent license that can avail during the unavailability concurrent license server. If you are going on a business trip and not able connect to the concurrent license server then you can ask administrator to install commuter license. A commuter license is a concurrent license that works like a seat license for a specific period.
    If you have configured 5 concurrent licenses and if you want to configure a commuter license for a person’s onsite business trip then from that time onwards you should work with 4 concurrent licenses till the specified configured period of commuter license. The Commuter license validity is up to 180 days.
    You can change your license type at any time (as long as you are logged in with administrator permissions on your computer). For example, if you are currently working with a seat license, you can choose to connect to a concurrent license server, if one is available on your network.

    Record and Playback

    Initial development of automated tests with QTP is usually done by record-and-playback.
    User actions are captured via QTP’s Record and Playbackmechanism.

    User actions/ tests are recorded into Actions, a kind of subroutine, as VBScript commands. All manipulated objects that QTP recognizes are also added to the 
    Once recorded, the scripts are editable in either Keyword View or Expert View.
    After clicking on the playback button all these actions will be played back on the application;
    During playback, QTP attempts to identify and perform operations on the same objects, again using stored objects information from its Object Repository.


    Check point is a condition to differentiate between expected and actual states / results
    Checkpoint is a verification point that compares a current value for a specified property with the expected value for that property.
    Checkpoint enables you to identify whether your Web site or application is functioning correctly.

    Checkpoints are a feature used for verifying the application under test. One can add a checkpoint to check if a particular object, text or a bitmap is present in the application during execution time.

    In short, checkpoints are used to verify that during the course of test execution, the actual application behavior or state is consistent with the expected application behavior or state.

    There are 10 types of checkpoints available in QTP:
    1. Standard Checkpoint — Checks the properties of an object.
    2. Table Checkpoint — A Standard Checkpoint that checks the properties of a table.
    3. Image Checkpoint — A Standard Checkpoint that checks the properties of an image.
    4. Bitmap Checkpoint — Compares an area of the application under test pixel-for-pixel with the screen as seen at record-time.
    5. Database Checkpoint — Used to automate back-end testing.
    6. Text Checkpoint — Checks that a section of text is found between two other sections of text.
    7. Text Area Checkpoint
    8. Page Checkpoint — Checks the properties of a web page.
    9. Accessibility Checkpoint — Checks the accessibility of an application.
    10. XML Checkpoint

    The QTP’s  Reporter.ReportEvent  utility would be used  to output results of the checkpoints used in tests.


           Recovery Scenario Manager is a mechanism that helps to deal the unexpected events, errors, and application crashes during a run session
           The Recovery Scenario Manager Dialog box enables to create recovery scenarios and save them in recovery files.
           We can create recovery scenarios using the Recovery Scenario Wizard, which leads through the process of defining each of the stages of the recovery scenario.
           We then save the recovery scenarios in a recovery file, and associate them with specific tests or components.

    o   Recovery is the name for exception handling in QTP, with the goal of enabling the tests to continue to run if an unexpected failure occurs. For instance if an application crash occurs and a message dialog appears, QTP can be instructed to attempt to restart the application and continue with the rest of the test cases from there

    o   Unexpected events, errors, and application crashes during a run session can disrupt your run session and distort results.
    o   This is a problem particularly when running tests or components unattended—the test or component is suspended until you perform the operation needed to recover.

    o   So…..Here comes the mechanism to deal such scenarios called Recovery Scenario manager


    Output Value

    o   This feature is used to store the run-time values/data that are displayed in the application into the run-time data table, so that we can use these run-time values in the script for further use.

    o   Output Values are those which are reverse of check points
    o   Output values are used to capture and to display AUT- Objects properties at run-time
    o   Output values are very similar to GetROProperty but then there are three differences between them
    o   Output Values
    o   Output values can be used to retrieve more than one property of an object
    o   Output values use Data Tables to show/display the captured AUT-Objects properties
    o   Output values directly work AUT-Objects at run-time 

    o   Say we need the value which is dynamically created or processed by application for later use, we can go for output concept. We can follow the following example to understand. If the application produces an id for the person and we need that id, that can be solved using output concept, where we store value ‘id’ of that person in the data table and we can refer to that value later. 


    The data table is an in-built utility / table in QTP, primarily used to manipulate data-driven testing.
    It is implemented as a Microsoft Excel workbook that can be accessed from within QTP. There are two types of Data Tables available in QTP: the Global data sheet and the local data sheets.
    The Global data sheet is a single sheet which is accessible from every Action in a test. By default, each row of this sheet specifies the values to be used in an iteration of the entire test. The data table can be managed by other third party tools such as Grid Tools Data maker, which offers features such as Data inheritance; substitution variables and version control.
    The local data sheet is associated with each Action. As the Global data sheet specifies iterations of an entire test, these sheets are often used to set up iterations of a single Action. The data in these sheets can only be accessed from their associated Action. While it is possible to access a different Action’s local data sheet, it cannot be done from the Object Repository or from inside a checkpoint.

    Virtual Objects

    Complex objects may not be recognized properly by QTP. The Virtual Object concept was implemented to enable users to add some degree of support for these objects. If an object is not recorded out-of-the-box, an experienced user may be able to define that object as a personal virtual object and build a virtual object repository. Assuming that the required information can be extracted from the object, this allows the users to successfully record and playback against that object. In practice, this is not always possible.

    Transactions

    This feature can be used to calculate the time required to run a particular test or particular steps in the tests. Transactions are most often used in automated software performance testing, so they are infrequently used in QTP(Quick test Professional)


    QTP generates the result file for the test cases at the end of test in the form of XML tree. The result file provides detail regarding PASS and FAILS counts, error messages, and potentially supporting information that allows users to determine the underlying cause of a failure. 


    User Interface

    QuickTest provides two main views of a script: Keyword View and Expert View. They are selected from tabs at the bottom of the QuickTest Professional window.

    Keyword View

    Keyword View is QTP’s default test procedure interface. It displays the automation steps of a test procedure as a descriptive tree of Actions and functions. The tree contains columns listing the Action or function name, any parameters, and comments. This mode is most useful for the beginners in operating with the tool. This view allows the user to select the objects either from the application or from the Object Repository and the user can select the methods to be performed on those objects. The script is automatically generated. Users can also set check points from keyword view.
      
    Expert View

    In Expert View, QTP allows display and editing of the a test’s source code. All test actions can be edited here except for the root Global action. Expert View acts as an IDE for the test. It includes most standard IDE features, such as breakpoints. This view is most suitable for the advanced users, enabling them to customize the test, such as by writing user-defined functions.

    Languages
    Supports VB Script. Supports classes but not supports polymorphism and inheritance.