Running HCL OneTest Server tests on the UCD server

After you install the HCL OneTest Server UCD plugin on the UCD server, you can create a process request that contains the test for your application, and then run the test on the UCD server.

Before you begin

You must have completed the following tasks:
  • Added the tests that you created in the desktop clients for your application to the project on HCL OneTest Server.
  • Installed the latest version of the HCL OneTest Server UCD plugin. See Installing the plugin.
  • Generated an offline user token from HCL OneTest Server. See Generating an offline token.

About this task

After you have installed the HCL OneTest Server UCD plugin on the UCD server, you can either use an existing component in your project or create a component. You can create a component process and select the HCL OneTest Server test step to edit the step properties for the test you want to run. After selecting the agent, you can create an application. You can then create an application process for the application, and then submit the application process for a run.

Procedure

  1. Log in to the UrbanCode Deploy (UCD) server, if you are not already logged in.
  2. Click Components from the UCD dashboard, and then click Create Component to create a component.
    Note: You can either use an existing component or create a component.
  3. Create a component process in the component by performing the following steps:
    1. Open the component that you created.
    2. Click the Processes tab from the component dashboard, and then click Create Process.

      The Create Process dialog box is displayed.

    3. Enter the required values to create a component process and click Save.
      Note: All mandatory fields are marked with an asterisk (*) in the UI.
      1. Enter the process name in the Name field.
      2. Select Operational (No Version Needed) from the Process Type list.
      Note: The Default Working Directory field displays the folder path where the agent can download the artifacts and create temporary files.

      The process that you created is listed in the Processes list and the Design tab for the process is displayed.

      Note: The process opens in the process editor. The process editor lists the plugins and steps. The required Start and Finish steps represent the beginning and the end of the process and are automatically placed on the design area.
  4. Select the process step you want to run by completing the following steps:
    1. Search for the HCL OneTest Server test process step from the left design pane.
    2. Select the Run HCL OneTest Server test process step and drag the test into the design area.

      The selected test is placed in between the Start and Finish steps.

  5. Specify the properties for the selected test by performing the following steps:
    1. Click the Edit icon Edit icon to edit the properties of a component process.

      The Edit Properties for Run HCL OneTest Server test dialog box of the selected test is displayed.

    2. Specify the properties for the selected test step by following the action in the table that follows.
      Note: All mandatory fields are marked with an asterisk (*) in the UI.
      Field Action required for a HCL OneTest Server test
      Name Enter the name of the step.
      HCL OneTest Server URL Enter the URL for HCL OneTest Server.
      Offline Token Enter the offline token that you generated from HCL OneTest Server.
      File Path Enter the file path of the HCL OneTest Server test that you want to run.
      Branch Name Select the branch where the test assets are stored.
      Repository Link Enter the repository path for the test to run.
      Project Name Enter the name of the project that contains the test to run.
      RIT Environment Enter the HCL OneTest API environment details for the test.
      Note: This field is applicable only for an API test.
      Field Optional action for a HCL OneTest Server test
      Working Directory Specify an alternative path to the working directory for this step. 1
      Post Processing Script Specify if you want to run any scripts after the completion of the test run. You can click New to add new scripts. 1
      Precondition Specify any conditions that are to be completed before the test runs. You can edit the script by clicking the script displayed. 1
      Use Impersonation checkbox Select this checkbox to run the test as a different user. 1
      Auth Token Restriction Set the authentication token actions by applying token restrictions.

      The System Default is selected by default. You can add a new token restriction or edit the one already added. 1

      Custom Trust Store Path Enter the file path of your trust store followed by the file name in the Custom Trust Store Path field if the HCL OneTest Server uses an internal CA certificate and you have imported the certificate to a custom trust store.
      Custom Trust Store Password Enter the trust store password if you have modified the password while creating the custom trust store.
      Note: If you have not modified the trust store password, you can keep the Custom Trust Store Password field blank.
    3. Click OK to save the properties for the test.
  6. Click Save in the design area.
  7. Click the Resources tab from the UCD dashboard and create a resource by clicking Create Top-Level Group.

    The created resource is displayed on the Resource Tree tab page.

  8. Select the agent that runs the test by completing the following steps:
    Important: You must have already installed the agent on the UCD server that you want to use.
    1. Select the resource displayed on the Resource Tree tab page.
    2. Click the Horizontal ellipsis icon Horizontal ellipsis icon for the selected resource.
    3. Click Add Agent.
    4. Select the agent to add to the resource, and then click Save.

      The selected agent is added to the resource in the Resource Tree pane and the status of the agent can also be viewed.

      Important: The agent must be Online for the test to run.
  9. Add the component to the agent by performing the following steps:
    1. Click the Horizontal ellipsis icon Horizontal ellipsis icon for the agent.
    2. Click Add Component on the list.
    3. Select the component to add to the resource, and then click Save.

      The selected component is added to the agent for the resource in the Resource Tree pane.

  10. Create an application by completing the following steps:
    1. Click the Applications tab from the UCD dashboard.
    2. Click Create Application.
    3. Complete the details in the Create Application dialog box, and then click Save.

      The Environments tab page is displayed for the created application.

    4. Click Create Environment to create an environment for the application that you created.
    5. Complete the details in the Create Environment dialog box, and then click Save.

      The environment that you created is displayed.

    6. Click the environment to open, and then click Add Base Resources.
    7. Select the resource from the list in the Add Resource to Environment dialog box, and then click Save to add the resource to the environment.

      The resource added to the environment is displayed.

      Note: When you add a resource to an environment, the corresponding agent and the component are displayed for the resource.
    8. Click the application from the breadcrumbs.

      The Environments tab page is displayed for your application.

    9. Add the component to the application by performing the following steps:
      1. Click the Components tab.
      2. Click Add Component.
      3. Select the component from the list in the Add a Component dialog box, and then click Save.

      The selected component is displayed on the Components tab page.

    10. Create a process for the application by performing the following steps:
      1. Click the Processes tab.
      2. Click Create Process.
      3. Complete the details in the Create an Application Process dialog box, and then click Save.

      The Design tab page for the application process that you created is displayed.

    11. Select the component process from the left pane and drag it into the design area.
      Note: You can click the Edit icon Edit icon to edit the properties of a component process to add the properties, if required.
    12. Click Save in the design area.
  11. Select the application process to run the test by completing the following steps:
    1. Click Applications from the UCD dashboard.
    2. Click the application that you configured for a test run.
    3. Click the Request Process icon Request Process icon for the application to run the application process.

      The Run Process on <environment name> window is displayed.

    4. Select the application process that contains the test from the Process list.
    5. Click Submit.

      The UCD dashboard shows the progress of the application process request.

Results

You have used the HCL OneTest Server UCD plugin to integrate HCL OneTest Server with UCD and run the test from your project on the UCD server.

After the UCD process request runs successfully, you can view the status of the completed process request displayed as follows:
  • Success: When the test run is successful
  • Failed: When the test run is failed

What to do next

  • You can view the details of the test run as a process from the UCD dashboard by performing the following action:
    • Expand the step. You can then expand the application process. You can then hover over the process, and then click the Output Log icon Output Log icon for the test. The output log is displayed. You can verify the log details.
  • You can also view the test reports and logs of the test that was run on the UCD server from the Results page on HCL OneTest Server. See Test results and reports overview.
1 You need not set this property for a step when you are running an HCL OneTest Server test.