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 > Web 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 and click Next.
    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. In the Select a service request interface page, complete one of the following steps:
    1. To test a service that use a WSDL file, select Web service request or Specification-based structure, click Next, and select a WSDL file.
    2. To test a service that does not use a WSDL file, select XML Request, Text Request, Binary Request or an Empty test.
  4. Click Next and select the WebSphere MQ protocol.
  5. In SOAP Action, specify the SOAP action to be used to invoke the MQ request.
  6. To override the message header and descriptor that was specified in WebSphere MQ transport configuration, click Override MQ Protocol Configuration values and specify the customize header and message descriptor.
  7. Click Finish. The service test is created.
  8. On the web service call, click Update Response.
    This opens the Response Preview window, displaying the data that will be used to perform the call.
  9. Click Update Test.
    This action calls the web service 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.