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

  1. Define the variables in the Environment pane of the Test Settings dialog box (File > Settings > Environment node).

  2. Click Export to export the user-defined environment variables to an .xml file.

    For details, see Environment Pane (Test Settings Dialog Box).

Back to top

Create an external environment variable file manually

  1. Create an .xml file using the editor of your choice.

    You can use the UFT One environment variable file schema in:<UFT_One_installdir>\help\QTEnvironment.xsd or follow the formatting instructions below.

  2. Enter <Environment>on the first line.

  3. Enter each variable name-value pair in between <Variable> elements using the following format:


        <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>

  4. Enter </Environment> on the last line.

            <Value>25 Devon Road</Value>
            <Value>John Brown</Value>
  5. 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.

Back to top