Run MSMQ messages

Tricentis Tosca API Scan enables you to run messages using a Microsoft Message Queuing (MSMQ) connection. A MSMQ queue temporarily stores messages that are sent by one or more senders and read by one or more receivers. This allows different systems to communicate independently, e.g. if one of them is offline.

You can select whether you want to read messages or send messages, i.e. if you want to pull messages from a MSMQ queue or push messages to a MSMQ queue.

After running your MSMQ messages in API Scan, you can export them to Tosca Commander and use the message information to define Module Attributes and verify their values. Depending on your tests, you have to export the messages either as an API TestCase or as an OSV Scenario. It is not possible to convert a JMS TestCase into a JMS Scenario, or vice versa.

You can not export MSMQ messages directly from API Scan to OSV. You have to export them to Tosca Commander first and set the correct ActionModes manually before uploading to OSV.

For an example of working with queue messages, see chapter "Example: Work with queue messages".

Pull messages

To pull messages from a MSMQ queue, follow the steps below:

  1. Create a message from a URI or file, or create a new message.

  2. Select a MSMQ connection from the Connection dropdown menu.

  3. Select Pull from the Action dropdown menu.

Select Connection and Action

  1. Optionally, you can specify a filter to pull only specific messages from the queue. To do so, enter MSMQ message details such as the MessageID in the Selector field.

    If you do not specify a selector, you receive the first message from the queue. If more than one message matches your filter criteria, you receive the first matching message from the queue.

  2. Click on Run in the API Scan menu to pull a message from the queue.

Response of a pull message

The headers of the response message contain additional information such as the message ID. The Headers section is collapsed by default.

To display the header list, click the arrow icon on the right side of the message section.

Push messages

To push messages to a MSMQ queue, follow the steps below:

  1. Create a message from a URI or file, or create a new message.

  2. Select a MSMQ connection from the Connection dropdown menu.

Select Connection and Action

  1. Select Push from the Action dropdown menu.

  2. Click on Run in the API Scan menu to push your message on the queue.

The response indicates if the MSMQ broker pushed the message to the queue successfully.

Push response