Putting It into Practice with JMeter
To simplify the examples, we will not implement all the good practices outlined in the Chapter 5, Prepare Test Environments (Injectors and Tested System) and Chapter 3, Design a Test Case.
In particular, note that the tests will be performed locally (on JMeter and MOM) – avoid this in real life!
Example 1: Testing the Configuration of an MOM server with Point-to-Point Messaging
Our first test will be on an MOM server with point-to-point messaging.
We will use ActiveMQ as our MOM:
- Before starting with our JMeter test plan, let's create a queue named JMeterBook.
- At first, we will send a message in a queue.
- In JMeter, we will configure JMS Point-to-Point as follows:
Figure 10.41: Sending a message in ActiveMQ
In this example, we generate a unique JMSCorrelationId identifier using the following JMeter functions:
- ${__time(YMD,)}: Returns the current date
- ${__threadNum}: Returns the number of the current thread ...