Thursday, February 28, 2019

JMeter JMS testing with IBM MQ server


Testing JMS with IBM MQ and JMeter


In order to send and receive message from IBM MQ server, you can use JMeter to test the message.  Follow the steps below to set up the JMeter to test the JMS message

1. Install latest Apache JMeter from https://jmeter.apache.org/download_jmeter.cgi


2. Copy following required IBM and other dependencies jars inside JMETER_HOME/lib/ext directory


- jmeter-jms-skip-jndi-0.0.1.jar

- com.ibm.mq.jar
- com.ibm.mqjms.jar
- connector.jar
- dhbcore.jar
- spring-core.jar
- spring-beans.jar
- javax.transaction-api.jar
- spring-jms.jar

3. Start JMeter -> create new Thread Group -> create JMS Point-to-Point from Add, Sampler


4. Add the following configuration information in the JMS Point-to-Point panel



Under JMS Properties add:

QueueConnectionFactory = CONNECTION_FACTORY
JNDI name Request queue = QUEUE_<your.request.queue.name>
JNDI name Receive queue = QUEUE_<your.response.queue.name>
Number of samples to aggregate = <1 or other value>
Communication style = <request_only/request_response>
Check both message correlation check box if needed


Initial Context Factory = <com.elega9t.jmeter.jms.InitialContextFactory>
 

Inside JNDI Properties add
hostName = <hostName>
port = <port>
channel = <channel>
queueManager = <queueManager>
transportType = 1


Inside Content text box = <your content to send to JMS>

 

JMS Point-to-Point configuration

View Result Tree and output response