Test XML messages over WebSphere MQ with Rational Performance Tester
Part 2. Prepare the automation script
This content is part # of # in the series: Test XML messages over WebSphere MQ with Rational Performance Tester
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
- Edit and invoke the XML request:
- Click the Source button and paste in the XML request.
- Click the Form and Tree buttons to verify the format, attributes, and values.
- Click Invoke to send the request (see Figure 1).
Figure 1. Edit XML request and invoke
- Verify the response, along with its attributes, and evaluate for success criteria.
Figure 2. Verify response
Record the script
- 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
- After the attributes are added, click the Record (red) button on the right (see Figure 3), and then click Invoke.
Figure 4. Finish recording
- 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
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
- 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
- Select the data pool, and choose the data pool as usual for substitution.
- 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
- 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
The third and final part shows you how to run the test and then review and interpret results.
- Find out more on the Rational Performance Tester product overview page. Then explore the Rational Performance Tester page on IBM developerWorks for links to technical articles and browse the user assistance in the Rational Performance Tester 8.2 Information Center.
- Improve your skills. Check the Rational training and certification catalog, which includes many types of courses on a wide range of topics. You can take some of them anywhere, any time, and many of the Getting Started ones are free.
- Download the trial version of IBM Rational Performance Tester.
- Evaluate IBM software in the way that suits you best.