Jmeter Tutorial
Hi! Friends Welcome to your new blog Jmeter from scratch. In this blog we start knowing about some fundamentals behind Jmeter then we go for How to install it, and then we will learn all the basic options of Jemter and also do some hand on. and then slowly we move to advance concepts it. so let's dig into the theory part first.
Important Note:- THIS TUTORIAL IS DESIGNED FOR EVERYONE, THERE NO PRE REQUIREMENT FOR BECOMING AND PERFORMANCE TESTER. JUST YOU NEED A WILLPOWER AND FULL CONCENTRATION REST LEAVE TO US. :-)
So First questions you can put that, What is the Jmeter, What is the use of Jmeter, How does Jmeter work, What it can be tested, and Why is Jmeter only preferred for Performance testing. lest understand one by one each.
Q. What is the Jmeter?
A. I am not going to copy-paste this question from the internet, lol. so in my words, the developer of this masterpiece is Stefano Mazzocchi, and the company that owns this is Apache Software Foundation. The first version 1.0 was released in 1998, and in the second version 2.0 Apache get its license, and the latest release version is 5.5 on 14th June current year (2022). Stefano Mazzocchi wrote it primarily to test the performance of the Apache Tomcat project. Apache later redesigned Jmeter to enhance the GUI and to add functional testing Capabilities.
It's an open-source tool means it's free to use. This is a Java desktop application with a graphical interface using the Swing API, and due to a java application, it is a platform-independent means that can be run on any environment and workstation like Windows, Linux, Mac, etc.
Q. What is the use of Jmeter?
A. Jmeter is used for most of the Non-Functional testing. I said most not all. let's look at what does Non-functional testing have and means? This is a type of testing which is performed to verify the non-functional requirements of the application. see it's so easy ha! :-). Actually, it's used to check the readiness of a system or application as per non-functional parameters which are never covered in functional testing. Confused ha!. In a simple way, we test all functional points by providing appropriate input and verifying the output against the Functional requirements. but we also need to test that if 1000 users came on our application then what? what when a system starts sending multiple requests at the same time on our application. what if someone starts a DDoS attack on our application. don't worry we are not going to start hacking tutorials soon. let's see what are the type of Non-functional testing and what we can cover in Jmeter.
so Performance Testing, Load Testing, Stress Testing, Security Testing, Compatibility Testing, Scalability Testing, etc. but through Jmeter we can test Performance, Load, and Stress testing only. let's see them one by one each.
Performance testing:- In this, we try to figure out the best possible performance exception under a given configuration of infrastructure. means we have to find out in giving infra how many requests we can serve to users. and how fast our application can respond to users' requests.
Load testing:- As the name suggested its checks the load on the system, at a time how many numbers of user can request, and how many users can be served by the application or system.
Stress testing:- This test is an attempt to break the system by overwhelming its resources like CPU, RAM, and ROM.
Scalability testing:- This will help us to know if the application is able to scale up and down when the number of users increases or decrease. in a simple way now a day most of the applications are running on the cloud, and the cloud has a feature to increase the number of an instance (nothing but a cloud PC) when there is a huge load. so in scalability testing, we have to test when users are increasing the application easily able to create a new instance within a minimum time period or not. so that our application never brack down.
Q. What can it be tested?
A. It can be used to simulate a heavy load on a server, group of servers, network, or object to test its strength or to analyze overall performance under different load types.
The protocols supported by JMeter are:
- Web: HTTP, HTTPS sites 'web 1.0' web 2.0 (ajax, flex and flex-ws-amf)
- Web Services: SOAP / REST /XML-RPC
- Database via JDBC
- drivers directory: LDAP
- Messaging Oriented service via JMS
- Service: POP3, IMAP, SMTP
- FTP Service
- Mail - SMTP(S), POP3(S), and IMAP(S)
- Native commands or shell scripts
- TCP
- Java Objects
Q. How does Jmeter works?
A. JMeter simulates a group of users sending requests to a target system or application, and returns statistics that show the performance of the target system or application via tables, graphs, and many other reports.
Q. Why is Jmeter only preferred for Performance testing?
A. JMeter is an open-source tool with a vibrant community that keeps adding features and supports users who run into issues and problems. no limitation of users and no license required. it's a platform-independent tool so you can write and run it anywhere. it has a user-friendly GUI. we can use parameters and they are easy to define and understand, scripting is simpler and clearer and adding and defining elements is more intuitive. In addition, one screen shows you everything you need - the script, the scenario, and the analysis report.
I guess it's enough for the Intro part, Let's meet later for installation.