Run tests remotely

The instructions below describe how to set up your environment to run tests in a configuration where your test is located on a different computer than the AUT.

Note: In addition to these instructions, before you set up remote run configurations, make sure to review your network topology and read the LeanFT Security Reference, available from the Micro Focus Support Self-Solve Knowledge Library.


When you run tests remotely, all of the test's LeanFT operations run on the remote computer. This is the computer on which the AUT is located.

Other code statements in your tests are executed on the machine where the test itself is located. For example, opening a file to take notes, and so on.

Similarly, the report is generated on the machine where the test itself is located.

Back to top

Prepare your test for a remote run

  1. Open the test settings file you plan to use with your test. For example, the App.config file of your Visual Studio project or the file in your Eclipse, Spring Tool Suite, JBoss Developer Studio, IntelliJ IDEA, or Android Studio project. Uncomment and edit the following settings:

    • Modify the connection address from ws://localhost:<port> as follows:

      Connection type Format
      Secure (recommended) wss://<RemoteServerAddress>:<port>
      Non-secured ws://<RemoteServerAddress>:<port>

      RemoteServerAddress. The address of the computer on which the AUT is installed.

      Note: If you are using LeanFT in a grid configuration, use the address of the grid machine.

      Port. Make sure the port specified in the connection address is available on the remote computer. If it is not, modify it to a port that is available.

    • Set the autolaunch attribute to false.

    • Optional.  Adjust the connection timeout or response timeout.

    For more details on modifying test settings, see Customize test settings.

  2. Compile your updated test.

Back to top

Set up the test computer

On the computer where the test will run:

  1. Deploy all required testing files.

    C# Deploy the compiled configuration file (*.config.dll) and all the LeanFT dlls found in your testing project output folder (for example bin\Debug) together with your testing project dll.

    Copy the, com.hp.lft.sdk-xx.xx.x-standalone.jar, and com.hp.lft.unittesting-xx.xx.x.jar from <LeanFT installation>\SDK\Java to the folder where your test .jar files are located.

  2. If LeanFT is not installed on the computer, copy and configure the HTML Reporting tool.

    1. From a computer where LeanFT is installed, copy the <LeanFT installation>\Tools\Report folder to any location on the test computer.
    2. Define a user environment variable called LEANFT_REPORTBUILDER_DIR. Set the report folder you created in the above step as the value.

  3. Make sure you have a working network connection between the test machine and the remote application machine.

  4. For secure connections, make sure you have a trusted copy of the server's encryption certificate set up on the test machine.

Back to top

Set up the remote computer

Note: If you are using LeanFT in a grid configuration, skip this section. This configuration is handled as part of Set up a LeanFT grid machine.

On the remote computer where your AUT is installed:

  1. If not already installed, run the LeanFT installation. Only the LeanFT runtime engine is required.

  2. Open the LeanFT runtime engine connection configuration file, <LeanFT installation folder>\lwe\lightweight-engine\config\config.json.

  3. Copy the highlighted code into the file:


    • The following is an example from Windows.
    • Make sure to copy the section inside the code.
    	"version": 2.0,
    	"port": 5095,
    	"packages": {"Web": {"isEnabled": true}, "Mobile": {"isEnabled": true}, "SAPUI5": {"isEnabled": false}},
    	"idle_shutdown_timeout": 240,
    	"identification_timeout": 20,
    	"proxyInfo": {
    		"proxyAddress": null,
    		"useAuthentication": false,
    		"userName": "user",
    		"encryptedPassword": "0SWoxfcgI8AwDTlJKrk8aA=="
    	"labs": {
    		"mobileCenter": {
    			"serverInfo": {
    				"address": null,
    				"user": "",
    				"encryptedPassword": "0SWoxfcgI8AwDTlJKrk8aA==",
    				"useProxy": false,
    				"ignoreCertificatesErrors": false
    			"showVncDuringReplay": false
    		"srf": {
    			"serverInfo": {
    				"clientID": null,
    				"encryptedClientSecret": "0SWoxfcgI8AwDTlJKrk8aA==",
    				"address": null,
    				"useProxy": false,
    				"ignoreCertificatesErrors": false
    			"showVncDuringReplay": false
    	"connection-mode": "remote-secured",
    		"certificatePath": "c:/path/to/your/pfxFile.pfx"
  4. Enter values as follows:

    Setting Description

    The strategy to be used when verifying external clients (i.e. SDK, Spy, etc.):

    • local-only. Accepts connection only from the local connections.

    • remote-nonsecured. Accepts all connections.
    • remote-secured. Accepts only secure (WSS) connections.

    Holds the security options of the server, that is, the tunnel security protocol (TLS level) and the certificate to be presented to the clients.

    It is comprised of:

    • certificatePath. The path to the server's encryption certificate. The certificate should be in PFX or cert format with a private key.

    • key. If certificatePath holds a location to a cert file, key should hold the path to the pem file.
    • encryptionProtocol. Optional. The security protocol to use between the two computers. Possible values:

      LeanFT 14.51 and earlier: tls (Default); tls11; tls12;

      LeanFT 14.52 and later: any (Default); tls; tls11; tls12;

      any. The connection will use the latest TLS protocol that is supported by both client and server.

Back to top

Before beginning the test run

Test run preparations depend on whether you are using a Standalone LeanFT or a LeanFT grid:

Standalone LeanFT

  • Manually launch the runtime engine from the Start menu.

  • Make sure your AUT is available: 

    • For Web-based applications, make sure your test launches the browser and navigates to the application using BrowserFactory.Launch and Browser.Navigate steps.

    • For other applications, launch the application.

LeanFT grid

  • Manually launch the runtime engine as a grid on the grid machine and as a node on the node machines.

    Where Run LeanFT as a Grid Run LeanFT as a Node
    Windows Start Menu LeanFT > LeanFT Grid > LeanFT Runtime (Grid) LeanFT > LeanFT Grid > LeanFT Runtime (Grid Node)

    Run ./leanft start --role=grid

    (located in <LeanFT installation>/bin).

    Run ./leanft start --role=node

    (located in <LeanFT installation>/bin).


    Run ./leanft start --role=grid

    (located in the LeanFT installation directory).

    Run ./leanft start --role=node

    (located in the LeanFT installation directory).

  • Make sure your tests describe the environment they need and launch the AUT. For details, see Write tests for a LeanFT grid.

Back to top

See also: