6 minutes read

Overview

We are going to present how to use Apache JMeter (open source load testing tool) in order to perform basic load and stress testing on your web application. We are going through each step and show how to use JMeter’s GUI (graphical user interface) in order to build a test plan, configure load tests, run test and inspect the results.

Apache JMeter is an open source Java application, so it can run on any OS (operating system) which supports JAVA 6 or later. JMeter is a load testing (performance testing) tool designed to run tests on any given URI endpoint, with configurable number of concurrent clients (users) and other useful test configurable metrics and inspect results. Test results can be viewed in charts, tables or can be exported in CSV or XML formats.

Prerequisites

In order to start using JMeter you need a machine that you can install and run JMeter on. By default JMeter runs as a GUI application, which requires more resources than a command line based application. In order to perform the load tests faster and without bottlenecks you can run JMeter in the non-graphical mode (details on how to start JMeter in non-graphical mode in the next post)
Please note that results can differ based on the web server where the web application is hosted. Factors that we need to take into account are:

  • system resources CPU, RAM Memory of the web server
  • system resources CPU, RAM Memory of the machine where JMeter is installed (from where the tests are executed)
  • location of the web server between the load test injector and the web server where the application is hosted (which affects the latency of the tests – use a cloud load testing tool in order to easily run load tests from different locations)

Install JMeter

Apache JMeter is very easy to install. Depending on the OS, there are different ways on how to do this.

In order to run JMeter, here is what you need to install:

Make sure that after installing JAVA you add it to the $PATH environment variable. Here you can find how to add the JAVA to the $PATH environment variable for every OS .

In order to run load tests with thousands of threads (users) and to run load tests from different world locations, you can use LoadFocus.com which offers a cloud load testing service, easy to use, which keeps all your tests and test runs in the history automatically.

How fast is your website? Free Website Speed Test