Create an external environment variables file
Relevant for: GUI tests only
This topic describes how to create an external environment variables file.
Note: This task is part of a higher-level task. For details, see Use user-defined external environment variables.
Create an external environment variable file in the Test Settings
-
Define the variables in the Environment pane of the Test Settings dialog box (File > Settings > Environment node).
-
Click Export to export the user-defined environment variables to an .xml file.
For details, see Environment Pane (Test Settings Dialog Box).
Create an external environment variable file manually
-
Create an .xml file using the editor of your choice.
You can use the UFT One environment variable file schema in:<UFT One installation folder>\help\QTEnvironment.xsd or follow the formatting instructions below.
-
Enter <Environment>on the first line.
-
Enter each variable name-value pair in between <Variable> elements using the following format:
<Variable>
<Name>This is the first variable's name</Name>
<Value>This is the first variable's value</Value>
<Description> This text is optional and can be used to add comments.
It is shown only in the XML and not in UFT One</Description>
</Variable> -
Enter </Environment> on the last line.
<Environment>
<Variable>
<Name>Address1</Name>
<Value>25 Yellow Road</Value>
</Variable>
<Variable>
<Name>Address2</Name>
<Value>Greenville</Value>
</Variable>
<Variable>
<Name>Name</Name>
<Value>John Brown</Value>
</Variable>
<Variable>
<Name>Telephone</Name>
<Value>1-123-12345678</Value>
</Variable>
</Environment> -
Save the file in a location that is accessible from the UFT One computer. The file must be in .xml format with an .xml file extension.