0% found this document useful (0 votes)
29 views

User Defined Variables

The document discusses user defined variables in QuickTest Professional (QTP). It provides steps to create an environment file with user defined variables, and then associate this file with a current test in QTP to load and use the variables. It also provides an XML format for directly coding the environment file. The document also summarizes navigation steps for virtual object configuration and management in QTP, and defines different types of frameworks (linear, modular, keyword-driven, hybrid, data frameworks).

Uploaded by

Jagat Mishra
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

User Defined Variables

The document discusses user defined variables in QuickTest Professional (QTP). It provides steps to create an environment file with user defined variables, and then associate this file with a current test in QTP to load and use the variables. It also provides an XML format for directly coding the environment file. The document also summarizes navigation steps for virtual object configuration and management in QTP, and defines different types of frameworks (linear, modular, keyword-driven, hybrid, data frameworks).

Uploaded by

Jagat Mishra
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 8

2.

User defined variables:

Navigation for creating an environment file with environment variables:


·         Activate the menu item test
·         Select the option settings
·         Select the environment tab
·         Select the variable type as user defined
·         Click on new
·         Specify the variable name and the value
·         Click on ok
·         Click on export
·         Browse the desired location
·         Specify the desired file name with .XML extension
·         Click on save

To avoid the above navigation one can directly develop the XML file as follows

<environment>
<variable>
<name> flight path </name>
<value>”d:\program files\mercury” </value>
</variable>
<variable>
<name> b </name>
<value>203</value>
</variable>
</environment>

Navigation for associating an environment file to the currant test:


·         Activate the menu item test
·         Select the option settings
·         Select the environment tab
·         Select the variable types as user defined
·         Select the check box load variables and value from ecternal files
·         Browse the path of the environment file
·         Click on apply and ok
In order to avoid the above navigation one can directly type the following script statement in the starting of th
Syntax: environment. Load from file “path of the env file”

Example: environment. Load from file”d:\envfile122.xml” invoke application environment. Value(“flight Path

Virtual object configuration:

Navigation:
·         Activate the menu item tools
·         Go to virtual objects
·         Select the option new virtual object
·         Click on next
·         Specify the desired class(type) of the object
·         Click on next
·         Mark the area in the application with the help of mark object button
·         Click on next
·         Select one of the following options
o   Entire parent hierarchy
o   Parent only
·         Click on next
·         Specify the desired object name
·         Specify the desired collection name
·         Click on finish

Virtual object manager:

Framework:

Types of frame works: - (Mainly)


1.      Linear frame work
2.      Modular frame work
3.      Key-word driven frame work
4.      Hybrid frame work
5.      Data frame work

1.Linear Framework
·         Generate the basic test
·         Enhance the test
·         Debug the test
·         Execute the test
·         Analyze the test
2.Modular Framework:
·         Develop the individual components for each and every task
·         Make them as reusable components
·         Prepare the required drivers based on the end to end scenarios
·         Execute the drivers
·         Analyze the result
These variables need to e declared by us according tour need and need to be stored in a sepa
Virtual object configuration is a process of making the QTP t treat a specified area or an user define

Virtual object manager is a feature provided by QTP which is used for creating and manag

Once a virtual object is created it will be available to all the tests unless until we delete it.

Framework is a generic work (outline work) or a set of guidelines designed by an expert to perform a
need to be stored in a separate environment file. Whenever required one need to associate these files to the currant test a
ied area or an user defined object as a specific object

ed for creating and managing the virtual objects

by an expert to perform a task in an effective, efficient and optimized way


se files to the currant test and use those variables

You might also like