Defining an Environment
- Updated2025-07-23
- 2 minute(s) read
TestStand environments are defined by an INI text file with the .tsenv extension. The file can specify the TestStand Public directory, TestStand Application (CommonAppData) directory (which implicitly defines the TestStand Config directory), and/or the TestStand LocalApplication (LocalAppData) directory. For example, an environment file might look like this:
[TestStandPaths]
CommonAppData = "EnvironmentRoot\\CommonAppData"
LocalAppData = "EnvironmentRoot\\LocalAppData"
Public = "EnvironmentRoot\\TestStandPublic"
The paths may be absolute or relative to the location of the environment file.
Any directory not specified, or specified as an empty string, will map to the default location that TestStand uses when no environment is specified, also called the global environment.
You can edit .tsenv files with a text editor or use the Configure Environment dialog box available in the Sequence Editor under Configure»Environment.
To define the environment, you must define the following fields in the .tsenv file:
-
CommonAppData—Specifies the <TestStand
Application Data> directory. Specifying CommonAppData
for an environment also implicitly specifies the TestStandConfig directory,
which contains various TestStand configuration files. Environments with
different CommonAppData directories have different configuration files, and
therefore do not share the associated settings and data. For example,
environments with different CommonAppData locations have independent sets of
Station Globals, StationOptions, and model plugin configurations. To simplify
user management, all TestStand environments share the global
Users.ini. This means there is still only a single set of
TestStand users for a given system. Use theStationOptions.UserFilePath property
to obtain the path of the Users.ini file,regardless of the
current environment.Note The TestStand engine creates default versions of any required configuration files that are missing at startup. To base a new environment on an existing configuration, copy any desired configuration files from the existing environment to the configuration directory of the new environment.
-
LocalAppData—Specifies the <TestStand Local Application
Data> directory.This directory contains configuration files
typically related to the layout and/or state of the Sequence Editor or TestStand
User Interface. Data and settings persisted in these files are maintained
separately from those of environments specifying a different LocalAppData. The
Sequence Editor and TestStand User Interfaces create default versions of
required configuration files that are missing at startup.Note In the global environment, each Windows user account has its ownLocalAppData directory. When an environment specifies the LocalAppDatadirectory, all Windows user accounts share the specified directory.
-
Public—Specifies the <TestStand Public>
directory, which can contain modifications and customizations to existing
TestStand components, custom user components, and other TestStand-related files.
For example, specifying the public directory allows an environment to have its
own customized language files, process models, and callback files.Note If the AdapterSupport folder is missing in an environment with a custom Public directory, the TestStand Engine creates it at startup by copying the global AdapterSupport folder. No other public files are copied automatically, but you can copy them manually if required.