Configure ports for using UFT Developer in a multi-session environment

UFT Developer supports working in a multi-session environment such as a Windows server or a Citrix server. A separate instance of the UFT Developer engine runs in each session.

To run a separate instance of the UFT Developer engine in each session, you must configure unique port numbers for each session.

In each session, configure the port numbers:

  1. Configure the config.json file locally

    1. Open your local config.json file in a text editor.

      On Windows, the file is located in %localappdata%\LeanFT\config\. If this folder does not exist, create it.

      On Linux/Mac, open the config.json file for editing from the following location:

      Linux ~/.leanft/config
      Mac ~/Library/Application Support/LeanFT/config

      Note: If this is your first time editing the configuration file, the config folder will be empty. You need to copy the file from:<UFT Developer installation>/lwe/lightweight-engine/config

    2. Define the connection port:

      1. If the port property is not displayed, add the following:

        "port":<CONNECTION PORT>

      2. Define the connection port. Make sure that this port is available on the client machine. By default, the connection port is 5095.
    3. Add the following line, and enter a port where the browser and the agent can communicate with each other. Make sure that this is an available port on the client machine.

      "browser-agent-port":<AVAILABLE PORT>
    4. Save the file.

  2. Configure the OpenText UFT Agent extension in your Chrome or Firefox browser

    Note: UFT Developer 2023 and earlier: The extension is named Micro Focus UFT Agent.

    Tip: For a list of supported browser versions, see the Support Matrix.

    In your browser, open the OpenText UFT Agent options.

    1. Open chrome://extensions/ (in Chrome) or about:addons (In Firefox)
    2. Find OpenText UFT Agent.
    3. Click Options.  (You may need to click Details, and then Extension options).
    4. Change the UFT Developer Server Port to the port you defined for the browser-agent-port in step 1 above.

  3. Update your UFT Developer projects' configuration files

    For each UFT Developer project:

    1. Open the configuration file (App.config or leanft.properties)

      In the connection address property, change the port to match the connection port that you defined in config.json in step 1 above.

      <sdk mode="replay">
        <connection address="ws://localhost:<CONNECTION PORT>">
          <connect timeout="60" />
          <response timeout="600"/>
        </connection>
        <server autolaunch="true" />
      </sdk>
      
    2. Save the file.