Introduction To JMeter
Introduction To JMeter
Introduction To JMeter
Have you ever tested a web server to know how efficiently it works? How many
concurrent users can a web server handle?
Let say that one day, your boss asks you to do performance
testing of www.google.com for 100 users. What would you do?
What is JMeter ?
The Apache JMeterTM is pure Java open source software, which was first
developed by Stefano Mazzocchi of the Apache Software Foundation, designed to
load test functional behavior and measure performance. You can use JMeter to
analyze and measure the performance of web application or variety of services.
Performance Testing means testing a web application against heavy load, multiple
and concurrent user traffic. JMeter originally is used for testing Web Application or
FTP application. Nowadays, it is used for functional test, database server test etc.
Why JMeter ?
JMeter advantages are described as figure below
Open source license: JMeter is totally free, allows developer use the source
code for the development
Friendly GUI: JMeter is extremely easy to use and doesn't take time to get
familiar with it
Platform independent: JMeter is 100% pure Java desktop application. So it
can run on multiple platforms
Full multi-threading framework. JMeter allows concurrent and simultaneous
sampling of different functions by a separate thread group
Visualize Test Result: Test result can be display in a different format such as
chart, table, tree and log file
Easy installation: You just copy and run the *.bat file to run JMeter. No
installation needed.
Highly Extensible: You can write your own tests. JMeter also supports
visualization plugins allow you extend your testing
Multiple testing strategy: JMeter supports many testing strategies such
as Load Testing, Distributed Testing, and Functional Testing.
Simulation: JMeter can simulate multiple users with concurrent threads,
create a heavy load against web application under test
Support multi-protocol: JMeter does not only support web application
testing, but also evaluate database server performance. All basic protocols
such as HTTP, JDBC, LDAP, SOAP, JMS, and FTP are supported by JMeter
Record & Playback - Record the user activity on the browser and simulate
them in web application using JMeter
Script Test: Jmeter can be integrated with Bean Shell & Selenium for
automated testing.
JMeter simulates a group of users sending requests to a target server, and return
statistics information of target server through graphical diagrams
The completed workflow of JMeter as show in figure below
How to install Jmeter in easy steps
Linux 2.4, 2.6, 3.1 Sun JDK 5, 6, 7 and Open JDK 6 i386, amd64
Mac OS JDK6
After installation is finished, you can use the following procedure to check whether
Java JDK is installed successfully in your system
In Window/Linux, go to Terminal
Enter command java -version
If Java runtime environment is installed successfully, you will see the output as
figure below
Choose the Binaries file (either zip or tgz) to download as shown in figure below
Step 3) Installation
Installation of JMeter is extremely easy and simple. You simply unzip the zip/tar file
into the directory where you want JMeter to be installed. There is no tedious
installation screen to deal with! Simple unzip and you are done!
Once the unzipping is done installation directory structure should look like as figure
below
Given below is the description of the JMeter directories and its importance JMeter
directory contains many files and directory
GUI Mode
Server Mode
Command Line Mode
Start JMeter in GUI Mode
If you are using Window, just run the file /bin/jmeter.bat to start JMeter in GUI mode
as shown below
To start the server mode, you run the bat file bin\jmeter-server.bat as below figure
Start JMeter in command line mode
JMeter in GUI mode consumes much computer memory. For saving resource, you
may choose to run JMeter without the GUI. To do so, use the following command
options
Java Compiler
Java Compiler allows developers to build JMeter source code and other
JMeter plugins
SAX is the Simple API for XML, originally a Java-only API. You can use SAX
XML parser as an alternative to XML parser in JMeter
Email Support
JMeter has extensive Email capabilities. It can send email based on test
results and has a POP3(S)/IMAP(S) sampler. It also has an SMTP sampler.
JDBC driver
If you want to test database server, you have to install JDBC driver