Jmeter Preview
Jmeter Preview
By Krishna Rungta
Why 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?
It's not feasible to arrange 100 people with PC and internet access
simultaneously accessing google.com Think of the infrastructure requirement
when you test for 10000 users (a small number for a site like google). Hence
you need a software tool like JMeter that will simulate real-user behaviors
and performance/load test your site.
JMeter Advantages
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 multithreading framework. JMeter allows concurrent and
simultaneous sampling of different functions by a separate thread
group
Visualize Test Result: Test result can be displayed 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 to 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 a web application using JMeter
Script Test: Jmeter can be integrated with Bean Shell & Selenium for
automated testing.
Linux
Windows
Mac OS
Ubuntu
In Window/Linux, go to Terminal
Enter command java -version
If the Java runtime environment is installed successfully, you will see the
output as the figure below
As of this writing, the latest version of JMeter is Apache JMeter 4.2. You can
download it here But this tutorial demos installation of version 2.9, the
install process remains the same.
Choose the Binaries file (either zip or tgz) to download as shown in the
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! Simply 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
The following figure annotates the various components in the JMeter GUI
How to run JMeter in Non-GUI Mode
Start JMeter in Server Mode
Server mode is used for distributed testing. This Testing works as a client-
server model. In this model, JMeter runs on a server computer in server
mode. On a client computer, JMeter runs in GUI mode.
To start the server mode, you run the bat file bin\jmeter-server.bat
as below figure
JMeter in GUI mode consumes much computer memory. For saving the
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