Creating a service test for WebSphere MQ

You can create an IBM® WebSphere® MQ test by adding the test elements as required and editing the test element details in the test editor.

Before you begin

Tests are stored in test projects, which are Java™ projects that include a source folder. You must create a test project before creating a test.

Ensure that you have a valid Web Services Description Language (WSDL) file for a WebSphere MQ service in your workspace.

If you are using Secure Sockets Layer (SSL) authentication, ensure that you have any required key files in your workspace.

If you are using SOAP security, ensure that you have configured the environment with the correct libraries and configuration files.

Procedure

  1. In the workbench, click File > New > Other > Test > Test Assets > Service Test or click the New Service Test New Service Test icon toolbar button.
  2. Select a project, and then, in Test file name, type a name for the test. The name that you type is the base name for the recording, test, and other required files. You see these files in the standard Navigator or the Java Package Explorer with their distinguishing suffixes, but you see only the simple (test) name in the Test Navigator.
  3. Click Finish.
  4. To add a service call, select the test element in the test editor, click Add, and then select Web Service Call.
  5. Select the WSDL file that corresponds to the call, and click Finish.
  6. Select the Protocol tab to configure the transport protocol for this call. On the Protocol page of the new call element, the MQ protocol is automatically generated with the values from the WSDL file. If necessary, click Change to configure the transport protocol for the entire test, including proxy and WebSphere MQ parameters.
    • If the WebSphere MQ server is running on the local computer, select Using local queue manager.
    • If the server is on a remote computer, clear Using local queue manager, and type the IP address or hostname, port, and client channel.
  7. On the web service call, click Update Return. This opens the Return Preview window, displaying the data that will be used to perform the call.
  8. Click Update Test. This performs the web service call and creates a message return element with the return data. If a message return element already exists, then it is updated with latest return data. With the message return test element, you can implement data correlation and content-based verification points.

Feedback