Jmeter Overview
JMeter is an Apache Jakarta project that can be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications.
JMeter can be used as a unit test tool for JDBC database connections, FTP, LDAP, Webservices, JMS, HTTP and generic TCP connections. JMeter can also be configured as a monitor, although this is typically considered an ad-hoc solution in lieu of advanced monitoring solutions.
JMeter supports variable parameterization, assertions (response validation), per thread cookies, configuration Variables and a variety of reports.
JMeter architecture is based on plugins. Most of its "out of the box" features are implemented with plugins. Off-site developers can easily extend JMeter with custom plugins.
A bad response time on your Web site can drive away visitors and prospective customers. Unfortunately, you may not realize that your Web site is having problems until people start complaining. To gain a more quantitative insight as to what your site can handle, you need a way to simulate and analyze different load scenarios.
Using Jmeter, a powerful performance tool from the Apache Jakarta project, you can load test Web pages, Web applications, databases, and several other static and dynamic resources.
Install Jmeter
First off, download Jmeter. We are using the version 2.3.4 of JMeter on a Microsoft® Windows® XP Professional platform. Unzip the downloaded file into a directory. We'll refer to this directory as [JMeter-Root].
In order to run JMeter, you need to run one of the following:
# [JMeter-Root]/bin/jmeter.bat (in Windows)
# [JMeter-Root]/bin/jmeter (in Unix)
After the main screen loads, you'll notice two elements in the left pane, Test Plan and Workbench. The Test Plan is a container for running tests. The Workbench is a sandbox for any test or portion of a test that you are working on. When you are ready to test what you have designed in the Workbench, you can copy or move the elements into the Test Plan.
JMeter
Elements
Here's a summary of the elements to be demonstrated in this article:
Thread Groups
A thread group allows you to define the behavior of a group of threads that will interact with your application. Think of each thread as a person sitting at their computer, trying to access a given Web page. You will use thread groups to define the number of threads that a test will launch.
The Test Plan
Right-click on the Test Plan icon to see the context menu that allows you to add sub elements.
You can use the Add feature to create a hierarchy of elements that will then execute when you run your test. The level in which an element exists determines the elements upon which it has an effect. Generally, higher elements within a branch of the hierarchy will affect lower elements within the hierarchy. For example, if you put a timer at the root level of the Test Plan, it will apply to all tests that exist under the Test Plan.

Timers
Timers are used to create delays between requests made by each simulated user. Without a timer, your requests hit the server back to back, as fast as possible. Timers allow for a more realistic load on the server. There are different types of timers that allow you to produce either constant or random delays.
Listeners
Listeners gather data as your tests run, and allow you to report on that data. You can use listeners to create graphs or export data to files.
Target Web Page
This article's example is deliberately simple. There are two static Web pages: one with an 800x600 pixel image that is approximately 50K in size and another with a 1024x768 pixel image that is approximately 250K in size. Download them here.
I will mainly describe the processes I followed to setup a Test Plan in jMeter. I think the learning curve with this application is very minimal, as once you understand what the basic terminology is, that’s pretty much it. At the top of the hierarchy is something called a ‘Test Plan’. This is what you add all your sub-actions to. Here is how the initial screen looks like once you have opened it up.