How to perform Load testing on IBM MQ using LoadRunner?

What is JMS (Java Messaging Service)?

JMS is an API used to establish messaging communication in between the software components or applications. It will be used to create/send/receive/read the messages from one entity to another entity or multiple entities. JMS playing a major role in any Enterprise Applications.

There are lot of JMS service providers available in the market as follows;

  • Apache Active MQ
  • Apache Qpid
  • IBM MQ
  • Amazon SQS’s
  • HornetQ from JBoss
  • OpenJMS
  • Open Message Queue
  • Oracle AQ
  • RabbitMQ

In this post, we are going to see How to do load testing on IBM Websphere MQ from the above list of providers;

You can use Java Vuser protocol available in the Load Runner to load test the IBM Websphere MQ specific request cum response. I’ve used community edition of Load Runner v12.60 in this post and got 50 concurrent users as free license under community edition.

Our objective is to trigger the concurrent request to IBM MQ series and the other side transaction processing component is running to handle the MQ specific request processing with the appropriate business logic connected with the backend as illustrated below;


The above load testing workflow is application for any MQ series available in the market as stated in the JMS service providers section. In this post, tried with point to point (PTP) messaging domain under synchronous approach of each request should be receiving the expected response but reply queue part not enabled in the below view.

Build Transaction Request from flat file:

  1. Expected message format can be sent to Message Queue and it should be framed in a flat file or xml file or even hard coded in the String variable
  2. Use javax.xml.parsers.DocumentBuilderFactory object to load the xml file using the org.xml.sax.InputSource
  3. Store the xml file content to object using javax.xml.transform.Transformer object and again store the final value into another String variable
  4. String variable value should be pushed to MQ under send message concept

Create Queue:

  1. Create an object using
  2. Set the pre-requisites using the above object based on the below parameters;






  1. Create a MQ connection using and set the Queue username and password as parameters
  2. Create a Queue using

Send Message:

  1. Create Sender object using
  2. Create an object using javax.jms.TextMessage and pass the String Variable value as mentioned in the ‘Build Transaction Request from flat file:part
  3. Start the connection
  4. Send the message using the Sender object
  5. Message should be successfully sent

The above stated client program should be appended inside the action() method associated with VuGen editor or eclipse editor.

  • Map the required jar files in the classpath section of LoadRunner VuGen
  • Compile the Script in the LoadRunner VuGen editor
  • Run the script
  • Ensure the transaction request reached MQ and Transaction processing component log

Go to LoadRunner Controller;

  • Map the above VuGen Script in the Controller window
  • Set the number of VUsers under Design section (Concurrent Users)
  • Set the Duration (Time period)
  • Set the ‘Stop the VUsers’ simultaneously or time interval
  • Start the Scenario to perform load testing in which multiple number of concurrent request will be triggered to the IBM MQ using the Java client program integrated with LoadRunner Java VUser
  • Once the execution completed, Go for Analysis to analyse the performance test report generated by LoadRunner
  • Ensure the Transaction Processing Entity/Component capability through IMB MQ in which multiple number of request triggered from the LoadRunner controller


Thank you!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s