DZone
Performance Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Performance Zone > HTTP Load testing with JMeter

HTTP Load testing with JMeter

Alen Komljen user avatar by
Alen Komljen
·
Jan. 16, 13 · Performance Zone · Interview
Like (1)
Save
Tweet
29.67K Views

Join the DZone community and get the full member experience.

Join For Free


In previous post I wrote that for high availability load balancing with HAProxy and CARP on FreeBSD I used JMeter as a testing tool. In this post I will show some basics and how to use it for HTTP load testing. JMeter is an Java application that can be used to simulate a heavy load on a server to test its strength or to analyze overall performance under different load types. For full set of features please visit official site here.

One thing you should know as this tool is not a browser. That means JMeter does not perform all the actions supported by browsers and also it can’t run JavaScript or Flash. It is a desktop application that can be run on Windows or any other operating system. So please go here and download it first. After extracting if you are Windows user run “bin/jmeter.bat”. You will get bellow screen:

JMeter starting page

In this post I will describe how to setup most basic load test plan in JMeter. Basically with load testing you want to answer on two questions:
- Can your application support expected number of users?
- At what load does the application break?

So to get started first you need to add a thread group (users):

JMeter add thread group

Now go to thread group you added and define:
- Number of users
- Ramp-Up period (time between user group will hit the requests)
- Loop count (how many times to run this thread)

Next you need to add sampler (HTTP request) to this group:

JMeter adding sampler

Once you added HTTP request sampler you will see a lot of options. At the moment pay attention to those:
- Server Name or IP
- Path

When you define this, test is basically ready, but we need some reporting. In JMeter that component we call Listener. So go to test plan and add one listener:

JMeter adding sampler

Your results will be shown here with all request and response details. To run test do: Ctrl + R. You can follow status in real time if you go to View Results Tree. When it’s finished you can rerun it by Ctrl + E to clean old results and Ctrl + R to run it again. At the end you will get something like this:

JMeter resuls

As I said at beginning this is the most basic HTTP load testing plan, JMteter is far away from that and to be able to create more realistic test cases you will need to learn more advanced options that are available. I Highly recommend this tool for any kind of testing. Also the tool can be easily extended through custom plugins.

Set of JMeter extensions developed by AtlantBH currently includes:
- OAuth Sampler
- REST Sampler
- JMS Tools (Java Request Sampler)
- JSON to XML Converter
- XML Format Post-processor
- HDFS Operations Sampler
- HBase Scan Sampler
- HBase RowKey Sampler
- Hadoop Job Tracker Sampler
- HBase CRUD Sampler
- JSON utils (JSON Path Assertion, JSON Path Extractor, JSON Formatter)
Load testing

Published at DZone with permission of Alen Komljen, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Modern Application Security Requires Defense in Depth
  • How To Evaluate Software Quality Assurance Success: KPIs, SLAs, Release Cycles, and Costs
  • Caching Across Layers in Software Architecture
  • Major PostgreSQL Features You Should Know About

Comments

Performance Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo