If you are working on any web service testing (any type of testing), then probably you would have heard or know about SOAP over JMS protocol. If you know about SOAP over JMS protocol, you can skip few sections below and directly jump into performance testing section, else, please continue to read.
A Brief Introduction
Web Services provide a platform to interact between two systems which are built on different technologies. If the technology A wants to interact with the technology B, web service plays as a mediator between A and B. Mostly the interaction will happen using XML. The communication between A and B is kind of average in terms of features. If you want much more reliability and interoperability for each transaction (interaction) then simple SOAP over HTTP will not help. JMS is the solution.
What is JMS?
JMS stands for Java Messaging Service which is a part of Oracle’s J2EE (Java 2 Enterprise Edition) standard. J2EE includes server pages, enterprise java beans, servlets and other java technologies. JMS is a messaging capability to J2EE where it allows to send objects between systems. The messages which arrives can be validated and acknowledged. IBM’s MQSeries is the another messaging technology.
How to test SOAP over JMS?
To test the SOAP over JMS using Apache JMeter, there are three types of JMS samplers are available.
- JMS Point-to-Point
- JMS Publisher
- JMS Subscriber
JMS Point-to-Point sampler helps to send messages (optionally receive messages) through point-to-point connections i.e. queues. Below is the sample JMS Point-to-Point sampler in JMeter. When this sampler triggers, it will send the message and receives the message.
JMS Publisher will publish the message to the queue or topic. To work on JMS messaging, you need to associate relevant JARs to the test plan.
JMS Subscriber will subscribe to messages to the topic or queue.
How to calculate response time for JMS requests?
Whenever the concurrent JMS requests being sent to the server, it will get queued and then it will get processed one by one. If there are multiple engines, as per the balancing techniques, the requests get distributed and processed. Response time can be calculated by number of requests divided by elapsed time.
Response time = (number of requests / elapsed time)
e.g. if there are 150 requests which got processed by 200 milliseconds, then for one request response time is 150/200 = 0.75 milliseconds
This is for one request process, there will be many processes running concurrently in each engine. Sum of all the processes for all the engines will give the response time for the JMS message. In this way, JMS performance can be calculated.
JMeter or any performance testing tool response time will be invalid for performance testing SOAP over JMS like protocols. Tool will just trigger the requests, if the response is getting received/stored in the tool, then the performance is valid, else the metrics from the tool is inappropriate.
If you like my article, please do share in your favorite social media. Please do not forget to subscribe to my weekly newsletter, it is FREE.