The LeanFT grid dynamically allocates machines for test runs according to machine capabilities and test requirements.
Note: Currently supported only for tests written in Java.
Use the LeanFT grid to run the same test operations on different environments by changing the parameters that describe the required environment. You can also leverage the power of your testing lab and achieve distributed parallel test execution, by running all of your tests on the grid, locally or remotely, and letting the grid allocate nodes for each test run, as needed.
The LeanFT Grid configuration includes the following:
A LeanFT grid machine. Allocates a node machine for each test run, based on the testing environment capabilities that your test requires. On this machine, you install LeanFT and run the LeanFT runtime engine as a grid.
LeanFT node machines. Machines that you set up with the environments on which you want to test your applications.
On each node, you install LeanFT and run the LeanFT runtime engine as a node. In the node's runtime engine settings, you specify the grid it connects to and the capabilities provided by the node. For more details, see What are capabilities?
LeanFT tests. Start each test with a statement that specifies the testing environment capabilities required for this run. For example:
When you run tests, run them locally or remotely on the grid machine. For each test, the grid finds a connected node whose capabilities match the test's environment description. All of the test's LeanFT operations run on this node. Other code statements in your tests are executed on the machine where the test itself is located. Similarly, the report is generated on the machine where the test itself is located.
Note: When using a LeanFT grid configuration, you can also use StormRunner Functional or Mobile Center for your tests. Configure the StormRunner Functional or Mobile Center connection details in the grid runtime engine settings.
Set up a LeanFT grid system
To set up and use a LeanFT Grid configuration, perform the following steps:
Independently of LeanFT, set up machines with the environments on which you want to test your applications. These are the nodes on which LeanFT will perform the test operations.
Install LeanFT on the grid machine, which will allocate nodes for test runs, and on each node machine. Only the LeanFT runtime engine is required.
Caution: Do not use the same machine as a grid and a node.
On the grid machine, run the LeanFT run-time engine as a grid and define how nodes connect to this grid.
On node machines, run the LeanFT run-time engine as a node, and configure the node settings. Specify which grid the node connects to and what testing environment capabilities this node provides.
Make sure that your tests start with a statement specifying the required environment specifications. For example:
For more details, see Write tests for a LeanFT grid.
You can run as many tests as you want at the same time. For each test, the grid finds a connected node with the required capabilities and uses it to run the test's LeanFT operations.
Running tests remotely using the grid
You can use the LeanFT grid to run your tests remotely. This means that you store your tests and run them on a machine other than the LeanFT grid. When running, the tests connect remotely to the LeanFT grid to run the LeanFT test operations. The grid allocates a node with the environment capabilities requested by the test, and runs the LeanFT test operations on that node. For details, see Run tests remotely.
LeanFT grid license consumption
The LeanFT grid can handle four LeanFT operations at once, for each license consumed. To enable the grid to running more than four operations simultaneously, use a concurrent license. As it handles requests to run operations, the grid will gradually consume and release licenses as needed.
In the grid's runtime engine settings, define the following settings to control the grid's use of licenses:
- The maximum number of concurrent licenses that this grid machine can consume.
- The license idle timeout. If no LeanFT operations are running and the timeout expires, the LeanFT license is released. The runtime engine remains active and ready to receive requests, but does not consume a license until it needs to run another operation.
To control the load placed on a grid node machine, LeanFT uses a locking system:
Each time the grid selects a node to use for a test, it adds a lock on that node. This happens as a the result of the test calling EnvironmentFactory.get(EnvironmentDescription) or BrowserFactory.launch (BrowserDescription), in which the test describes the environment to use for its operations.
On each node, configure the maximum number of locks that can be placed on that node (default=4). For details, see Grid Connection Settings.
Locks are released at the end of the test run.
On the grid, configure the node-wait timeout, the number of seconds to wait for one of the relevant nodes connected to the grid to become available for locking. For details, see Node Connection Settings.
The LeanFT Grid Management console enables you to view the nodes connected to your grid and the capabilities provided by each node. You can see the number of clients currently using the grid to run LeanFT test operations (number of sessions), the number of licenses in use, and more.
To open the console, make sure the LeanFT grid runtime engine is running and do one of the following:
- On the grid machine, browse to:
localhost:<Grid management port>
- From a different machine, browse to:
http://<grid address>:<Grid management port>
The Grid management port number is defined in the LeanFT grid runtime engine settings (Default=8080). For details, see Configure the grid's runtime engine settings.
This console provides general information about the grid machine and a table showing information about each node. For each node, you can see the capabilities provided by this node as well as the number of runs it is currently handling:
- Capabilities include the node's name, operating system, browsers, currently loaded add-ins, and other capabilities defined in the node's settings.
- Concurrent runs shows the number of locks currently placed on the node, out of the maximum locks defined for that node.