Creating logical MongoDB transport connections

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

Before you begin

You must have at least one environment in your project. If there are no environments, you must create one.

Procedure

  1. Open the Logical View of the Architecture School perspective.
  2. On the toolbar of the Logical View, select General > MongoDB Connection.

    The New MongoDB Connection window is displayed.

  3. In the Name field, enter a name for the connection.
  4. Select OK.

    The New MongoDB Connection window is closed and the new logical MongoDB connection is displayed in the canvas of the Logical View.

  5. When a logical connection is created, a new physical resource is also created and bound in this environment. To view or edit this physical resource, right-click the new connection and select Physical Resource.
  6. Double-click the new logical MongoDB connection.

    The MongoDB Connection window is displayed.

    Alternatively, right-click the logical MongoDB connection and select Open in the pop-up menu.

  7. To associate the new logical MongoDB connection with a different logical resource, complete the following tasks:
    1. Select Parent.

      The Select a Resource window is displayed.

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

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

  8. Optional: Select the Bindings tab. Alternatively, select Project > Edit Environments in the menu bar to open the Environment Editor window and select the Bindings tab to modify the bindings of the selected environment.

    If you did not bind the MongoDB connection to a physical MongoDB broker, UNBOUND is displayed under Binding and you must complete the following tasks:

    1. When you select UNBOUND, it displays a list of all physical MongoDB brokers in your project.
    2. Select a physical MongoDB broker. If there are no physical MongoDB brokers displayed, you must create one.
  9. Optional: To add a log file for the new logical MongoDB connection, select the Monitoring tab.

    You can monitor the log file during the execution of a test that involves the new logical MongoDB connection.

  10. Optional: To enter additional information about the new logical MongoDB connection, select the Documentation tab. Although this additional information is optional, it might help with the maintenance of the resources in the project or help future users of the project.
  11. Select OK.

Results

The new logical MongoDB connection is added to the project.