LeanFT Java Tutorial Part 8 – Running Tests Remotely

The Eclipse IDE is heavy and may take a toll on the system memory-wise. So its advisable to have two separate kinds of machines – one for development of scripts and one for execution. The machines that we use for execution need not have the full IDE and we can just have the LeanFT Runtime engine running on them.

So when you are installing LeanFT, you can select the following option when you just want to use the machine for execution :-


In your Eclipse project on the development machine, you need to open the leanft.properties file, uncomment the server address and update the execution machine details as follows:-

# The LeanFT runtime engine URL and port. Default: ws://localhost:5095

In your execution machine, open the following file:-

C:\Program Files (x86)\HP\LeanFT\bin\LFTRuntime.exe.config

Update the the connection key in the XML to have mode as “AcceptNonSecuredRemoteConnections” rather than the default value which is “AcceptLocalConnectionOnly” :-

<connection port="5095" mode="AcceptNonSecuredRemoteConnections">

Please make sure that the port number mentioned here is the same as one mentioned in the leanft.properties file in the dev machine. Also, make sure you restart the runtime engine after making this change.

Now, if you start the code in your dev machine, it should run on the execution machine provided they are on the same domain.

LeanFT Java Tutorial Part 9 – Using Selenium and LeanFT Together !

Happy Automating!
Harshit Kohli


17 thoughts on “LeanFT Java Tutorial Part 8 – Running Tests Remotely

  1. Thank you, nice explanation

    Is it possible to run LeanFT tests in parallel on multiple remote machines? From below line, it seems like we can mention only one serverAddress


    Ideally I would like tests to be triggered from one machine and execute them in parallel on multiple machines to cut down the execution time and get one consolidated test report.

    I realize tests can be run on multiple browsers at same time, but that doesn’t seem to be applicable for testing thick client apps running on windows machine.

    1. Hi Gopi…Sadly LeanFT doesnt provide functionality like this (more on the lines of Selenium Grid). But you can create a master script that can trigger this type of parallel runs. Or you can also do this with the help of Jenkins by setting up a master slave architecture. And I think consolidated report is not an option here.

      I think its high-time LeanFT should provide this feature out of the box.

      1. Late to the party here, but how would you write a master script to distribute tests across multiple remote machines?
        Any ideas/hints would give me a head start and save a lot of headache 🙂


  2. Hi Harshit,
    I tried to run the script remotely by making necessary changes on both dev and execution machines, but getting error as:
    com.hp.lft.sdk.internal.communication.CommunicationException: Error connecting to LeanFT runtime engine on ws://
    at com.hp.lft.sdk.internal.communication.DefaultSocketConnection.connect(DefaultSocketConnection.java:72)
    at com.hp.lft.sdk.internal.communication.DefaultConnectionFactory.connect(DefaultConnectionFactory.java:51)
    at com.hp.lft.sdk.internal.CommunicationClientImpl.init(CommunicationClientImpl.java:57)
    at com.hp.lft.sdk.SDK.init(SDK.java:21)

    Can you please explain this with little more detailed? It will be greatful.

    1. Hi Rakshith,

      Can you please let me know the following ?

      1. How are you providing the path to the remote machine ? (leanft.properties or in the code directly)

      2. Have you made the AcceptNonSecuredConnections in the remote machine LFTRuntime.config file ?

      Harshit Kohli

  3. Hi Harshit,
    I provided the path in leanft.properties file as serverAddress=ws://
    Also, i did the change in LeanFRuntime.config file in remote system as well.

  4. Ya. I am able to ping the execution server.
    I restarted the Runtime engine after making changes in config file. Still the same issue. 😦

  5. Hello Harshit,

    Thank you for all the tutorials and its very helpful and very nicely written. Is there any way to launch the LeanFT runtime as part the test execution and stop it after the execution? I can see in leanft.properties file

    # If true, the LeanFT runtime engine is launched on LeanFT SDK initialization.
    # Relevant only for local runs. When running remotely, set this value to false.

    but wondering if this cane be fully achieved through java code in(setup and teardown)


    1. Hey Shash,

      I’m glad you liked the tutorials! One way that can be done is using the ProcessBuilder class in Java and invoking the LFTRuntime.exe file present in your LeanFT bin folder.

      Hope that helps.

  6. Hi Harshit,

    Is there any possibility we can execute leanft test from HP ALM and run them in Browserstack (there is a plugin in HP ALM, where we can import leanft test). Have you done anything related to this or any ideas?


    1. Hi Rajan,

      I’ve executed tests from ALM but for that you need a one to one mapping between your test method and the test case in ALM. You can refer the following section in the documentation to setup it up:-


      But I’m not sure whether BrowserStack supports LeanFT or not. As far as I remember, it uses the selenium grid concept for the execution.


      1. Above problem is solved now…
        After making these two changes while executing the scripts I am getting below error –

        Jan 10, 2019 3:46:43 AM org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator postConfigure
        WARNING: GRIZZLY0005: Can not set SO_KEEPALIVE to true
        java.net.SocketException: Invalid argument: no further information

        Code we have tried –
        ModifiableSDKConfiguration config = new ModifiableSDKConfiguration();
        config.setServerAddress(new URI(“ws://” + EXECUTIONMACHINEADDRESS + “:” + EXECUTIONMACHINEPORT));

        In SDK.init(config) line we are getting this error.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s