<

Using jmeter for web loadtesting

Published on
9,887 Points
3,687 Views
2 Endorsements
Last Modified:
Approved
This Article will help the novice users to use JMeter for load testing their web application.  Most web applications failures are because of performance issues, so it is a must that you have a performance requirement to  your product.  There are a lot of tools available in the industry for performance tuning / testing, but most of them are too costly to be implemented by smaller companies.  Open source products like JMeter is one of the products, in which you can do some basic load testing of your product, but without the hefty price tag.

Hopefully this will help you get started on the basic flow of using JMeter once you have gone through the article in its entirety and exploring the tool for yourself.

Download JMeter from the link:
http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi

Once downloaded, extract the zip file and go to the bin folder, where you will find the jmeter.exe file.  Double-click on that file.  In the JMeter window tree view you will find two items: workbench and test plan.  Workbench is usually used to test and create components of your test. Test Plan is used to run the tests using the components created in the Workbench.

Note: in order to run jmeter.exe, you need to have installed a Java Developer's Kit (JDK) and configured the JDK bin in your system's PATH environment variable.


Proxy Server
JMeter supports recording of the user action.  This is done with the help of the proxy server of JMeter.  To create the proxy server, right-click on the Workbench and go to "non test elements", then add a proxy server and provide the required port number (default 8080).  Now go to your web browser and change your connection settings so that each HTTP request you make will be tunnelling through the JMeter proxy and gets recorded.

Settings can be done as below.

Internet Explorer
Tools->Internet Options->Connections->Proxy Settings
here put localhost as host and port that you have given in JMeter proxy (default 8080)

FireFox
Tools->Advanced->Network->Connection->Proxy Settings
here put localhost as host and port that you have given in JMeter proxy (default 8080)


Recording a user action
Once the settings are done, you have to start the JMeter proxy server, go to the browser in which you have made the proxy settings and access your web site on which you have to run the test, doing the necessary action(s) which you consider "business critical" or in which your are expecting some system failure.  These action(s) will be recorded in the workbench.


Playback settings
Now go to Test Plan in the tree view window and right-click then create a new ThreadGroup.  Cut all the components from workbench and paste it to this new ThreadGroup.  In the ThreadGroup, you can mention the number of times the use case needs to be executed in "Loop Count", the number of parallel users in "Number of Threads" and the time gap between which users are introduced to system in "Rampup" setting.


Results Aggregation
once these settings are done you need to add a aggregate graph to view the results (number of hits and misses) by right-clicking on the ThreadGroup and selecting add->listener->aggregate graph.


Playback
To start the test go to run menu and select start.

This ends the basic flow of using JMeter.  Along with this, you can use some profiler tools to profile your product if you find some issues while doing the load test.  Please continue to explore for yourself, as there is more to this tool than covered in this basic usage guide.  You will find JMeter supports most of the features that other licensed load testing products support apart from that it is not UI rich.

2
Comment
0 Comments

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Join & Write a Comment

With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Wrapper-1-Query. Use an Excel function to calculate a column for an Access query. Part 1. Shows a query in Access that has a calculated column with the results of an Excel worksheet function. See how to call a wrapper function from a query, and …

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month