jMeter - JMS Test Plan

Advertisements


In this chapter we will learn how to write a simple test plan to test JMS (Java Messaging Service). Those who are not aware of JMS please make yourself familiar with JMS before reading this chapter. JMS supports two types of messaging:

  • Point-to-Point messaging : Queue messaging is generally used for transactions where the sender expects a response. Messaging systems are quite different from normal HTTP requests. In HTTP, a single user sends a request and gets a response.

  • Topic messaging : Topic messages are commonly known as pub/sub messaging. Topic messaging is generally used in cases where a message is published by a producer and consumed by multiple subscribers.

Let us see a test example for each of these. Pre-requisites for testing JMS are:

  • We will be using Apache ActiveMQ for our example. Though there are other JMS servers like IBM WebSphere MQ (formerly MQSeries), Tibco, etc. Download the binaries from the Apache ActiveMQ website.

  • Unzip the archive, go to the decompressed directory and run the following command from the command console to start the ActiveMQ server:

    .\bin\activemq  start
    

    You can verify if the ActiveMQ server has started by visiting the admin interface at the following address http://localhost:8161/admin/. If it asks for authentication enter the userid and password as admin. The screen would be similar as below:

  • ActiveMQ Server
  • Now copy the activemq-all-x.x.x.jar (XXX depending on the version) from the ActiveMQ unzipped directory to /home/manisha/apache-jmeter-2.9/lib.

With the above setup let's build the test plan for:



Advertisements
Advertisements