Let us see how we can make a test plan for JMS (Java Messaging Service). There are different types of JMS servers like IBM WebSphere MQ, Apache ActiveMQ, Tibco, glassfish3 and so on. For creating this test plan, we can here use Apache ActiveMQ.

Having Apache ActiveMQ installed is a pre-requisite for this test plan which can be done by following the steps below.

  1. Go to http://activemq.apache.org/download.html and download the latest version of Apache ActiveMQ.
  2. Unpack the archive to a directory of your choice such as C:\JMSTestPlan\apache-ActiveMQ-‘x.x.x’. (xxx will need to be replaced by the version number)
  3. Start the server by running the command ’:activemq start’ from the command console.
  4. Go to the admin interface http://localhost:8161/admin/ and complete authentication by entering ‘admin’ in the place of User Name as well as the password as shown below.

Now the default ActiveMQ interface will look like as shown below

In the next step, from the ActiveMQ unzipped directory, copy ActiveMQ-all-x.x.x to the folder C:\JMeter\apache-jmeter-4.0\lib.

As JMS supports two types of messaging which are point-to-point messaging (Used when a response is expected by the sender) and topic messaging (Used where a publisher produces a message for which there are many subscribers). We can use the above set up to test both point-to-point JMS Test plan and Topic JMS test plan.

In order to build a JMS Point-to-Point test plan, you need to add users and then JMS point-to-point sampler which is needed to define various tasks these users will be performing after which you create a listener for storing the results of JMS requests and then you can save and execute the test plan.

Similarly, for JMS Topic test plan, you initially add the users, after that you add JMS Publisher and Subscriber for defining the tasks the users will be performing. Next step is to create a listener for storing the result and finally save and execute the test plan.