We use Visual Studio 2017 as our IDE with LeanFT 14.53.222. Up until now we've been running the LFTRuntime on the local machine when executing tests but we're looking into using Docker containers instead so that clients can pull down our packaged code and execute test cases themselves that way.
I have the leanft-chrome:14.53 Docker image downloaded and the container is running successfully using the following command:
docker run -it -p 5095:5095 -p 5900:5900 --add-host=license-server:##.##.##.## --env LFT_LIC_ID=10594 functionaltesting/leanft-chrome:14.53
It outputs the following in the command prompt window:
LeanFT local module started successfully
License: Concurrent UFT Enterprise Concurrent User
Role: local
Port: 5095
UsingSecuredConnection: false
Version: 14.53.222, (c) Copyright 2015 - 2018 Micro Focus or one of its affiliates.
Installation Folder: /opt/leanft
Executing stand-alone mode
The problem I'm having is with how to initialize the LeanFT SDK in our code. Normally we use the following:
if (SDK.IsServerReady == false)
{
Uri serverAddress = new Uri(ClientURL); //ClientURL = "ws://localhost:5095"
SDK.Init(new SdkConfiguration { ServerAddress = serverAddress });
}
This works OK when using the LFTRuntime but it's throwing an HP.LFT.Common.ErrorHandling.NoValidLicenseException with the Docker container in the SDK.Init call: "No valid license is installed, or license communication error".
Is there something I should be doing differently?