Skip to content Skip to navigation
Check Our New Demo Website!

Performance Testing

JMeter Post-Processors with Example

A Post-Processor elements is executed after the sampler and can be used for post condition response. If a Pre-Processor is added to a test plan, then it will be executed after response has arrived. A Post-Processor is often used to find out something from response for some actions. These action may be some time to validate response or to extract something and process.

Here is a list of available Post-Processors in JMeter:

JMeter Pre-Processors with Example

"Pre-Processors executes some action just prior to a sample being run".

A Pre-Processor elements is executed before the sampler and can be used for precondition setup. If a Pre-Processor is added to a test plan, then it will execute just before to that sampler element running. A Pre-Processor is most often used to adjust the settings of a Sample Request just before it runs.

JMeter Timers - Constant timer Example

Timers are used to define the time period that you want to wait between requests. If you do not specify any, JMeter will execute the next request immediately after the current one is finished, without any waiting time.

By default, a JMeter thread sends requests without pausing between each request. It is recommend that to specify a delay by adding one of the available timers to the Thread Group. These timers will cause JMeter to delay a certain amount of time before each request that a thread makes.

Logic Controllers - JMeter loop controller example

Logic Controllers let you customize the logic that JMeter uses to decide when to send requests. A Logic Controller can changes the order of requests that come from its child elements. The child elements of a Logic Controller may comprise Samplers, Configuration Elements, and more Logic Controllers. For these requests, JMeter may randomly select (using Random Controller), repeat (using Loop Controller), interchange (using Interleave Controller) etc.

Logic Controllers determine the order in which Samplers are processed

JMeter HTTP Request Sampler Example

In the previous tutorial, we have seen some basic information on sampler. Here we will try to understand in detail about most commonly used sample which is HTTP Request sampler with example.

Let us now create a plan to test an web page using HTTP Request Sampler. This sampler lets us to send an HTTP/HTTPS request to a web server. If we want to send multiple requests to the same web server, we should consider using an HTTP Request Defaults Configuration Element so that we do not have to enter the same information for each HTTP Request.

Thread Group In JMeter With Examples

One of first elements that we need to configure to execute a load test is the 'Thread Group'. These threads are created with Thread Group element. Each thread that executes the test plan is completely independent of other test threads. Multiple threads can used to simulate concurrent connections to the target server.

Using Thread Group, we can control the number of users Simulated (Number of threads), the ramp up time (how long it takes to start all the threads), and the number of times to perform the test.

JMeter thread group overview:

Elements of a Test Plan in JMeter

Elements or components of a JMeter Test Plan would comprise at least one Thread Group. Test plan is the container for all test objects. Test plans are sets of requests against local or remote servers (or clients) configured to run by following specific instructions.
JMeter test plans are composed of different elements. Here is a list of the most important ones and we will discuss them one by one in next sections:

How to install Apache JMeter and Launch JMeter

As JMeter is a 100% Java application, so java needs to be installed with a JAVA_HOME environment variable. To check if java is installed, open the command prompt and type command java –version to check. If Java is installed successfully, then please proceed else install java and then Just Download JMeter and install by unzipping the .zip or .tgz file in any location. For latest version of Apache JMeter 3.0 requires Java 7 or later version.

Apache JMeter features and How it works

Apache JMeter may be used to test functional and performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can also use it perform a functional test on websites, databases, LDAPs, web services etc.

Introduction to Apache JMeter Performance Testing tool

Apache JMeter is one of the most popular tool to measure the performance of web application or variety of services. It can be used to simulate a heavy load on a server or network or object to analyze and measure performance under different load types.

"The Apache JMeter™ application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions."

Subscribe to RSS - Performance Testing