Pages

Custom Search

HP QTP Question Database: Q. 31 to 40

HP QTP Question Database: Q. 31 to 40

Q. 31: What are the Environment Variables?

Environment variables are global variables available to all Actions

# They can be used to run a test case on different environment

# To add a new Environment variable go to Test -> Settings…->Environment (Tab)

# Environment variables are of two types like:

1. Built in Environment Variables: These provide information about the system and the current test

2. User-Defined Environment Variables: These are added in the Environment tab of Test Settings. These are Read-only during the test run

<<<<<< =================== >>>>>>

 

Q. 32: How many types of Parameters are there in QTP?

 

There are two types of parameters like:

 

1) Test parameters:

# These can be set in Test->Settings…->Parameters (Tab)

# Test parameters value can be provided when replaying the test

# Test arguments can be accessed in the test using TestArgs("")

 

2) Action parameters :

# Used to pass parameters to Action

# Output parameters can only be used when Action is being called for a single iteration

# Ex - RunAction "Login", oneIteration, "TestUser", "TestPass", out

 

# A parameter can be accessed using Parameter("ParamName")

 

<<<<<< =================== >>>>>>

 

Q. 33: What is Descriptive Programming?

 

Descriptive Programming is an alternate way of writing test cases without having objects in object repository

 

Descriptive programming can be done in two ways

 

1. Using Object Description

2. Using String Description

 

In Descriptive Programming objects are identified by describing all the identification properties

 

<<<<<< =================== >>>>>>

 

Q. 34: After creating the test, what is the purpose of running them?

 

1) To Check the Application: The test starts running from the first line in our test and stops at the end of the test. While running, QTP connects to our application and performs each operation in our test, including any checkpoints, such as checking any text strings, objects, tables, and so forth. If we had parameterized our test with Data Table parameters, QTP repeats the test (or specific actions in your test) for each set of data values we had defined.

 

2) To Debug the Application: We can control our run session to help us identify and eliminate defects in our test. We can use the Step Into, Step Over, and Step Out commands to run our test step by step. We can begin our run session from a specific step in our test, or run the test until a specific step is reached. We can also set breakpoints to pause our test at predetermined points. We can view the value of variables in our test each time it stops at a breakpoint in the Debug Viewer.

 

3) To Update the Application: We can run our test using Update Run Mode to update the property sets used for test object descriptions, the expected checkpoint values, the data available to retrieve in output values, and the Active Screen images and values.

 

We can run our test using Maintenance Run Mode when we know that our application has changed, and we therefore expect that QTP will not be able to identify the objects in our test. When we run tests in Maintenance Run Mode, a wizard opens for steps that fail because an object could not be found in the application. The wizard then guides us through the steps of resolving the issue, and, after we resolve the issue, the run continues.

 

<<<<<< =================== >>>>>>

 

Q. 35: What are the main stages of Testing with QTP?

 

Testing with QTP involves main stages like:

 

1) Planning

2) Creating Tests

3) Running Tests

4) Analysing Results

 

<<<<<< =================== >>>>>>

 

Q. 36 : How can we do the Analysis of Results in QTP?

 

After we run our test, we can view the results.

 

# View the results in the Test Results window: After we run our test, we can view the results of the run in the Test Results window. We can view a summary of our results as well as a detailed report. If we had captured still images or movies of our application during the

run, we can view these from the Test Results window.

 

# Report defects detected during a run session: If we have access to Quality Center, the HP centralized quality solution, we can report the defects we discover to the project database. We can instruct QTP to automatically report each failed step in our test, or we can report them manually from the Test Results window.

 

<<<<<< =================== >>>>>>

 

Q. 37: What is Business Process Testing?

 

# Business Process Testing is a role-based testing model that enables Subject Matter Experts—who understand the various parts of the application being tested—to create business process tests in Quality Center. Automation Engineers—who are experts in QTP and automated testing—use QTP to define all of the resources and settings required to create business process tests.

 

# Business Process Testing uses a keyword-driven methodology for testing, based on the creation and implementation of business components and business process tests. A business component is an easily-maintained, reusable unit comprising one or more steps that perform a specific task within an application.

 

<<<<<< =================== >>>>>>

 

Q. 38: What are Permissions Required to Run QTP?

 

Following file system permissions are required:

 

1) Full read and write permissions for all the files and folders under the folder in which QTP is installed

 

2) Full read and write permissions to the Temp folder

 

3) Read permissions to the Windows folder and to the System folder

 

We must have the following registry key permissions:

 

1) Full read and write permissions to all the keys under HKEY_CURRENT_USER\Software\Mercury Interactive

 

2) Read and Query Value permissions to all the HKEY_LOCAL_MACHINE and HKEY_CLASSES_ROOT keys

 

<<<<<< =================== >>>>>>

 

Q. 39: What is the role of Keyword View in QTP?

 

The Keyword View enables us to create and view the steps of our test in a keyword-driven, modular, table format. The Keyword View is comprised of a table-like view, in which each step is a separate row in the table, and each column represents different parts of the steps. We can modify the columns displayed to suit our requirements.

 

We create and modify tests by selecting items and operations in the Keyword View and entering information as required. Each step is automatically documented as we complete it, enabling us to view a description of our test steps in understandable English.

 

Each operation performed on our application during a recording session is recorded as a row in the Keyword View.

 

<<<<<< =================== >>>>>>

 

Q. 40: What is the role of Expert View in QTP?

 

In the Expert View, QTP displays each operation performed on our application in the form of a script, comprised of VBScript statements. The Expert View is a script editor with many script editing capabilities. For each object and method in an Expert View statement, a corresponding row exists in the Keyword View.
 

No comments: