How to use Jmeter for Load Testing?

By ongraph
October 23, 2014 | 1085 Views

Latest Industry insights to keep you updated on the latest happenings.

Apache JMeter features
 
  • Ability to load and performance test many different server/protocol types: Web – HTTP, HTTPS
  • Complete portability and 100% Java purity .
  • It’s easy to use. It has a simple and intuitive GUI. This encourages you to use it from the start while you’re developing your application
  • Full multithreading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
  • Careful GUI design allows faster Test Plan building and debugging.
  • Caching and offline analysis/replaying of test results.
  • Plug-gable Samplers allow unlimited testing capabilities.
  • Several load statistics may be chosen with plug-gable timers.

Apache JMeter Installation
 
  1. Java run time should be installed in PC.
 
Create Test plan in JMeter
 
Start JMeter windows batch file from bin folder (${jemetr}/bin/)
 

 

Create test plan by creating thread group

 All samplers and listeners are involved in thread group. Added Thread group:

 

 

Properties of thread group
 
  1. Number of threads(users): It consists of number of requests you want to run in one test plan.
  2. Ramp-up period (in seconds): It tells us how long all requests takes time to run. If there are multiple requests, then all requests get run one by one.
  3. Loop count: It shows count that all requests get run in how many loops. 

 

All samplers and listeners are involved in thread group.
 
Adding Sampler
 
Samplers describes that Jmeter sends web requests to server and wait till response comes. There are many types of samplers in Jemeter like : FTP Request , Http Request, Java Request. 
 
 

 

For example we are selecting Http Request sampler. In Http Request we can add parameters to send request to server to run the service.
 
Add Listener
Listener,  where test data and result get stored and it displays the output in different ways. For example we added listener is “View as a tree”.
 
 
 
 
Execute the test plan
 
Now Select listener and run the test plan. In this listener, output will display in detail with:
  1. Sample result: Where load time, sample count get displays to you.
  2. Request: What request you send to server.
  3. Response data: The exact output comes from server.

 

Execute the test plan with result table
Here, Table shows all results in tabular form with no. of requests and average time for all requests.
 
 
 
 
More about Jmeter please find http://jmeter.apache.org/
 
Enjoy..!!
 

Monthly industry insights to keep you updated on latest happenings

Follow us on Twitter
Follow us on Facebook
Follow us on Linkedin