Thursday, March 20, 2008

FAQ - Automation - QTP ( 31 to 40 )

31. How QTP scripts are advantageous when need to re-work the same business scenarios?

A. To record the Quick Test Professional Script on one instance and be able to execute it on any other instance. The assumption is there are no major GUI changes between the recorded and the execution instances.

32. How can you make the scripts generic and what architecture needs to be followed?

A. In order to achieve the above objective, we need to plan the Quick Test Professional script. It should have two parts:
1. Script – that is generic Quick test script.
2. Data – from the parameter file that is customer instance specific.

Eg. Imagine a business flow has a scenario

- Login to the web page
- Check mail
- Logout
1. Create data/parameter file (can be flat file [.txt] or an excel file) is instance specific.
2. Create (record/program) the QTP initialization
3. The initialization script which calls the Object repository, common function library and all QTP actions/scripts

33. How to create an individual script?

A. Record the Quick Test Professional script and modify it to make it a generic script using the following steps:

a. Set the testing options in the Test Settings Dialog box.
b. Record the script
c. Modify the script to make it generic:

i. Parameterize the hard coded values.
ii. Modify the Object Repository file with regular expressions.
iii. Add unique properties to items in the Object Repository to make recognition simpler.
iv. Insert synchronization points as required.
v. Insert checkpoints for pass/fail validation.
vi. Insert additional programming logic.
vii. Use the Common Functions.

34. What is the testing process in QTP?

A. The testing process consists of 3 main phases:

1. Gather relevant test information – Input data should be gathered.

2. Create the basic test – Record/Program the scripts in actions

3. Enhance the basic test
Use Data Driven scripts to use the script to test with different sets of data
Reusable Actions- Identify the common scenarios and make the scripts generic and reuse the scripts across different business scenarios.

35. What are different types of recording modes in QTP?

A. There are two recording modes
1. Low-level
2. Analog

Low – Level Recording:

Use Low-Level Recording when you need to record the exact location of the object on your application screen.
To record in Low-Level Recording, select “Low-Level Recording” from the “Test” menu while recording


Use Analog Recording for applications in which the actual movement of the mouse is what you want to record.
To record in Analog mode, select “Analog Recording” from the “Test” menu while recording.

36. What is Object repository?

A. The Object Repository dialog box displays a test tree of all objects in the current action or the entire test (depending on the object repository mode you choose when you create your test). You can use the Object Repository dialog box to view or modify the properties of any test object in the repository or to add new objects to your repository.

Object Repository Modes

Per – Action Object Repository:
This is the default setting, and all tests created in QuickTest 5.6 or earlier use this mode. In this mode, QuickTest automatically creates an object repository file for each action in your test so that you can record and run tests without creating, choosing, or modifying object repository files.
Shared Object Repository:
In this mode, you can use one object repository file for multiple tests if the tests include the same objects. Object information that applies to many tests is kept in one central location. When the objects in your application change, you can update them in one location for multiple tests

37. How to select the Object repository mode?

A. To select the object repository mode
Goto Test Settings > Resource Tab to change the Object Repository Mode

The default object repository file name is default.tsr
You can change object repository mode when the Test contain no actions.

38. What is Active screen? What are the advantages of Active screen?

A. Active screen captures all the properties of the application and makes available even when offline/ when you are not connected to the application.
The main advantage is checkpoints can be added without connecting to the application

39. What are different Screen capture options available for Active screen?

A. Complete—Captures all properties of all objects in the application’s active window/dialog box/Web page in the Active Screen of each step. This level saves Web pages after any dynamic changes and saves Active Screen files in a compressed format.

Partial—(Default). Captures all properties of all objects in the application’s active window/dialog box/Web page in the Active Screen of the first step performed in an application’s window, plus all properties of the recorded object in subsequent steps in the same window. This level saves Web pages after any dynamic changes and saves Active Screen files in a compressed format.

Minimum—Captures properties only for the recorded object and its parent in the Active Screen of each step. This level saves the original source HTML of all Web pages (prior to dynamic changes) and saves Active Screen files in a compressed format.

None—Disables capturing of Active Screen files for all applications and Web pages.

40. How QTP identifies the objects in the application during runtime?

A. QTP uses different properties to identify the objects in the applications. They are:
a. Mandatory Properties
b. Assistive Properties
c. Object Identifies
d. Smart Identification

No comments:

There was an error in this gadget