
Dynamic resources can be JSP, Servlets and AJAX. Static resources can be Javascript and HTML.
There are two kinds of web application testing done using Jmeter.
1. Load Application Testing: The process is mainly used to predict the expected usage by simulating various conditions.
2. Stress Application Testing: Be it any web application the architecture of it can only support a certain number of users at a time. With the help of stress testing load above this capacity will be given on the server after which it behaves weirdly. By doing so, maximum load the web server can handle can be found out.
This can be understood in a much better way by below diagram:
How to create a Performance test in Jmeter
Let’s test the Google website for 1000 users with the help of Jmeter.
Add -> Threads (Users) -> Thread Group
Know More: Step by Step Implementation of App Performance Test
Ramp-Up Period: 100 (It is the delay which Jmeter has to wait before starting the next user). 100 seconds is the time which we have used. Now, you must be confused between thread count and loop count. It is very easy to understand. Thread count means how many concurrent users Jmeter will create to connect to the web server. Loop count would be the number of times, Jmeter would simulate one user connecting to the target server. Suppose in the above example: Jmeter would create 100 concurrent users connecting to the server while one user would be connecting to the server 10 number of times.Add -> Config Element -> HTTP Request Defaults.
In the HTTP request control panel, enter the website name which you have to define. In our example, it would be “www.google.com”. 2. HTTP request You can add this element to the thread group by following below path: Add -> Sampler -> HTTP Request. Now, in the control panel of the HTTP request, you have to enter the URL request you want to send to Google. If you give the command as “calendar” in path field, Jmeter will send request http://www.google.com/calendar to google server. If you will keep it blank then send request http://www.google.com/ to google server.Add -> Listener -> Graph Results
In this way, you will be able to see the results in graph format.Know More: Performance Testing-Types, Stages and Advantages
Throughput is the ability of the application to handle a heavy load. Throughput should be very high ideally. Deviation indicated deviation from average. It should be very low. In the above graph, throughput is 867/minutes. It means this server can handle 867 requests per minute. This data is of yahoo website. While if you will test Google.com then you see throughput is 1000/ minute. Google has higher throughput than yahoo. These parameters can vary on other factors also. Which include internet speed at JMeter site, current server load at google server, your CPU power and many others. It’s not necessary that you will get the same results every time as they can vary because of other factors. Conclusion So start the web application testing using Jmeter and see how much load one website can handle. In this way, you can see why your site stops responding and one of the reasons can be low load-bearing capacity.
If you had some difficulty while doing the above test then try to not connect to the internet via a proxy. If you are connecting through a proxy then don’t connect via that. Try opening a new JMeter instance and then try to run the test.
By following these you would be able to run the test cases with Jmeter. So, keep doing performance testing with JMeter and make your site less prone to vulnerable attacks. All the best!!