Jmeter ā€“ Installation made easy !

In this blog, I will guide you through the installation procedure of Jmeter.

Step 1 -> To download jmeter, please navigate to http://jmeter.apache.org/download_jmeter.cgi

Well before download, as jmeter is a pure java based destop application so if you are a windows/mac/linux user then you need to have JDK 6 or more installed in your system first. If you do not have yet then please download it.

Step 2 -> Then once you reach http://jmeter.apache.org/download_jmeter.cgi , under Binaries you will find – 2 kinds of files with extension i.e tgz and zip. Download according to your requirement. Here I have chosen zip file according to my convenience. Click on the file -> this will initiate download automatically.

Step 3 -> Once your zip file(latest 2.11) is downloaded, just go ahead and unzip the file.You will find the unzipped jmeter folder, double click to get into bin folder. Here you will find jmeter JAR file and other jmeter batch(.bat) file. Double click on any of the file, will launch the Jmeter in GUI mode.

Note: Bin folder(/bin)- Contains script file to start Jmeter after installation.

Step 4 -> Jmeter can be accessed in 3 different modes-

1.GUI mode.

2.Command line mode.

3.Server mode.

I am using the GUI mode according to my requirements. So you can choose accordingly.

Once the Jmeter window opens up – you are done! The very two things you will see is –

Test plan and Work bench. This will help us in creating test scripts but let waits for next blog in which I will guide you how to create a sample test plan and how to save and run the script with ā€œnā€ number of threads/users.

Basics of JMeter

From my recent posts on load testing, we somehow have gained some knowledge on the same. Now its time to perform load testing using a tool.

Now you all must be having one definite question pop in your mind ā€“ why tool ? Why not manually ?

Yes! Manual testing is possible.

For this we need to open many active sessions of the application in different tabs or different browsers. Generally we can check the number of DB connections active and open, number of threads running, active sessions, the amount of the CPU time and memory being consumed etc. The test can be performed manually we have very less load. But in case of heavy load, it becomes really impossible. If we plan to do it manually we will be requiring huge amount of man power resources , hardware requirements. So why to spend so much of money and man power in situation where the result will be not totally accurate instead take the help of tool. Moreover when human themselves gives commands or performs testing, there may be some time gap which will lead to not so accurate result.

So we will go for automation for bulky websites.

There are variety of automation load testing tools available in the market- both in free and paid versions. From the lot, I have picked JMeter.

Now lets understand the basics of JMeter.

JMeter is usually called as Apache JMeter as it is a Apache product designed to perform performance testing.JMeter is an open source desktop Java application that is designed to load test and measure performance which is otherwise the reason behind the name.It helps in analyzing the overall system performance under different load types. It is a freely available tool and easy to use.Using JMeter we can test load test web applications, databases, web pages and static and dynamic resources as well. As it is total java based application so is compatible in any OS which has java 6 or more.

JMeter application is done which imitates browser look but it is not! JMeter donot perform the actions and features of a browser like it cannot execute js found in html files.When JMeter was first introduced, it was meant for load testing then gradually expanded its features for functional tests as well.

Now comes the installation, JMeter installation procedure is very easy.It has a graphical user interface for creating the test plans by using different elements.There are a variety of components of JMeter that we should know before we get started like test plan, thread group,sampler,assertions,logic controller,listeners etc.

Wohoo! Sounds interesting šŸ™‚

So visitors! in my upcoming blogs we will check the installation explore on getting started with JMeter.

Load Verses Stress Testing

Now its time to know more about load testing and let’s find out how it is different from Stress Testing.

The terms “stress testing” and “load testing” are often used interchangeably by software test engineers but they are really quite different.

image[26]

Load testing – Load testing is meant to test the system by constantly and steadily increasing the load on the system till the time it reaches the threshold limit. Load testing is the process of subjecting your application to heavy loads, typically by simulating multiple users – where “users” can mean human users or virtual/programmatic users using automation tools.

Stress testing – Under stress testing, various activities to overload the existing resources with excess jobs are carried out in an attempt to break the system down. It is done to evaluate the application’s behavior beyond normal or peak load conditions. It is basically testing the functionality of the application under high loads like putting the system in unfavorable condition like concurrent users, lowering the memory, reducing the disk space and keeping the system running for few days continuously to check the stability and withstanding ability of the application and the response back.

The main bullet point differences between both kinds of testing –

LOAD TESTING Ā 

STRESS TESTING

ā†’Is conducted to check whether the system is capable of handling an anticipated load.

ā†’ Is conducted to check the systems capability beyond the anticipated load.

ā†’ Is more about characterizing / simulating your actual workload.

ā†’ Is about surfacing issues under extreme conditions and resource failures.

ā†’ It does not aim to break the system by overwhelming it, but instead tries to keep the system constantly working.

ā†’ It tries to break the system under test by overwhelming its resources or by taking resources away from it and checking how system fails and recovers from it.

ā†’ Here the web application is subjected to lower number of users accessing the web app and then gradually increase the users until it reached high load. During which, the response time is measured with the increase in concurrent users. At the end of test, a report is generated which shows how well the site scales with increase in load and if it can provide reasonable response time.

ā†’ Here the main objective is to break the system by subjecting the web app to a large number of users beyond system’s capacity and keep on increasing until the system crashes. This will result in surfacing potential bugs.

Example-For a designed banking application which has a max capacity of 10000 concurrent user, we will start load testing with a very low count of users and then increase it to say 10,000(system capacity) and check system’s response ay peak load conditions.

Example-For the same banking app,we will increase the load to 11000 and do some transaction like deposit or withdraw. As soon as you did the transaction, banking application server database will sync with ATM database server. Now check with the user load of 11000 does this sync happened successfully. Now repeat the same test with 12000 thousand concurrent users and so on and check when does the system crashes and system behavior.

Readers!! hope the above description makes the concept of load and stress somewhat clear.

We will see the importance of tools and why automation in our next post!

Stay tuned and happy exploring! šŸ˜‰