Previous Topic: Monitor and Close Cached Asset InstancesNext Topic: BEA Steps


Tutorial - Send and Receive a JMS Message

This tutorial provides an introduction to using the JMS Send Receive test step.

Prerequisites

Step 1 - Create JMS and JNDI Assets

In this procedure, you create JMS and JNDI assets from test steps in an example test case.

Follow these steps:

  1. Go to DevTest Workstation and open the examples project.
  2. In the Tests folder, open the jms.tst test case.
  3. Select the first JMS Messaging (JNDI) step. This step has the name jms-1.
  4. Click the Generate assets from the selected steps button in the model toolbar.
  5. Select the second JMS Messaging (JNDI) step. This step has the name send-msg-post-update.
  6. Click the Generate assets from the selected steps button in the model toolbar.
  7. In the Configs folder, open the project configuration.
  8. Confirm that the JMS and JNDI assets were generated. In the next procedure, you select two of the JMS destination assets.

Step 2 - Configure the JMS Send Receive Step

In this procedure, you perform the following actions:

The following graphic shows a portion of the step editor. The fields that you change are highlighted.

Screen capture of step editor with fields highlighted.

The Send Destination field specifies the queue to which the message is sent.

The Receive Destination field specifies the queue from which the response is received.

The Content area specifies the text of the message.

Follow these steps:

  1. Create a test case in the examples project.
  2. Add a JMS Send Receive step.

    The step editor appears.

  3. In the Send Destination list, select queue/A.
  4. In the Receive Destination list, select queue/B.
  5. In the Content area, type a sentence.
  6. Save the test case.

Step 3 - Examine JMS and JNDI Assets

In this procedure, you examine one of the JMS destination assets that the JMS Send Receive step uses. You also examine the JNDI context asset that the JMS destination asset uses.

Follow these steps:

  1. Click the Edit Selected Asset button that appears to the right of the Send Destination list.

    The editor for the JMS destination asset appears.

  2. Review the parameters, but do not change them. You can place the mouse pointer over the parameter names to display tooltips.
  3. Click the Edit Selected Asset button that appears to the right of the JNDI Context list.

    The editor for the JNDI context asset appears.

  4. Review the parameters, but do not change them.
  5. Click Cancel to return to the editor for the JMS destination asset.
  6. Click Cancel to return to the step editor.

Step 4 - Test the JMS Send Receive Step

In this procedure, you verify that the JMS Send Receive step is configured correctly.

Follow these steps:

  1. Click the green Execute button in the step editor.
  2. Confirm that the Request tab and the Response tab contain the same sentence.
  3. Close the step editor.