How could LeanFT
check licensing status, when JAR file is generated from a LeanFT
project and executed without use of an IDE? In this case LeanFT
runtime engine isn't started and URL of license server is not stored in jar file.
Asked
Active
Viewed 219 times
0

plaidshirt
- 5,189
- 19
- 91
- 181
1 Answers
1
LeanFT is more than just that .jar
file, and the engine logic takes place somewhere else. Roughly, LeanFT consists of two main parts:
- LeanFT client
- is the SDK with all the tests. In your case, a
.jar
file, but could've been a.cs
or.js
test and would have acted just the same. - has code like
Browser.launch
andElement.click
. - these are commands that are sent to the LeanFT engine
- is the SDK with all the tests. In your case, a
- LeanFT engine
- among others, is a websocket server that listens to commands, interprets and executes them
The whole journey a command makes is roughly something as follows:
LFT.init
is executed somewhere in the code.- It initiates the connection with the right socket server, configured either in a properties file (for java, it is
leanft.properties
file), or at runtime, via a configuration object (for java, it is aModifiableSDKConfiguration
object). Some minimal guidance regarding this configuration can be found here - this server can be on any computer on the accessible network, but the engine must be there too! (there are a lot of details regarding this here)
- Without this command, the test will fail because any command (like
click
) can't execute as there is no WS connection
- It initiates the connection with the right socket server, configured either in a properties file (for java, it is
Element.click
is executed somewhere later in the code- SDK constructs and sends a message to the engine (through websocket connection)
- The engine checks if it has a valid license and if all good it performs the command.
Visualized, it is something like this:

Adelin
- 7,809
- 5
- 37
- 65
-
Could you please put also ALM to your figure? – plaidshirt Jul 03 '18 at 08:38
-
1Well, if I'm not mistaken, ALM is not part of the figure, it's just a kind of CI tool that downloads the resources (`.jar` file for example) and triggers the execution, which then leads to the same figure, be it ALM, jenkins or manual execution – Adelin Jul 03 '18 at 08:48