Recording MQ telemetry traffic
The HTTP/TCP proxy enables HCL OneTest™ API to record MQ telemetry transport traffic that is routed through the proxy.
Before you begin
- HCL OneTest™ API
- HTTP/TCP proxy in HCL Quality Server
- Access to a physical MQ telemetry transport broker and to one or more MQ telemetry transport clients
- In HCL OneTest™ API, create the required physical MQ telemetry transport broker resource. Completing this task enables HCL OneTest™ API to connect to the physical MQ telemetry transport broker that you want to use.
- Determine the number of topics that you want to record:
- If you want to record many topics, create a logical MQ telemetry
transport connection. Completing this task enables HCL OneTest™ API
to record logical resources. Note: In the Recording tab of the MQTT Connection window, you have the option to specify the topics that are to be matched when recording.
- Alternatively, if you want to record only one topic, you can create
an operation to specify the topic upon which the data will be published.
In the Message Exchange Pattern tab in the Operation window,
complete the following tasks:
- Click Browse to select the physical MQ telemetry transport broker resource that you want to use for recording.
- In the Topic field, enter the name of the topic that you want to record.
- Optional: In the Client ID field, enter a 23-byte string to identify the operation as a specific MQ telemetry transport client.
- If you want to record many topics, create a logical MQ telemetry
transport connection. Completing this task enables HCL OneTest™ API
to record logical resources.
About this task
In HCL OneTest™ API, MQ telemetry transport traffic is recorded by connecting to the MQ telemetry transport broker that you want to use and subscribing directly to topics communicated from that broker.
You can create tests and stubs from any events captured in the Recording Studio perspective.
Procedure
- In HCL OneTest™ API, open the Recording Studio perspective.
- Create an event monitor for recording traffic from the
MQ telemetry transport broker:In the Select a Resource window:
- Select a logical MQ telemetry transport connection if you want to record multiple topics.
- Alternatively, select an operation if you want to record only a single topic.
- Start a recording session by clicking Start Recording () on the toolbar of the Events View window.
- Wait for recorded events.
- Stop the recording session by clicking Pause recording () on the toolbar of the Events View window.
Results
All events captured are displayed in the Events View of Recording Studio as publish actions in Byte Array message format.
This means that HCL OneTest™ API does not distinguish between publish and subscribe actions in data flows between MQ telemetry transport clients and consumers.
It also means that HCL OneTest™ API does not take into account the direction of messages between physical MQ telemetry transport brokers and MQ telemetry transport client applications.
You can use the Recorded Events wizard to save the recorded events as a test, stub, or other project resource.