Test XML messages over WebSphere MQ with Rational Performance Tester

Part 2. Prepare the automation script

Comments

Content series:

This content is part # of # in the series: Test XML messages over WebSphere MQ with Rational Performance Tester

Stay tuned for additional content in this series.

This content is part of the series:Test XML messages over WebSphere MQ with Rational Performance Tester

Stay tuned for additional content in this series.

Edit and invoke the XML request

  1. Edit and invoke the XML request:
    1. Click the Source button and paste in the XML request.
    2. Click the Form and Tree buttons to verify the format, attributes, and values.
    3. Click Invoke to send the request (see Figure 1).
Figure 1. Edit XML request and invoke
Editor view, Invoke selected
Editor view, Invoke selected
  1. Verify the response, along with its attributes, and evaluate for success criteria.
Figure 2. Verify response
View request, add message attributes and elements
View request, add message attributes and elements

Record the script

  1. You can add various attributes by using the text form or the Form tab, as Figure 3 shows.
Figure 3. Add attributes to the request
Insert elements using Add and Insert buttons
Insert elements using Add and Insert buttons
  1. After the attributes are added, click the Record (red) button on the right (see Figure 3), and then click Invoke.
Figure 4. Finish recording
Stop by clicking blue square icon, upper-right
Stop by clicking blue square icon, upper-right
  1. When you have received the response, click the same button to stop recording and generate the script.

Edit the test to run with multiple data sets and validate the returned data

This section provides detailed information about the test script with the WebSphere MQ request and response, how to edit the test script for various operations like parameterization, adding verification points, and so forth.

The test script that is generated, as shown in Figure 5.

Figure 5. Test script window
Script shows request and response messages
Script shows request and response messages

The test script contains two components:

  • Request URL or message
  • Response URL or message

Clicking each of these provides options to configure the requests and responses so that the test can be simulated appropriately.

The input parameters to the request are on the right side. These are the candidates for parameterization

Figure 6. Test contents and element details
Data pool candidates and request time
Data pool candidates and request time
  1. Select the parameter to parameterize, right-click, go to Substitute, and select the data source option, as shown in Figure 7.
Figure 7. Select the data source
Screen captures shows selections described
Screen captures shows selections described
  1. Select the data pool, and choose the data pool as usual for substitution.
  2. If the XML response for the same request has changed, click Update to get the new response and update the test (see Figure 8).
Figure 8. Update response and test
Update test with new request parameters
Update test with new request parameters
  1. Add verification points.

There are five types of verification points that you can add to verify the response obtained at run time and, accordingly, to understand the success or failure percentage of the requests and responses.

Contain verification point
This verification point can check whether the entire response contains the expected message. It returns True if a part of the entire response has the expected data
 
Equals verification point
This verification point can check whether the entire response data is contains exactly the same data. It returns True if the entire response matches the expected data exactly.
 
Query verification point
This verification point checks one of the parameters in the response by querying it for the number of occurrences.
 
XSD verification point
This verification point evaluates the response against the expected XSD schema of the response message.
 
Attachment verification point
This verification point evaluates whether the response contains any attachment, either expected or not.
 
Figure 9. Still needs caption
Query verification point
Query verification point

The third and final part shows you how to run the test and then review and interpret results.


Downloadable resources


Related topics


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=841315
ArticleTitle=Test XML messages over WebSphere MQ with Rational Performance Tester: Part 2. Prepare the automation script
publish-date=10232012