Setting up intercepts

When you want to run virtual services on HCL DevOps Test Hub (Test Hub), you can set up intercepts to route requests to the virtual service. You must configure the intercepts with the Test Hub URL, team space ID, and offline user token that is generated from Test Hub so that the intercepts can register with Test Hub.

Examples of intercepts include the HTTP proxy component of HCL DevOps Test Virtualization Control Panel (Test Virtualization Control Panel) and the HCL DevOps Test Integrations and APIs (Test Integrations and APIs) Java virtualization agent available from the Test Virtualization Control Panel tools page.

Before you begin

You must have completed the following tasks:

About this task

You must edit the registration.xml file for the intercept to allow it to register with Test Hub.

Procedure

  1. Perform the following steps in Test Hub:
    1. Log in to Test Hub.

      The Team Space Dashboard page is displayed.

    2. Generate the offline user token by clicking the User icon Image of the icon., and then click Create Token.
    3. Copy the offline user token to a text file.
    4. Click the Settings icon Image of the settings icon. of the team space in the My Team Spaces page.

      The Team Space Configuration page is displayed.

    5. Copy the text that is displayed under URL alias as the Team Space ID.
  2. Perform the following steps to edit the registration.xml file for the intercept. For most intercepts this is in the root directory of the extracted intercept compressed file. For the HTTP/TCT proxy it is in the <DTVCP_install_directory>\httptcp directory on the computer on which you have installed Test Virtualization Control Panel.
    1. Open the registration.xml file by using a text editor.
    2. Enter the values for the following attributes:
      Note: If an entry exists, you must either comment out that entry and add a new one or replace the contents with the values indicated.
      Attribute Value
      server base-url URL of Test Hub
      security-token Offline user token generated from Test Hub
      team-space-id ID of the team space to which the proxies must register
    3. Save and close the file.
    4. Perform any of the following actions:
      • Restart the HTTP proxy, if you updated the registration.xml file of the HTTP/TCP proxy.
      • Restart the application that is configured to use the any of the other intercepts other than HTTP/TCP.
  3. Perform the following steps in Test Hub to view the HTTP proxies that are registered in the team space:
    1. Log in to Test Hub.
    2. Click Infrastructure > Agents and Intercepts to view the registered intercepts.

      The intercepts that you configured with your offline user token and Team Space ID are displayed.

Results

You have successfully configured intercepts and viewed that they are registered with the team space in Test Hub.

What to do next

You can perform the following tasks: