ALM Lab Service

This section describes how to use the ALM Lab Service agent to remotely trigger functional tests and maintenance tasks on testing hosts form ALM.

ALM Lab Service overview

ALM Lab Service acts as an agent on the testing hosts, enabling ALM to remotely trigger tests and maintenance tasks on the hosts.

Lab Service runs in the background on the testing host. In order to integrate your testing host with ALMLab Management capabilities, you define the host in Lab Management or ALM Desktop Client and then point ALM Lab Service to the ALM server using the Lab Service Settings page.

A one-time registration process validates the identity of the agent and establishes a secure communication channel between ALM and the host. After registration, use ALM to run functional tests and perform maintenance tasks on the remote host.

Lab Service acts as a secure interface between ALM and your testing host. Communications with ALM, such as test requests, test results, and maintenance tasks pass through Lab Service. The Lab service communicates with ALM over the standard HTTP protocol and can traverse firewalls. Stopping the ALM Lab service prevents ALMLab Management from using the host for running tests.

Back to top

Install ALM Lab Service

You can install ALM Lab Service using either the installation wizard or silent installation.

To install ALM Lab Service using the installation wizard:

  1. From the ALM qcbin page (https://<alm_server>/qcbin/), click the Tools link.

  2. Click the ALM Lab Service link. Select the installation path that matches your operating system.

    Note: Lab Service and the ALM server to which you are connecting must be of the same version in order to be compatible. If your version of Lab Service is not the same as the ALM server, the Hosts/Testing Host grid displays your testing host as Unavailable.

  3. Run the MSI installation file. The ALM Lab Service - Installation Wizard launches on the Welcome screen. Click Next.

    Note:  

    • Administrator permissions are required on the machine.

    • User Access Control (UAC) must be disabled.

  4. In the Destination Folder screen, specify the folder where you want to install ALM Lab Service. Click Next.

    To change the destination folder, click Change.

    Note: You must have read/write permissions to the destination folder.

  5. (Optional) In the Custom Setup screen, to enable Lab Service's Auto Login feature, click the Auto Login check box icon and select Enable this feature. Click Next.

    For details about auto login, see Lab Service auto login.

  6. In the Confirm Settings screen, To review or change any settings, click Back. To accept the settings and start the installation process, click Next.

    The Installation page opens and the OpenTextALM Lab Service files are installed on your machine.

  7. (Optional but recommended) Configure the ALM Lab Service settings.

    After the installation completes, the ALM Lab Service Settings dialog box opens along with the Finish screen. You can enter your host settings into the Lab Service Settings dialog box and click OK. For details about ALM Lab Service settings, see Register a host using ALM Lab Service.

    Note:  

    • We recommend you configure the Lab Service settings at this stage, but you can configure it later as well. The agent does not function until the settings are configured.

    • If you enabled Auto Login during the installation, you are prompted to restart your computer. Make sure you enter your details into the Lab Service Settings page before restarting.

To install ALM Lab Service using silent installation:

Note:  

  • Administrator permissions are required on the machine.
  • User Access Control (UAC) must be disabled.

From the command line, enter the Microsoft MSI silent installation command:

Copy code
msiexec /i "<msi-location>/HpAlmLabService_x64.msi" /quiet SERVERNAME=http://<server_name>:<port>/qcbin HOSTUSERNAME=<user_name>

The following ALM-specific parameters are available:

Parameter

Description

HOSTUSERDOMAIN=<domain> Required when Auto Login is enabled. Specifies the login user's domain.
HOSTUSERNAME=<user_name>

Required parameter. Specifies the user that must be logged in when running tests on the testing host.

The user you select must have the following permissions:

  • Create global objects.
  • All COM permissions.
  • Read/write permissions to the destination folder.

  • All permissions needed to run tests of the desired type. For example, if you intend to run UFT One tests from ALM, the selected user must have all permissions needed to run UFT One tests. For details about the permissions required per testing tool, see the user guide for the appropriate testing tool.
HOSTUSERPASSWORD=<password> Required when Auto Login is enabled. Specifies the login user's password.
ISAUTOLOGIN=1 Enables the Auto Login feature. If Auto Login is enabled, you must use the HOSTUSERDOMAIN and HOSTUSERPASSWORD parameters. For details about Auto Login, see Lab Service auto login.
LOGLEVEL=<log-level>

Configures the level (<log-level>) at which Lab Service will write logs. Supports the following log levels: Error, Off, Warning, Info, Verbose. For details about log levels, see Register a host using ALM Lab Service.

LOGLOCATION="<log-directory>" Configures the location (<log-directory>) in which the Lab Service logs will be written.
REGISTER=1 Automatically sends a registration request to the ALM server after the installation completes.
SERVERNAME=http://<server_name>:<port>/qcbin

Required parameter. The URL of the ALM server.

SERVERNAME=http://almserver1:8080/qcbin

Additional standard MSI parameters are available. Type msiexec /? from the command line for more information.

Back to top

Modify or uninstall ALM Lab Service

This task describes how to modify or uninstall ALM Lab Service.

To modify ALM Lab Service installation:

  1. Run the MSI installation file. The ALM Lab Service - Installation Wizard  launches on the Welcome screen. Click Next.

  2. In the Program Maintenance screen, select the Modify radio button. Click Next.

  3. In the Custom Setup screen, use the feature icons to enable or disable ALM Lab Service features. Click Next.

  4. In the Confirm Settings screen, click Next.

  5. In the Finish screen opens, click Finish.

To uninstall ALM Lab Service:

Caution: After removing Lab Service, you must restart the host before reinstalling a different version. If you try to reinstall a new version without restarting, the installation fails.

Uninstall Lab Service using the MSI file

To uninstall Lab Service using the MSI file:

  1. Run the MSI installation file. The ALM Lab Service - Installation Wizard launches on the Welcome screen. Click Next.

  2. In the Program Maintenance screen, select the Remove radio button. Click Next.

  3. In the Remove the Program screen, click Remove.

    If Lab Service was running when you ran the MSI installation file, the Files in Use screen may open. Click OK to complete the removal.

  4. In the Finish screen, click Finish.

Uninstall Lab Service using Windows Programs and Features: To uninstall Lab Service using Windows Programs and Features:
  1. Open the Programs and Features screen in Windows by going to Control Panel\All Control Panel Items\Programs and Features.

  2. Right click on ALM Lab Service, and select Uninstall.

Uninstall Lab Service using the silent uninstallation To uninstall Lab Service using the silent uninstallation, run one of the following commands:
  • msiexec /x "<msi-location>\HpAlmLabService_x64.msi"
  • msiexec /x {8A0D781B-7976-419F-91D9-15F3121FCFA5}

Back to top

Register a host using ALM Lab Service

To run tests from Functional test sets on your testing hosts using ALM, you must register your host with ALM using Lab Service. You can configure Lab Service to communicate with ALM by using the Settings page.

Prerequisite:

  • The ALM server URL.
  • The dedicated Windows user name to be used exclusively for running the test on your testing host.

    Note: The user you select must have the following permissions:

    • Create global objects.
    • All COM permissions.
    • All permissions needed to run tests of the desired type. For example, if you intend to run UFT One tests from ALM, the selected user must have all permissions needed to run UFT One tests. For details about the permissions required per testing tool, see the user guide for the appropriate testing tool.

  • The password and domain of the Windows user name. These are available only if you enabled Auto Login during installation.
  • (Optional) The URL and credentials of the proxy server used for communication between the testing host and ALM.

To register your host using ALM Lab Service:

  1. To open the ALM Lab Service Settings page, right-click the Lab Service icon in your system tray.

  2. In the General tab, provide the ALM server URL and your host user information.

    UI Elements

    Description

    Server Settings section

    ALM Server. The URL of the ALM server for communicating with Lab Service.

    The URL should be in the following format:
    http(s)://<ServerName>:<Port>/qcbin

    Host Settings section
    • Host user name. The name of the Windows user to be used to run ALM tests on this host. This name cannot include the \ backslash character.

      The user you select must have the following permissions:

      • Create global objects.
      • All COM permissions.
      • Read/write permissions to the destination folder.

      • All permissions needed to run tests of the desired type. For example, if you intend to run UFT One tests from ALM, the selected user must have all permissions needed to run UFT One tests. For details about the permissions required per testing tool, see the user guide for the appropriate testing tool.
    • Host password. The password of the Windows user. This field is available only if Auto Login is enabled.
    • Host domain. The domain of the Windows user. This field is available only if Auto Login is enabled.
    Host Registration section
    • Host name. The name used by ALM to identify your testing host.

    • Message. The message sent to the Lab Management administrator.

    • Register Host. This button registers the testing host with the ALM server. For details, see ALM Lab Service.

    Log Settings section

    • Log files location. The directory to which the logs are written. The log records the progress of test runs and maintenance tasks. If the location does not exist, it is created. This field cannot be empty.

      If the write permissions for the log location path do not include the user name defined in the Host Settings section, the execution runs but no logs are generated.

    • Log Level. Select a log level from the drop down menu:

      • Off. No logs are generated.
      • Error. Only errors are written to the log.
      • Warning. Errors and warnings are written to the log.
      • Info. Errors, warnings, and general information is written to the log.
      • Verbose. All actions done by the Lab Service agent are written to the log.

      Caution: Raising the Log Level may affect performance. We recommend leaving it at Error level unless you need to produce debugging information.

  3. In the Proxy tab, provide proxy server information if necessary.

    UI Elements

    Description

    No Proxy Select this option if the testing host communicates directly with the ALM server.
    Manual Proxy Configuration Select this option if the testing host communicates with the ALM server via a proxy server. If you select this option, you must enter a proxy type and proxy server, and optionally a username and password.
    Proxy Type The protocol used for communication between the testing host and the proxy server.
    Proxy Server : <port number> The hostname or IP address of the proxy server. Make sure to enter a port number in the field on the right.
    Proxy server requires a password Select this option if communication with the proxy server requires authentication. If you select this option, you must enter a username and password for the proxy server.
    Username Username used to authenticate against the proxy server.
    Password Password for the supplied username.
  4. Refresh the host grid in Lab Management. The Registration Status for the new host is set to Pending.

Approve host registration in Lab Management

After you register your host using ALM Lab Service, you approve the host registration in Lab Management.

Note:  

  • If you set Registration Auto Approval to Y when you created the host, then the registration will be automatically approved.

  • If the host is not set to be automatically approved, you must approve it manually.

To approve the host registration:

  1. Log in to Lab Management.

  2. From Lab Resources > Hosts, select your host from the grid.

  3. Click the Host Operations drop-down arrow and select Approve Registration.

    The Registration Status changes from Pending to Registered.

Back to top

Stop/start Lab Service

You can start and stop Lab Service using the icon in the taskbar. Right-click the icon and do one of the following:

  • To stop, click Stop ALM Lab Service.

  • To start, click Start ALM Lab Service.

Caution:  

  • Stopping Lab Service makes the testing host appear as Non-Operational in Lab Management. You cannot run tests using server-side execution on your testing host until you start it again.

  • If you wait too long after stopping Lab Service, ALM stops polling to see if Lab Service was restarted. You must manually set the testing host's Status to Operational.

Back to top

Lab Service auto login

For ALM to run tests on your registered testing host, Lab Service must have a user logged in to the testing host, and the user must have permission to run the test. To avoid a situation in which the user is not logged in, you can enable auto login during ALM Lab Service installation, so that Lab Service automatically logs in to the testing host using the user whenever you request a test execution. For details, see Install ALM Lab Service.

If you enable Auto Login, you must fill out the username and password values in the Settings page. For details, see Register a host using ALM Lab Service.

If you have Auto Login enabled and you disconnect from the session (for instance, if you close the session window), Lab Service automatically logs the user back in and finish the test. However, if you lock the screen, ALM is not able to run a test which requires the session user interface (such as UFT GUI Testing).

Note:  

  • To enable Auto Login, administrator permissions are required on the machine.
  • To enable Auto Login, User Access Control (UAC) must be disabled.
  • To disable or enable Auto Login on an already existing Lab Service installation, run the MSI file and click Modify. For details, see Modify or uninstall ALM Lab Service.
  • To enable Auto Login on Windows Server 2012, see this KB article.

    For the "Check Host failed" issue after Auto Login is enabled, see this KB article.

Back to top

See also: