Configuring the MEP settings for the Camel transport

The Camel components that have endpoints that send and receive messages by using Camel as a transport or a messaging broker. You can configure the Camel transport for the message exchange pattern (MEP) in HCL OneTest API and create tests for the application based on the MEP settings.

Before you begin

You must have defined a service component and an operation under a service component in the Logical View. See Creating a service component and Creating an operation.

About this task

When you create a test by using MEP in HCL OneTest API, the test can contain any or all of the following messaging actions:
  • Publish
  • Subscribe
  • Publish/Subscribe

You can configure the MEP settings on the operation that you created for the logical resource or connection from the Logical View.

Procedure

  1. Double-click the operation to open the Operation dialog.
  2. Click the Message Exchange Pattern tab, if it is not already open.
    The following options for the MEP are displayed in the Pattern field:
    • Publish/Subscribe
    • Publish
    • Subscribe
  3. Select the Publish/Subscribe pattern.

    You can also select only the Publish or Subscribe pattern.

  4. Click the Publish tab, if it is not already open.
  5. Complete the following steps in the Publish tab:
    1. Click Browse in the Binding panel, and then select Camel as the required transport in the Select a Resource dialog box.
    2. Select from the following options for the action you want:
      Option Action
      No If you select No, you can select any transport in the project.
      Yes If you select Yes, you can select only transports that are referenced (directly or indirectly) by the operation that contains the test.
      Only Direct If you select Only Direct, you can select only transports that are referenced directly by the operation that contains the test.
    3. Click OK.
    4. Select Text as the message type from the list in the Message Type field.
      Note: For messages that are not in the Text format, you must select the Binary option.
    5. Add parameters or headers for the messages you are publishing that depends on the specifications for the Camel component.
    6. Select the schema that must be applied for the messages.
  6. Click the Subscribe tab.
  7. Complete the following steps in the Subscribe tab:
    1. Click Browse in the Binding panel, and then select Camel as the required transport in the Select a Resource dialog box.
    2. Select from the following options for the action you want:
      Option Action
      No If you select No, you can select any transport in the project.
      Yes If you select Yes, you can select only transports that are referenced (directly or indirectly) by the operation that contains the test.
      Only Direct If you select Only Direct, you can select only transports that are referenced directly by the operation that contains the test.
    3. Click OK.
    4. Select Text as the message type from the list in the Message Type field.
    5. Add parameters or headers for the messages you are subscribing that depends on the specifications for the Camel component.
    6. Select the schema that must be applied for the messages.
  8. Click OK to save the MEP settings and exit from the operation settings window.