Monday, February 23, 2009

QTP Q&A



1.Explain in brief about the QTP automation object model

The test object model is a large set of object types or classes that QTP uses to represent the objects in our application. Each test object has a list of properties that can uniquely identify objects of that class

2.What is a Run-Time data table?

The test results tree also includes the table-shaped icon that displays the run-time data table-a table that shows the values used to run a test containing data table parameters or the data table output values retrieved from a application under test

3.What are all the components of QTP test script?

QTP test script is a combination of VB script statements and statements that use QuickTest test objects ,methods and properties

4. What is test object?

Its an object that QTP uses to represent an object in our application. Each test object has one or more methods and properties that we can use to perform operations and retrieve values for that object. Each object also has a number of identification properties that can describe the object.

5.What are all the rules and guidelines want to be followed while working in expert view?

Case-sensitivity:
VB script is not case sensitive and does not differentiate between upper case and lower case spelling of words.
Text strings:
When we enter value as a string, that time we must add quotation marks before and after the string
Variables:
We can use variables to store strings,integers,arrays and objects. Using variables helps to make our script more readable and flexible.
Parentheses:
To achieve the desired result and to avoid the errors,it is important that we use parentheses() correctly in our statements.
Comments:
We can add comments to our statements using apostrophe(’),either at a beginning of the separate line or at the end of a statement
Spaces:
We can add extra blank spaces to our script to improve clarity. These spaces are ignored by the VB script

6. Mention the types of recording available in QTP?

QTP provides three types of recording methods:

* Context Recording (Normal)
* Analog Recording
* Low Level Recording

7. What are the different scripting languages you could use when working with QTP ?

You can write your QTP automation programs in any Languages and development environment that supports automation. For example: you can use: VBScript,javaScript,Visual Basic,Visual C++, or Visual Studioi.Net

8. What is the file extension of the code file & object repository file in QTP?

Extension of code file in QTP is - .mts Local Object Repository Extension is - .mtr Shared Object Repository Extension Is - .tsr

9. How to handle the exceptions using recovery secnario manager in Qtp?

You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run.Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps

1. Triggered Events
2. Recovery steps
3. Post Recovery Test-Run

10. What is Parameterizing Tests?

When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.

11. Explain the check points in QTP?

A checkpoint verifies that expected information is displayed in a Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP.

• A page checkpoint checks the characteristics of a Application
• A text checkpoint checks that a text string is displayed in the appropriate place on a Application.
• An object checkpoint (Standard) checks the values of an object on a Application.
• An image checkpoint checks the values of an image on a Application.
• A table checkpoint checks information within a table on a Application
• An Accessiblity checkpoint checks the web page for Section 508 compliance.
• An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application.
• A database checkpoint checks the contents of databases accessed by your web site

12. Explain the concept of how QTP identifies object.?

During recording qtp looks at the object and stores it as test object.For each test object QT learns a set of default properties called mandatory properties,and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run,QT searches for the run time obkects that matches with the test object it learned while recording.

13. Explain QTP Testing process?

The QuickTest testing process consists of 7 main phases:


1.Preparing to record Before you record a test, confirm that your application and QuickTest are set to match the needs of your test. Make sure your application displays elements on which you want to record, such as a toolbar or a special window pane,

for example, and that your application options are set as you expect for the purposes of your test. You should also view the settings in the Test Settings dialog box (Test > Settings) and the Options dialog box (Tools > Options) to ensure that QuickTest will record and store information appropriately.

For example, you should confirm that the test is set to use the appropriate object repository mode.

2.Recording a session on your application As you navigate through your application or Web site, QuickTest graphically displays each step you perform as a row in the Keyword View. A step is any user action that causes or makes a change in your application, such as clicking a link or image, or entering data in a form.

3.Enhancing your test Inserting checkpoints into your test lets you search for a specific value of a page, object, or text string, which helps you determine whether your application or site is functioning correctly.

4.Broadening the scope of your test, by replacing fixed values with parameters, lets you check how your application performs the same operations with multiple sets of data.

5.Adding logic and conditional or loop statements enables you to add sophisticated checks to your test.

6.Debugging your test You debug a test to ensure that it operates smoothly and without interruption.

7.Running your test You run a test to check the behavior of your application or Web site. While running, QuickTest opens the application, or connects to the Web site, and performs each step in your test.

8.Analyzing the test results You examine the test results to pinpoint defects in your application.

9.Reporting defects If you have Quality Center installed, you can report the defects you discover to a database. Quality Center is Mercury Interactive's software test management tool.

14. What is the use of Recovery Scenario Manager in QTP?

The Recovery Scenario Manager provides a wizard that guides you through the process of defining a recovery scenario—a definition of an unexpected event and the operation(s) necessary to recover the run session. For example, you can instruct QuickTest to detect a Printer out of paper message and recover the run session by clicking the OK button to close the message and continue the test or component.

15. What is the use of Text output value in Qtp?

Output values enable to view the values that the application talkes during run time.When paramaterised, the values change for each iteration.Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.

No comments: