# Configure the LeanFT host computer

When you run a test from ALM you can run it locally, on your computer, or on a host or hosts. The instructions in this section indicate when a step is relevant for both use cases or only when running tests on a host.

In this topic:

## ALM prerequisites

1. Install the ALM Connectivity Add-in from ALM

   In ALM, select Help > ALM Tools > ALM Connectivity.

   The add-in version must match the ALM version. Make sure that you download the add-in from the ALM server where you will be running your tests.

2. Make sure that you have the required ALM permissions

   To run LeanFT tests from ALM you must have the following permissions:

   Action | Permissions
   --- | ---
   Run | Create; Update
   Run Step | Create; Update
   Result | Create; Update
   Test Instance | Update

3. Register ALM client in Common mode

   To run business process tests with LeanFT components, register the ALM client in Common mode on the remote machine.

4. Continue with LeanFT prerequisites.

Back to top

## LeanFT prerequisites

Perform this procedure for every computer (host) where you plan to run the LeanFT tests from ALM.

1. Make sure that you have LeanFT installed on each computer where you plan to run LeanFT tests from ALM.

   For details, see LeanFT installation guide.

2. Store the .jar or .dll files containing your LeanFT tests, as well as any other required files, on the host.

   Relative paths | If the LeanFT tests in the ALM test plan are defined with a relative path, you can store the LeanFT tests in any root folder that you choose. Make sure that the sub-folder structure of each .jar or .dll file under your root folder matches the corresponding paths specified in ALM. Later, in the Remote Agent configuration file, you will specify the root folder where your tests are stored.
   Absolute paths | If the LeanFT tests in the ALM test plan are defined with an absolute path, make sure you store the tests in the exact paths that are specified. You do not have to specify any value for the root folder in the Remote Agent configuration file.

   If your AUT is installed on a different computer than the host, you need to perform additional steps.

   Instructions

   On the AUT computer | Ensure that LeanFT is installed and licensed. For details, see LeanFT installation guide.
   On the LeanFT host computer | Store the .jar,.dll, or any other required files in the relevant locations Deploy the Remote Agent: Copy the <LeanFT installation>\Tools\RemoteAgent folder from your LeanFT computer to the ALM host computer. From the copied folder, run registerRemoteAgent.bat For more details, see Configure the Remote Agent . Ensure that your environment is otherwise configured and set up to run tests remotely. For details, see Run tests remotely.

Back to top

## Configure the Remote Agent

Perform this procedure for every computer (host) where you plan to run the LeanFT tests from ALM.

1. Set required DCOM permissions (on hosts only, not required for local runs):

   Set the required permissions for the LeanFT Remote Agent, and open the DCOM port (port 153).

   To set these permissions, run the LFTDcomPermissions.exe utility:

   Note: If UAC is enabled, run the utility by selecting Run as Administrator.

       <LeanFT installation>\Tools\Remote Agent\LFTDcomPermissions.exe -set.

2. Open the LeanFT Remote Agent settings file:

   <LeanFT installation folder>\Tools\RemoteAgent\LFTRemoteAgent.exe.config

3. Define the following settings:

   - <remoteAgent allowRun >. To run ALM tests on this computer, set this attribute to true—even if you are running on the ALM local host computer.

   - Framework setting.

     Note for Java users:

     - The <javaAssets> node from previous LeanFT versions has been deprecated. Use the <junit> node for JUnit settings and the <testng> node for TestNG settings.
     - <javaAssets> is supported for backward compatibility.
     NUnit

     A list of 'framework' elements by major versions.

     Syntax:

     <nunit>

     <framework version="" path="" />

     </nunit>

     framework version | The NUnit framework major version (value must be unique). Example: For version 3.2.0, use 3.
     path | The full path of the root directory that contains the NUnit framework console. Example: "C:\Program Files (x86)\NUnit.org\nunit-console"

     Example:

     `<nunit>`

     `<framework version="3" path="C:\Program Files (x86)\NUnit.org\nunit-console" />`

     `<framework version="2" path="C:\Program Files (x86)\NUnit 2.6.4\bin" />`

     `</nunit>`

     Note: Note: The <nunitFrameworkPath> setting is obsolete. To run different versions of NUnit side-by-side, use the format described above.

     MSTest

     The full path of the root directory that contains the MSTest runner.

     Syntax:

     <mstest>

     <runner path=""/>

     </mstest>

     Example:

     <mstest>

     <runner path="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE"/>

     </mstest>

     TestNG

     A semi-colon (;) separated list of Java assets (*.jar; *.zip; *.class) or folders required to run the test jars defined in the Test Script module Jar Path field.

     Syntax:

     `<testng classpath="%CLASSPATH%;$LEANFT_INSTALL_DIR\SDK\Java/*"/>`

     By default, the testng value contains the LeanFT Java SDK directory and the %CLASSPATH% environment variable. If you keep the %CLASSPATH% value, make sure to enter the required list in the %CLASSPATH% variable.

     Important: Use a semi-colon (;) separated list for the classpath.

     Example:

     `<testng classpath="%CLASSPATH%;C:\testng\lib/*;$LEANFT_INSTALL_DIR\SDK\Java/*"/>`

     JUnit

     A semi-colon (;) separated list of Java assets (*.jar; *.zip; *.class) or folders required to run the test jars defined in the Test Script module Jar Path field.

     Syntax:

     `<junit classpath=%CLASSPATH%;$LEANFT_INSTALL_DIR\SDK\Java/*;<junit.jar path>;<hamcrest-core.jar path> />`

     By default, the junit value contains the LeanFT Java SDK directory and the %CLASSPATH% environment variable. If you keep the %CLASSPATH% value, make sure to enter the required list in the %CLASSPATH% variable.

     Important: Use a semi-colon (;) separated list for the classpath.

     The junit*.jar (and any of its dependencies) must also be defined in this list.

     Some versions of JUnit require adding the hamcrest-core JAR path to the Java assets as well. Download and install (from junit.org) the relevant hamcrest-core JAR file required by the JUnit JAR you are using.

     Example (including the hamcrest-core JAR):

     `<junit classpath="%CLASSPATH%;C:\junit\junit.jar;C:\junit\hamcrest-core-1.3.jar;$LEANFT_INSTALL_DIR\SDK\Java/*" />`

   - <testAssetDir>. The full path of the root directory that contains the test assets.

     Relative paths | If the JAR Path or DLL Path field values are defined as relative paths in the Test Plan module of your ALM tests, the value you specify for this element is used to resolve the relative paths.
     Absolute path | If the JAR/DLL paths are defined in ALM with an absolute path (such as C:\...). This value is ignored. Make sure your tests are stored on this computer in the exact location specified in ALM.

     Note: LeanFT does not enforce any security restrictions when configuring this directory.

4. Restart the Remote Agent to ensure that the updated settings are uploaded when ALM next runs a test on the computer.

5. Continue with one of the following:

   - Java tests: (Optional) Define the JRE location to use
   - Set up your tests to store results in ALM

Back to top

## Java tests: (Optional) Define the JRE location to use

By default, LeanFT references the JRE location defined in the registry on the computer where the test runs (HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment).

If you want LeanFT to use another location, create an environment variable (user or system) called JAVA_HOME. Specify the relevant JRE location as the value.

Continue with Set up your tests to store results in ALM.

Back to top

## Set up your tests to store results in ALM

To store the LeanFT HTML report containing the run results in ALM:

- The report folder values must remain undefined in your test.

  C# | In the App.config file of all relevant projects, make sure that under <report>, the <output> element is commented out.
  Java | In the leanft.properties file of all relevant projects, in the Report Settings section , make sure the targetDirectory, reportFolder and overrideExisting options are commented out.

- Make sure that the parallels of these values are not set inside the tests using ReportConfiguration properties.

Back to top

Note: When you no longer need to run LeanFT tests from ALM, revert the DCOM permissions settings (that you set in LeanFT prerequisites) to the computer defaults.

Use the following command:

    <LeanFT installation>\Tools\Remote Agent\LFTDcomPermissions.exe -reset.

Next steps:

- Run your LeanFT test from ALM

https://admhelp.microfocus.com LeanFT 8942
Tips to improve your search results...TOC Lean Functional Testing Help Center LeanFT Help Center 14.50 - 14.53 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version:(Undefined variable: _rscC_Basic_Variables.FloatingTocShow)