Run tests using a CI system
The procedure below focuses on Jenkins, but you can apply the same concepts to most CI systems.
Note: If you are running LeanFT tests from Jenkins and want to track the tests in ALM, you can use ALM’s EXTERNAL-TEST type to synchronize externally executed test results with ALM. For more information, see the ALM Help Center.
Install the LeanFT runtime engine and your AUT on the slave.
If your tests were created in the context of a unit testing framework (such as NUnit or JUnit), make sure that the relevant framework's runner is also installed on the slave computer.
Deploy the LeanFT tests (DLLs/JARs) to the slave computer.
Configure the Jenkins slave to maintain an active Windows session. This is needed so that the LeanFT runtime engine can access the UI elements of your AUT during the run.
For non-Web applications:
On the slave computer, start the UFT Helper service from: Computer > Manage > Services and Applications > Services.
Note: Make sure the service starts before the LeanFT runtime engine.
In the Engine tab of the LeanFT Settings dialog box, under Runtime Settings, enter the user name and encrypted password of the slave computer.
To generate the encrypted password, run the following command line from the slave computer and copy the encrypted string to the clipboard:
Note: The encrypted password is based on the computer where you run the utility, so make sure to generate the password on the computer where it will be used.
Configure your Jenkins job to run your LeanFT tests.
For example if your tests were created in the context of an NUnit project, your build step may look like this:
<NUnit Path>\bin\nunit-console-x86.exe" "%PATH_TO_TEST_PROJECT_DLL%\DLLFileName.dll
- Optional. Configure your job to archive the LeanFT HTML report files, such that they will be available in Jenkins for each build of your job. You can also customize your job to include a direct link to the LeanFT report file for each build.