Registering DevOps Test Runtime agents

When you want to run Web UI tests authored in Test Hub on a Linux, Mac, or Windows system using an agent, you must first install and register the system as an agent by downloading and running the DevOps Test Runtime agent.

Before you begin

You must have completed the following tasks:
  • Ensured that you are a Team Space Owner, Project Owner, or Member with a Tester role to create or edit a test resource.
  • Read and understood the information in Edit branch overview.
  • Ensured that your project contains an application.
  • Generated, copied, and then saved an offline token in a secure location.

About this task

After downloading and installing the DevOps Test Runtime agent, you must provide the following details to register the system as an agent in Test Hub:
  • <dth_url>: The URL of Test Hub. For example, https://10.0.2.15.nip.io/test.

  • <project_id>: The ID of a project in Test Hub to which the agent must be associated. For example, 2600 is the project ID in https://10.0.2.15.nip.io/test/#/Initial/project/2600.

  • <offline_token>: An offline token generated from Test Hub for the logged-in user who is registering the agent to run tests.

  • <agent_name>: The name of the agent to be displayed in Test Hub. The name must be unique and must conform to the DNS name format, however, it need not be a real hostname. For example, my-agent.

Procedure

  1. Log in to Test Hub on the system which you want to register as an agent.
    The Projects page of the initial team space is displayed.
  2. Click My projects > project_name to open the project that contains the test assets.
    The Overview page of the project is displayed.
  3. Click Author > Test Editor.
    The Test Editor page and the test navigator panel are displayed.
  4. Perform one of the following options:
    • Click Create asset > Create Test on the Test Editor page.
    • Click the Action menu icon in the test navigator panel to open the menu and click the Test option.
    • Right-click the application in the test navigator panel, select New > Test.

    Alternatively, you can create a test by clicking the Create Test icon Create Test on the application Details page if there is an edit branch active.

    The Edit branch dialog is displayed.
    If the Edit branch dialog is not displayed, then go to step 6.
  5. Select your action to either select an existing Edit branch or create an Edit branch:
    • Perform the following steps to select an existing Edit branch:
      1. Select Use an existing edit branch.
      2. Select an Edit branch from the Select branch list if Edit branches already exist for your repository.
        Note:
        A warning message is displayed if the Edit branch, which you selected, is behind the source branch. To update the selected edit branch and maintain synchronization with the source branch, you can select the Update branch option when switching checkbox.
      3. Click Ok.
    • Perform the following steps to create the Edit branch:
      1. Select Create new edit branch.
      2. Enter a name for the Edit branch in the Branch Name field.
      3. Click Save.
  6. Optional: Click Open in the browser notification that might be displayed for you to confirm the opening of DevOps Test Runtime.
    The browser notification is displayed only when the recording agent is already installed.
  7. Perform the following steps in the Details tab of the Create Test dialog:
    1. Select an application for which you want to create a test from the Application drop-down list.
    2. Enter a name for the test in Asset Name.
    3. Select an existing folder or click New Folder to create a folder in Location to save the test assets that you are creating.
  8. Click Next.
    The Source tab is displayed.
  9. Select the By recording option to record a test in the Select source drop-down list.
  10. Perform the following steps depending on the operating system:
    Operating System Action
    Windows (64-bit) Perform the following steps to install the agent on Windows:
    1. Click Download to download the recording agent installer.

      The devops-test-runtime.msi file is downloaded.

    2. Double-click the .msi file to install the agent.

      The installation window with the progress bar is displayed.

    3. Click Proceed to accept the download of the proprietary certificate if prompted.
    4. Click Verify to confirm the agent installation.

      A browser notification might get displayed for you to confirm the opening of the agent. You must click Open.

      The additional options for recording are displayed. Go to step 11.

    Mac OS (64-bit) Perform the following steps to install the agent on Mac:
    1. Click Download to download the recording agent installer.

      The devops-test-runtime.zip file is downloaded.

    2. Extract the .zip file:

      unzip devops-test-runtime.zip

    3. Quarantine the installer:

      xattr -dr com.apple.quarantine ./*

    4. Run the installer:

      ./install.sh

    5. Click Verify to confirm the agent installation.

      The additional options for recording are displayed. Go to step 11.

    Debian/Ubuntu (64-bit) Perform the following steps to install the agent on Ubuntu:
    1. Click Download to download the recording agent installer.

      The devops-test-runtime_11.0.7_amd64.deb file is downloaded.

    2. Navigate to the directory where the installer is downloaded:

      cd <download-directory>

    3. Run the installer:

      sudo apt install ./devops-test-runtime_11.0.7_amd64.deb

    4. Click Verify to confirm the agent installation.

      The additional options for recording are displayed. Go to step 11.

    RHEL/Fedora/OpenSUSE (64-bit) Perform the following steps to install the agent on Linux:
    1. Click Download to download the recording agent installer.

      The devops-test-runtime-11.0.7-1.x86_64.rpm file is downloaded.

    2. Navigate to the directory where the installer is downloaded:

      cd <download-directory>

    3. Run the following command:

      INGRESS_DOMAIN=<domain_name> dnf

      localinstall ./devops-test-runtime-11.0.7-1.x86_64.rpm

    4. Click Verify to confirm the agent installation.

      The additional options for recording are displayed. Go to step 11.

  11. Click Cancel to close the Create Test dialog.
  12. Perform the following steps to register the system as an agent in Test Hub:
    Operating System Action
    Windows (64-bit .msi) Perform the following steps:
    1. Navigate to the C:Users\<user_name>\AppData\HCL\devops-test-runtime directory where the runtime script is located.
    2. Run the following commands:
      set DEVOPS_TEST_HUB_URL=<dth_url>
      set DEVOPS_TEST_PROJECT_ID=<project_id>
      set DEVOPS_TEST_OFFLINE_TOKEN=<offline_token>
      set DEVOPS_TEST_AGENT_NAME=<agent_name>
      .\devops-test-runtime.exe agent

      Confirmation messages about the agent starting and registering are displayed. Go to step 13.

    Mac OS (64-bit .zip) Perform the following steps:
    1. Navigate to the ~/Applications/devops-test-runtime.app/Contents/Resources directory where the runtime script is located.
    2. Run the following commands:
      export DEVOPS_TEST_HUB_URL=<dth_url>
      export DEVOPS_TEST_PROJECT_ID=<project_id>
      export DEVOPS_TEST_OFFLINE_TOKEN=<offline_token>
      export DEVOPS_TEST_AGENT_NAME=<agent_name>
      ./devops-test-runtime agent

      Confirmation messages about the agent starting and registering are displayed. Go to step 13.

    Debian/Ubuntu (64-bit .deb) Perform the following steps:
    1. Navigate to the /opt/hcl/devops-test directory where the runtime script is located.
    2. Run the following commands:
      export DEVOPS_TEST_HUB_URL=<dth_url>
      export DEVOPS_TEST_PROJECT_ID=<project_id>
      export DEVOPS_TEST_OFFLINE_TOKEN=<offline_token>
      export DEVOPS_TEST_AGENT_NAME=<agent_name>
      ./devops-test-runtime agent

      Confirmation messages about the agent starting and registering are displayed. Go to step 13.

    RHEL/Fedora/OpenSUSE (64-bit .rpm) Perform the following steps:
    1. Navigate to the /opt/hcl/devops-test directory where the runtime script is located.
    2. Run the following commands:
      export DEVOPS_TEST_HUB_URL=<dth_url>
      export DEVOPS_TEST_PROJECT_ID=<project_id>
      export DEVOPS_TEST_OFFLINE_TOKEN=<offline_token>
      export DEVOPS_TEST_AGENT_NAME=<agent_name>
      ./devops-test-runtime agent

      Confirmation messages about the agent starting and registering are displayed. Go to step 13.

  13. Log in to Test Hub and navigate to Infrastructure > Agents and Intercepts to view the agent details that you registered.

Results

You have installed and registered a DevOps Test Runtime agent.

What to do next

You can run the test and view the results. See Running server test assets on an agent.