Monday, April 23, 2007

Explain the testing process of QTP?

QTP (QuickTest Professional) lets you create tests and business components by recording operations as you perform them in your application.

Test - A compilation of steps organized into one or more actions, which we can use to verify that our application performs as expected. A test is composed of actions (3 kinds of actions are there in QTP Non-reusable action, Reusable action and External action).


First step is Planning

Before starting to build a test, you should plan it and prepare the required infrastructure.

For example, determine the functionality you want to test, short tests that check specific functions of the application or complete site.

Decide how you want to organize your object repositories.


Second step in QTP is Creating Tests or Components

We can create a test or component by

a) Either recording a session on your application or Web site.

As we navigate through the application or site, QuickTest graphically displays each step we perform as a row in the Keyword View. The Documentation column of the Keyword View also displays a description of each step in easy-to-understand sentences. A step is something that causes or makes a change in your site or application, such as clicking a link or image, or submitting a data form.


b) Build an object repository and use these objects to add steps manually in the Keyword View or Expert View. We can then modify your test or component with special testing options and/or with programming statements.


Third step is

Inserting checkpoints into your test or component.

A checkpoint is a verification point that compares a recent value for a specified property with the expected value for that property. This enables you to identify whether the Web site or application is functioning correctly.


Fourth step is

Broaden the scope of your test or component by replacing fixed values with parameters.

To check how your application performs the same operations with different data you can parameterize your test or component.

When you parameterize your test or component, QuickTest substitutes the fixed values in your test or component with parameters

Each run session that uses a different set of parameterized data is called an iteration.

We can also use output values to extract data from our test or component. An output value is a value retrieved during the run session and entered into the Data Table or saved as a variable or a parameter. We can subsequently use this output value as input data in your test or component.

We can use many functional testing features of QuickTest to improve your test or component and/or add programming statements to achieve more complex testing goals.


Fifth step is running the test

After creating test or component, we run it.

Run test or component to check the site or application.

When we run the test or component, QuickTest connects to your Web site or application and performs each operation in a test or component, checking any text strings, objects, or tables you specified. If we parameterized the test with Data Table parameters, QuickTest repeats the test (or specific actions in your test) for each set of data values we defined.

Run the test or component to debug it.

We can control the run session to identify and eliminate defects in the test or component. We can use the

Step Into,

Step Over,

And Step Out

commands to run a test or component step by step.

We can also set breakpoints to pause the test or component at pre-determined points.

We can view the value of variables in the test or component each time it stops at a breakpoint in the Debug Viewer.


Sixth step is analyzing the results

After we run test or component, we can view the results.

➤ View the results in the Results window.

After running the test or component, we can view the results of the run in the Test Results window. We can view a summary of the results as well as a detailed report.

➤ Report defects identified during a run session.

If Quality Center is installed, we can report the defects fond out to a database. We can instruct QuickTest to automatically report each failed step in the test or component, or we can report them manually from the Test Results window.