Creating logical HTTP connections

In HCL OneTest API, tests and stubs reference the logical resources in a project. Therefore, you must create at least one logical HTTP connection for each HTTP transport that you want to use.

Before you begin

Ensure that there is at least one environment in your project. If there are no environments, you must create one. See Creating an environment.

About this task

Two alternative methods to manually create a logical HTTP connection are available:

Procedure

  1. Open the Logical View of the Architecture School perspective.
  2. Click Web > HTTP Connection from the toolbar.

    The New HTTP Connection dialog is displayed.

  3. Enter a name for the connection in the Name field, and then click OK.
    The logical HTTP connection that you created is displayed in the canvas of the Logical View.
    Note: When a logical connection is created, a new physical resource is also created and bound in this environment. You can view or edit this physical resource by right-clicking the new connection, and then clicking Physical Resource.
  4. Double-click the logical HTTP connection that is displayed on the canvas of the Logical View.

    Alternatively, right-click the logical HTTP connection, and then click Open.

    The HTTP Connection dialog is displayed.

  5. Optional: Associate the new logical HTTP connection with a different logical resource by completing the following steps:
    1. Click Parent.

      The Select a Resource window is displayed.

    2. Under Logical, select a different parent resource.
    3. Click OK.

      The Resource Path field on the Properties tab of the HTTP Connection window displays the updated resource path information.

  6. Optional: Click the Bindings tab.

    If you did not bind the HTTP connection to a physical HTTP server resource, UNBOUND is displayed in the Binding column.

    To bind the HTTP connection, click UNBOUND and choose a web server from the list.
    Note: Alternatively, you can modify the bindings for an environment in the Environment Editor window (Project > Edit Environments).
  7. Add a log file for the new logical HTTP connection by clicking the Monitoring tab.

    The log file can be monitored during the execution of a test that involves the new logical HTTP connection.

  8. If you want to enter additional information about the new logical HTTP connection, click the Documentation tab.
    This information can help with the maintenance of the resources in your project or help future users of your project.
  9. Change the Display Color option for this transport in the Events View by performing the following steps:
    1. Click the Recording Studio tab.
    2. Click the color box to change the display color.
    3. Select the color that you want from the palette.
    4. Click OK to apply the selected color as the display color.
  10. Click OK.

Results

The new logical HTTP connection is added to your project.

What to do next

When a logical connection is created, a new physical resource is also created and bound to the logical connection. To view or edit this physical resource, you can perform one of the following actions:

After you have a logical HTTP connection that is bound to a physical web server in an environment, use those resources to create tests and virtual services (stubs). See Testing with the HTTP transport and Virtualizing HTTP.