Variables
- 12:49 AM - 0 comments
Scope of variables qtp frame work
Mainly there are two types of variables: action parameters and environment variables.
An action's parameters are stored with the action and are the same for all calls to that action. If you change the action parameters defined for an action, and then view the action properties for a call to that same action in a different part of the test, you can see the action parameters have changed. However, the actual values specified for input action parameters and the locations specified for action output parameters can be different for each call to the action. When you insert a call to a copy of an action, the copy of the action is inserted with the action parameters and action call parameter values that were defined for the action you copied. When you split an action, the action parameters are copied to both actions. The action call values for the second action are taken from the default values of that action's parameters.
Environment variables can be accessed from your test. Throughout the test run, the value of an environment variable remains the same, regardless of the number of iterations, unless you change the value of the variable programmatically in your script.
There are three types of environment variables:
- User-Defined Internal—variables that you define within the test. These variables are saved with the test and are accessible only within the test in which they were defined.
- You can create or modify internal, user-defined environment variables for your test in the Environment tab of the Test Settings dialog box or in the Parameter Options dialog box.
- User-Defined External—variables that you predefine in the active external environment variables file. You can create as many files as you want and select an appropriate file for each test, or change files for each test run. Note that external environment variable values are designated as read-only within the test.
- Built-in—variables that represent information about the test and the computer on which the test is run, such as Test path and Operating system. These variables are accessible from all tests, and are designated as read-only.


0 Responses to "Scope of variables qtp frame work"
Post a Comment