Running DevOps Test Virtualization tests on the HCL DevOps Deploy server

After you install the DevOps Deploy plugin for DevOps Test Virtualization on the HCL DevOps Deploy server, you can create a process request that contains the test for your application, and then run the test on the HCL DevOps Deploy server.

Before you begin

You must have completed the following tasks:

About this task

After you have installed the DevOps Deploy plugin for DevOps Test Virtualization on the HCL DevOps Deploy 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 DevOps Test Virtualization test step to edit the step properties for the test you want to run. After you select 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 Deploy server, if you are not already logged in.
  2. Click Components from the Deploy 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 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 in the design area.
  4. Select the process step that you want to run by performing the following steps:
    1. Search for the HCL DevOps Test Virtualization test process step from the left design pane.
    2. Select the Run HCL DevOps Test Virtualization 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 HCL DevOps Test Virtualization test icon Edit icon to edit the properties of a component process.

      The Edit Properties for HCL DevOps Test Virtualization test dialog of the selected test is displayed.

    2. Specify the properties for the selected test step described by the action in the following table:
      Note: All mandatory fields are marked with an asterisk (*) in the UI.

      The following table provides the options for the task that you must configure.

      Field

      Description

      Action

      Name

      The name of the test step. The default name that is displayed is Run HCL DevOps Test Virtualization test.

      Enter a name for the test step that helps you to identify the step.

      Test Integrations and APIs Installation Directory

      The path where Test Integrations and APIs is installed on your computer.

      Enter the full path to the location where Test Integrations and APIs is installed on your computer.

      For example, the path can be: C:\Program Files\HCL\DevOpsTestAPI

      Environment

      The environment defined in the test to use in the test run.

      Enter the name of the environment defined in the test asset.

      Project Directory

      The path where the project containing the test is located on your computer.

      Enter the full path to the location of the project containing the test.

      For example, D:\Projects\<my_project>.

      Project

      The name of the project containing the test.

      Enter the name of the project containing the test.

      For example, <my_project.ghp>.

      Test Resources

      The test resources contained in the project that you want to run.

      Enter the name of the test resources that you want to run. For example, the test resource can be a test, test suite, or a stub.

      Disable Results Publishers

      Check box when selected disables the publishing of test results to the results publishers specified in the Results Publishers field and uses the results publishers specified in the test asset.

      Select this option if you want to override the results publishers that were specified in the test asset with the publishers specified in the Results Publishers field.

      Results Publishers

      The results publishers that are used to publish the test results.

      Enter the name of the publishers that must be used to publish the test results. The publishers override the results publishers that were specified in the test asset.

      Results server logging

      The method to use to write the results server URL that was used in the test run, to the console log.

      Select any of the following options:

      Option

      Result

      absolute

      Displays the path to the results server URL as an absolute path.

      ignore

      Ignores and does not display the path to the results server URL.

      relative

      Displays the path to the results server URL as relative to the results server configured in the test asset.

      Input Property File

      The path to the location that contains the properties file.

      Enter the full path to the location where the properties file that contains the input properties to be used in the test run resides.

      Working Directory

      The absolute path to the working directory for the step

      Enter the absolute path to the working directory for the step. If no path is specified, the default path to the process-specific working directory is used for the step.

      Precondition

      A precondition script that determines whether the step must be run.

      Edit the script to enter an option as follows:
      • True, if you want this step to be run.
      • False, if you do not want this step to be run.
      Note: You must enter an option in this field.

      Post Processing Script

      Enables you to provide a script that is applied on the test result to identify the verdict of the test or to highlight lines in the log that you want.

      Select from the following actions:
      • Use the Step Default as the post processing script.
      • Enter a new script by performing the following steps:
        1. Click New.
        2. Edit the script for the Step Default.
        3. Enter a name and description for the script.
        4. Click Save to save the script.

      Use Impersonation

      Check box when selected runs the test as a different user.

      Select from the following options:
      • Select the check box if you want to run the test as a different user.
      • Do not select the check box if you want to run the test as a user.

      Auth Token Restriction

      Specifies the URLs that the token of this step is allowed to access. The list of allowed URLs specified in the server is used as the default list.

      Select from the following actions:
      • Use the System Default list of allowed URLs.
      • Edit the System Default list, if you want to add specific URLs for your test run.
      • Enter a new script by performing the following steps:
        1. Click New.
        2. Enter a name and description for the list.
        3. Enter a valid request by selecting the method and entering the URL to be accessed.
        4. Click Save to save the list.

          You can use the list that you created in the test run to access the specified URLs.

    3. Click OK to save the properties for the test.
  6. Click Save in the design area.
  7. Click the Resources tab from the Deploy 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 Deploy 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 Deploy dashboard.
    2. Click Create Application.
    3. Complete the details in the Create Application dialog, 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, 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, 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, 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, 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 Deploy 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 Deploy dashboard shows the progress of the application process request.

Results

You have used the DevOps Deploy plugin for DevOps Test Virtualization to integrate Test Virtualization with Deploy and run the test from your project on the Deploy server.

After the Deploy 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 Deploy dashboard by expanding the step. You can then expand the application process. You can 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.