Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

WHAT IS ENVIRONMENT VARIABLES?

Answer Posted / sheshadri

The following are the uses of Environment variables:
1) Environment variables are used to pass the variables
across the Actions in the Test Script.
For Ex: We can have max of 255 Actions in a Test script.
With the use of normal variables we cannot pass the
variables declared in one Action to another.
But with the help of Environment Variables we can pass the
variables across the number of Actions in a test script.
I will elaborate this with a small example:

Without Environment variables:

Action1:
option explicit
dim a,b
a=10
b=20
msgbox a
Action2:
msgbox b

when you run the script the output of Action1 would be 10
but there will be no output of Action2 (only blank msgbox
will be displayed)
So to overcome such problems we use Environment variables.

The same Ex with environment variables:
Action1:
Option explicit
Dim a,b
a=10
b=20
msgbox environment ("a")

Action2:
msgbox environment ("b")

Now Create the Environment variables by
File-->Settings-->Test Setting-->Environment
Select variable type as User defined then Click on the
"+" symbol Add environment parameter Name=a Value=10
repeat to give the name and value of "b"
Check the "Load variables and values from external file
Click apply and OK and run the script.

2)TO overcome the problems associated with "Hard-coded"
values we use Environment variables.

Hope u find it useful
for further details contact on: sheshadrineela@yahoo.com

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?

2040


WHAT IS THE DIFFERENCE BETWEEN QTP SCRIPT AND VB SCRIPT? HOW MUCH PERCENTAGE WE USE IN QTP SCRIPT REAL TIME AND HOW MUCH PERCEN OF VB SCRIPT,,,,,,,

2035


Thanks....But can u tell me how i use the QTP for GIS with one Example...

1890


what is profile tool?

2239


Describe function procedure in vbscript.

1143


please give me the code for doing retesting of gmail login page using functions so the function has to give the value

2072


Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

2161


Explain the use of action split in qtp?

1119


Connect to QC using AOM.

1702


Is any limitation to xml checkpoints?

1027


i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?

1995


what is the advantages and disadvantages of using functions instead of re usable actions

1966


Can you brief the hurdles you faced during Automation testing?

1054


What are the methods of the TextStream object that are used for reading from a text file?

2273


What are the methods used in UFT to handle exceptions or run-time errors?

1116