This section provides instructions for recording a test scenario that simulates the action of sending the test message to the system. You will record a test that puts a message into an IBM®WebSphere® MQ Input queue, gets processed by the WebSphere Message Broker, and sends the response from the Output queue, where it is picked up by IBM®Rational® Performance Tester.
The tutorial gives you a detailed understanding of the results displayed for XML message tests and how to interpret them. You can then use that information for thorough performance analysis of the system and to identify bottlenecks.
Here are the major steps that you will complete in this three-part tutorial (screen captures are included):
- Record a test that puts a message into a WebSphere MQ input queue to be processed by WebSphere Message Broker, with the response sent at WebSphere MQ output queue that Rational Performance Tester uses.
- Edit the test so that it will run with multiple data sets and validate the returned data from the message
- Create a test executive schedule that will run multiple iterations of the test
- Execute the test and examine the test log
By following these step-by-step instructions, you will get hands-on experience in creating an XML and IBM WebSphere MQ web service test. You will then enhance the test through the built-in data-driven techniques and run the test. This tutorial contains detailed steps that give you an understanding of how to doperformance testing of messaging-based applications with IBM Rational Performance Tester Extension for SOA Quality, which is a load and performance testing and problem analysis tool that extends performance and scalability testing to SOA applications.
Typical messaging solution for testing
Figure 1. Architecture diagram along with load generation environment
Figure 2. Logical diagram and request flow
Description of solution and components
As you can see in the diagram in Figure 2, the solution consists of messaging components:
- WebSphere MQ for routing and handling the messages internal to the system
- WebSphere Message Broker for processing the message, which can include, transformation, translation and routing
This system does not have any browser using which you usually send the requests. Instead, Rational Performance Tester has a very useful utility called the generic service client, which helps in testing a system where there is no front-end or GUI. In this case, the generic service client offers an XML editor that you can use to enter the request message, configure the headers, security, add attachments, and so on. You will learn this as you progress with this tutorial
Description of application and scenarios
The application scenario consists of a message flow that accepts the incoming message intotheIN queue, processes the message, and sends it to theOUT queue. Hence, in this case, Rational Performance Tester sends a message to the IN queue and picks up the message from the OUT queue, based on correlation ID.
The sample message flow consists of three components (shown in Figure 3):
- MQ Input node
- This node picks up the message from the queue for processing and sends it to the next node in the flow.
- Java Compute node
- This node processes the message. The processing can be transformation, routing, calculations, and so on.
- MQ Output node
- This node directs the arriving message to the appropriate queue.
Figure 3. Three components of the message
Sample nonfunctional requirements for the application
Now you'll test these nonfunctional requirements for this scenario:
- Concurrent users sending requests via applications: 100
- Expected request completion time: 100 milliseconds
- Request throughput: 1000 messages per second
Using the Rational Performance Tester generic service client
This section provides instructions for recording a test scenario that simulates the action of sending the test message to the system. You will record a test that puts a message into a WebSphere MQ Input queue, gets processed by the WebSphere Message Broker, and sends the response from the Output queue, where it is picked up by Rational Performance Tester.
Listing 1 shows a sample XML test message.
Listing 1. Sample XML test message
<Code> <HelloMsgHead> <HelloMsg>Hi there!</HelloMsg> <FirstName>User</FirstName> <LastName>One</LastName> <EmailID1>email@example.com</EmailID1> <EmailID2>firstname.lastname@example.org</EmailID2> <Phone1>9876543211</Phone1> <Phone2>9123456789</Phone2> <Sex>Male</Sex> <!-- End Hello Message Head --> </HelloMsgHead> </Code>
To test send this message to the messaging system, follow these steps:
- Create a new Performance Test Project by following these steps:
- Click File > New > Project.
- Select Performance test project and click Next.
- Enter the project name and click Finish.
- Click Generic Service Client as shown in Figure 4.
Figure 4. Generic Service Client view
- Configure the Transport protocol:
- Click the Transport tab at the bottom, and select Create a WebSphere MQ configuration as shown.
Figure 5. Transport Configurations view
- Configure WebSphere MQ protocol:
- Enter these values:
- Name: Name of the protocol configuration
- Queue Manager Name: Queue manager that you want to connect to in order to send requests
- Send Queue name: The input and request queue names
- Uncheck the Local Queue manager box, and enter the address, port, and client channel of the server where the queue manager resides.
- Uncheck the Use Temporary Queue for Response option, and provide the response queue from which the messages are intended to be picked up again by Rational Performance Tester.
- Configure correlation:
- Use Message ID for correlationif you want to identify the response message ID by its request message ID. This is useful in case of advanced XML messages and headers.
- Use Correlation ID from Request to pick up the messages under response queue is the most common mechanism of identifying the response message based on request correlation ID.
- UseNo Correlationif you want any and all messages coming to the response queue to be picked up by Rational Performance Tester. This might not lead to any conclusive results, becauseRational Performance Tester will not be able to calculate the time taken for a particular message if it cannot identify the response message with the request message.
- Uncheck Use RFH2 Header if the message doesn't employ an RFH2 header.
- Change request type to request for request messages
- If the communication to messaging system is over a secure channel, provide the security configuration details by checking the Use SSL check box, and configure the SSL connection by clicking Configure SSL and providing the client / server certificates.
- Enter these values:
Figure 6. Create MQ Protocol configuration dialog window
- Configure WebSphere MQ endpoint request. This request is the XML request sent by the source application to the messaging solution.
Figure 7. Create a WebSphere MQ endpoint request
- Choose your WebSphere MQ protocol configuration.
Figure 8. Configure Protocol view options
Part 2 walks you through preparing the automation script.
- Get more information on the Rational Performance Tester Extension for SOA Quality overview and developerWorks pages.
- 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.
- Investigate IBM Rational Performance Tester Extension for SOA Quality, which is a load and performance testing and problem analysis tool that extends performance and scalability testing to SOA applications.
- Check the Rational Service Tester for SOA Quality page on developerWorks.
- Explore theRational software area on developerWorks for technical resources, best practices, and information about Rational collaborative and integrated solutions for software and systems delivery.
- Subscribe to the developerWorks weekly email newsletter, and choose the topics to follow. Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- 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 themanywhere, any time, and many of the Getting Started ones are free.
Get products and technologies
- Download the trial version of IBM Rational Performance Tester.
- Evaluate Rational Service Tester for SOA Quality V8.2.
- Evaluate other IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
- Join the Performance Testing forum, where you can share you questions and knowledge about IBM performance testing products.
- Rate or review Rational software. It's quick and easy.
- Share your knowledge and help others who use Rational software by writing a developerWorks article. Find out what makes a good developerWorks article and how to proceed.
- Follow Rational software on Facebook, Twitter (@ibmrational), and YouTube, and add your comments and requests.
- Ask and answer questions and increase your expertise when you get involved in the Rational forums, cafés, and wikis.
- Get connected. Join the Rational community to share your Rational software expertise and get connected with your peers.