Built in Environment Variables in QTP 9.2

Below are the list of built in Environment variables available in QTP 9.2. Built in Environment variables are read only. You can retrieve the values of the built in variables but you cannot set values for these environment variables unlike the user defined environment variables. These variables can be used like global variables through out your test in different actions and there is no need for you to create them or declare them. Since they are built in they are readily available for us to use them to retrieve useful and important information.


Syntax

Environment.value(variablename)

Example:

Msgbox Environment.value("OS")

This will print the Operating System of the machine on which QTP is installed.

1. Action Iteration: Indicates which action iteration is currently running. The value will be displayed or valid only during the test run.

2. Action Name: Displays or indicates which action is currently running. The current value is valid only during test run.

3. ControllerHostName: The name of the computer that serves as the controller. Used when Load runner is running. The current value is valid only during test run under Load.

4. GroupName: This is w.r.t. Load Runner. It is the scenario identification number. The current value is valid only during test run under Load.

5. LocalHostname: Gives the Local Host Name on which QTP is Installed. The current value displayed is WINDOWS XP.

6. OS: Displays the operating system on which QTP is installed. The current value os Microsoft Windows XP Work Station.

7. OS Version: Displays the version of the Operating System.

8. ProductDir: Displays the folder path where the product (QTP) is installed.

9. ProductName: Gives the name of the Product.

10. ProductVersion: Gives the product version.

11. ResultDir: Displays the folder path where the current test results are saved.

12. SceanrioId: This is w.r.t. LoadRunner. Displays the scenario identification number.

13. SystemTempDir: Displays the system temporary directory.

14. TestDir: This is the path of the folder in which the test is located.

15. TestIteration: Indicates which test iteration is currently running.

16. TestName: Displays the name of the test.

17. UpdatingActiveScreen: Indicates whether the active screen images and values are being updated.

18. UpdatingCheckPoints: Indicates whether the checkpoint properties are being updated.

19. UpdatingToDescriptions: Indicates whether test object descriptions are being updated.

20. UserName: Displays the windows login user name.

21. VUserId: This is w.r.t. Load Runner. Indicates the virtual user identification number.

0 comments:

Post a Comment

/* Tynt Insight tracker ----------------------------------------------- */