Dieser Inhalt liegt nicht in Ihrer bevorzugten Sprache vor.

Der Inhalt wird Ihnen in einer anderen verfügbaren Sprache angezeigt. Ihr Browser bietet ggf. Funktionen, die Sie bei der Übersetzung des Textes unterstützen.

Using TestStand Environments

Updated Apr 15, 2025

Environment

Software

  • TestStand

TestStand environments enable two or more TestStand system configurations to exist side-by-side on a single system. They can also be used to replicate a TestStand environment on other machines.

In this tutorial, we will look at using environments to control TestStand Types, Station Globals, and Station Model capabilities.

The steps for this article are split into the following sections:

 

  1. Requirements
  2. TestStand Environments Demo
  3. Creating a .tsenv File

 

  1. Requirements

    • TestStand 2016 or later

 

  1. TestStand Environments Demo

    1. Download the attached .zip file, which contains a .tsenv file and three directories. Unzip the contents to any directory that works best for your system.

    2. Open the TestStand Sequence Editor.

       

      Sequence Editor Status Bar Showing Global Environment

      Note: Notice that TestStand launches with a default environment, <Global>, which is denoted in the status bar at the bottom:

       

    3. To change the environment to this tutorial's environment, on the tool bar menu, navigate to Configure>>Environment...

    4. In the Configure Environment dialog, browse to the DemoEnvironment.tsenv file. The dialog will populate with the custom directories used by this environment.

       

      Configure Environment Dialog Box

      Note: For more information on the dialog box, see Teststand Help: Configure Environment Dialog Box.

       

    5. Click Set Engine Environment. Since the TestStand Engine needs to be reinitialized with the new environment settings, you will need to click OK on the following dialog.

       

      Prompt to restart TestStand Engine

       

    6. If you are using a version later than TestStand 2016, three additional dialogs will appear indicating that this example is out of date. The first dialog that appears is shown below:

       

      Toolbar Layout Out Of Date Warning

       

      Click OK. Two more dialogs will appear indicating that the layout_current.bin is again out of date and that the default analyzer project is out of date. Click OK on both dialogs to open the example TestStand environment.

       

      layout_current.bin Out Of Date Warning

       

      Default Analyzer Project Out Of Date Warning

       

    7. The status bar will now display Environment: DemoEnvironment.tsenv. Also, notice that the Station Model is different for this environment. It is now ParallelModel.seq:

       

      Sequence Editor Status Bar showing Demo Environment

       

    8. Open the Types Palette navigating to View >> Types (Ctrl+T), and notice that the DemoEnvironment has its own specific Type Palette.

    9. Navigate to MyTypes.ini in the types view. Notice that under Step Types and Custom Data Types, there are two different types called CustomDemoStepType and CustomDemoDataType respectively.

    10. Hover over MyTypes.ini, and you can see that the file is contained in DemoPublic, the TestStand public directory for the demo environment.

       

      MyTypes.ini in DemoPublic

       

    11. In the Variables Pane, expand StationGlobals. There will be an additional Station Global called DemoEnvironmentSG.

       

       

    12. Launch another instance of the Sequence Editor. The default behavior is to launch with the <Global> environment.

    13. Compare the Station Globals and the Types in MyTypes.ini. Notice how CustomDemoStepType, CustomDemoDataType, and the DemoEnvironmentSG Station Global are not in the <Global> environment.

     

    Here, you learned the steps to create and utilize a TestStand environment. You have the choice to build your own environment based on this demo or to start with a clean slate. The next section will outline the process for developing a custom TestStand environment.

 

  1. Creating a .tsenv File

    A .tsenv file defines a TestStand environment. It is an INI text file that can specify the TestStand Public directory, TestStand Application  (CommonAppData) directory (which implicitly defines the TestStand Configuration directory), and/or the TestStand Local Application (LocalAppData) directory. For more information, see TestStand Help: TestStand Environments.

    There are two methods to create a TestStand environment. The first method is to create the file manually using a text editor, and the latter is to use the Sequence Editor to create the .tsenv file.

     

    1. Creating .tsenv From a Text Editor

      1. Create a .tsenv file by creating a text file and changing the extension to .tsenv

         

        Note: Ensure that you can see the extension of your file to guarantee that the file's extension has been changed.

         

      2. Insert the following section and keys:

         

        [TestStandPaths]
        CommonAppData = "EnvironmentRoot\\DemoCommonAppData"
        LocalAppData = "EnvironmentRoot\\DemoLocalAppData"
        Public = "EnvironmentRoot\\DemoTestStandPublic"

         

        Paths can be absolute or relative to the environment root directory. The paths shown are relative to the .tsenv file directory. For TestStand system deployment, folder paths must be relative.

         

        Note: You do not have to specify all of the folders. If you wish to share a default folder of the TestStand Global Environment, omit the key or set it to an empty string.

         

      3. Save the file.

      4. Load the environment file into TestStand. In the Sequence Editor, go to Configuration>>Environment. Click on “” and browse to your environment file.

      5. When your file has loaded, ensure that the folders that you wish to map your environment to appear as intended. Click Set Engine Environment to relaunch TestStand in the new environment.

       

    2. Creating .tsenv from TestStand

      1. Navigate to Configure >> Environment. In the Environment Path text box, replace “<Global>” with an absolute path to an environment file such as C:\Users\Public\Documents\DemoEnv.tsenv and click Save. TestStand will create a DemoEnv.tsenv file in the location specified.

      2. In the Custom Directories group box, check a directory, name the folder, and click the '...' button to browse to an existing folder if needed. Click Save to save the environment file.

      3. Click Set Engine Environment to load the new environment file and personalize your setup. TestStand will create any missing custom folders and populate them with default configuration files as needed.

Was this information helpful?

Yes

No