Covid-19 Update!!    We have enabled all courses through virtual classroom facility using Skype or Zoom.    Don't stop learning.    Enjoy Learning from Home.

30% Discount Python        30% Discount Webdesign        30% Discount SEO        30% Discount Angular8        Free SQL Class        Free Agile Workshop       Free HTML Sessions        Free Python Basics

Important QTP UFT Testing Interview Questions and Answers

QTP Interview Questions and Answers

1. What is action split and the purpose of using this in QTP?

Action split is to separate an existing action into two parts. The purpose is to separate actions based on their functionality to develop code re-use.

2. Explain how QTP identifies object?

QTP recognise any GUI Object based on its corresponding properties. While recording, QTP will identify and store peculiar properties (as defined in the Object Identification settings) in the object repository of the GUI object. At run-time, QTP will compare the stored property values with the on-screen properties, to a way that belongs to identify the GUI object.

3. How many types of recording modes in QTP? Which will be used when?

QTP supports 3 types of recording modes:
  • Normal mode also called Contextual.
  • Low-level recording mode.
  • Analog mode.
    Normal Mode: It is the default recording mode and takes full advantage of QTP's Test Object Model. It recognizes objects regardless of their position on -screen. This is the preferred mode of recoding and is used for most of the automation activities.
    Low-level recording mode: This mode records the exact x,y co-ordinates of your mouse operations. It is helpful in testing hashmaps. It is useful for recording objects not recognize by normal mode of QTP.
    Analog mode: This mode records exact mouse and keyboard "movements" you execute in relation to the screen / application window. This mode is useful for the operation such as drawing a picture, recording signature, pull and drop operations.

    4. Explain the keyword CreateObject with an example.

    Creates and returns a reference to an Automation object
    SYNTAX: CreateObject(servername.typename [, location])Arguments
    servername: Required. The name of the application providing the object.
    typename : Required. The type or class of the object to create.
    Location: Optional. The name of the network server where the object is to be created.
    Example: Set IE = CreateObject("InternetExplorer.Application")

    5. What is ‘Object Spy’ and what is the function of object spy in QTP?

    ‘Object Spy’ is a characteristic in QTP by using which we can view both the test and run time object properties and methods.

    6. What is the use of Text output value in QTP?

    Text Output values permit you to capture text seen on the application under test during run-time.If parameterized, text output values will capture values appearing in each iteration which would be stored in the run-time data table for further analysis.

    7. What is Step Generator?

    Step Generator enables use to Add Test Steps in your script. Using step generator you can add steps to your script without actually recording it.

    8. What is the Difference between Bitmap Check point & Image Check point?

    Bitmap checkpoint perform a pixel to pixel comparison of an image or part. Image checkpoint perform do a pixel to pixel comparison but instead compare image properties like alt text, destination url etc.

    9. What is the difference between functions and actions in QTP?

    Actions have their own Object Repository & Data Table. Actions assist to your Test modular and improve reuse. Example: You can divide your script into Actions based on functionality like Login, Logout etc.
    Functions is a VB Script programming idea and do not have own Object Repository or Data Table. Functions assist in re-use of your code. Ex: You can create a Function in your script to concatenate two strings.

    10. What is QTP batch testing tool?

    You can use the Batch testing tool to run multiple scripts. Once the scripts are added in the tool, it will automatically open the scripts and start executing them one after the other.

    11. How would you export a Script from one PC to another in QTP?

    By "Generate Script" function present in Object reorganization, Test Settings and Tools/Options tab to create a zip of the script at the source computer. These zip files then can be imported into QTP at the targeted computer.

    12. What is descriptive programming in UFT means?

    Descriptive programming involves property name and property value, when UFT is facing problem in recognizing objects from object repository and instead the object is directly recognized from the script is known as descriptive programming.

    13. How to add synchronisation points in QTP?

    Synchronisation of QTP points are add through the following four ways
  • Wait statement: This statement will pause the performance for x seconds until object comes up
  • Wait property: This method will wait until property of object takes particular value
  • Exist statement: This statement will wait until object becomes available
  • Sync method: The code will wait until browser page is completely loaded and this method is used for web application testing.

    14. Mention what are the different types of recording modes in QTP? Which will be used when?

    QTP supports 3 types of recording modes
  • Normal mode: It is the default recording mode and used for most of the automation activities. Anyhow the position on screen it recognizes objects.
  • Low level recording mode: It is useful for recording objects not identified by normal mode of QTP. It records the exact x, y coordinates of your mouse operations.
  • Analog mode: This mode is useful for the operation such as recording signature, drawing a picture, drag and drop operation.

    15. How to find array size in QTP?

    To find the size of an array the following code is used.
  • Print (ubound(arr)+1)
  • Ubound returns the last index in array- so size of array will be +1