Test XML messages over WebSphere MQ with Rational Performance Tester: Part 2. Prepare the automation script

This three-part article gives you an in-depth understanding of the latest feature of Java Message Service and WebSphere MQ testing, which is embedded as a part of the generic service client in Rational Performance Tester software. Part 2 explains designing the script for optimal playback and editing the test to run with multiple data sets.

Share:

Bharath Raj Keshavamurthy (bharathrajbk@in.ibm.com), Software performance analyst, IBM

author photoBharath works at IBM as an enterprise solutions performance lead analyst and designs solutions that meet the nonfunctional requirements of the system. He also does work pertaining to end-to-end performance engineering activities for the solution as a whole. He works with cross-brand products, with Java Virtual Machine (JVM) performance as his primary area of research and work.



23 October 2012

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
  1. Verify the response, along with its attributes, and evaluate for success criteria.
Figure 2. Verify response
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
  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
  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

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
  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
  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
  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

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

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


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