Configure ports for multiple LeanFT sessions

Working with multiple sessions on one installation of LeanFT requires some port configuration on each client machine.

On each client machine:

  1. Configure LFTRuntime.exe.config locally

    1. Go to the C:\Users\<local user>\AppData\Roaming\Hewlett-Packard\LeanFT folder.

      If this folder does not exist, create it.

    2. Configure the connection and internal ports
      • If LFTRuntime.exe.config already exists in C:\Users\<local user>\AppData\Roaming\Hewlett-Packard\LeanFT, open it in a text editor and add the following code:

          <connection port="5095" mode="AcceptLocalConnectionOnly">
            <!--If using a remote connection, uncomment the security element below 
        and set one of the following values and the relevant file path.
             - Ssl2
             - Ssl3
             - Tls
             - Tls11
             - Tls12
            <!--<security encryptionType="Tls11">
              <certificate filePath="MyCert.pfx"/>
          <parallelExecution mode="Parallel" internalPort="5096"/>
      • If LFTRuntime.exe.config does not exist in C:\Users\<local user>\AppData\Roaming\Hewlett-Packard\LeanFT, copy it over from <LeanFT installation folder>\bin\, and open it in a text editor.

    3. Find the following lines and change the port values to ports available on the client machine.

      Note: Make sure that the ports you choose are not already being used by a different LeanFT client.

      • <connection port="5095" mode="AcceptLocalConnectionOnly">

      • <!--<parallelExecution mode="Parallel" internalPort="5096"/>-->

      Note: Uncomment the parallelExecution mode line!

    4. Save the file.

  2. Configure the Settings dialog port


    Windows C:\Users\<local user>\AppData\Local\Hewlett-Packard\LeanFT\Preferences
    Linux ~/.leanft/preferences
    Mac ~/Library/Application Support/LeanFT/Preferences

    open communication.json and change the Settings dialog port to match the connection port that you defined in LFTRuntime.exe.config in step 1 above.

  3. Create a config.json file

    1. Copy the following code into an empty text file.


           "browser-agent-port":<available port>


    2. Choose a port where the browser and the agent can communicate with each other. Make sure that this is an available port.
    3. Save the file as config.json in the C:\Users\<local user>\AppData\Roaming\Hewlett-Packard\LeanFT folder, together with LFTRuntime.exe.config.
  4. Define the LEANFT_CONFIG user environment variable

    Define a user environment variable called LEANFT_CONFIG.

    Set the value to: C:\Users\<local user>\AppData\Roaming\Hewlett-Packard\LeanFT\config.json

  5. Configure the Functional Testing Agent in your browser

    In your browser, go to the extension settings, and open the HP Functional Testing Agent options.

    1. Open chrome://extensions/.
    2. Find HP Functional Testing Agent.
    3. Click Options.
    4. Change the LeanFT Server Port to the port you defined for the browser-agent-port in step 3 above.
    1. Go to about:config.
    2. Find

      Tip: You can type HP in the search box for easier filtering.

    3. Set the value for LeanFT's server port to the port you defined for the browser-agent-port in step 3 above.

  6. Update your LeanFT projects' configuration files

    For each LeanFT project:

    1. Open the configuration file (App.config or leanft.project)
    2. In the connection address, change the port to match the connection port that you defined in LFTRuntime.exe.config in step 1c above.
    <sdk mode="replay">
      <connection address="ws://localhost:<CONNECTION PORT>">
        <connect timeout="60" />
        <response timeout="600"/>
      <server autolaunch="true" />