jmeter How can we do load testing of any web...

  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

B

Bhushan Bhavsar

Guest
How can we do load testing of any web application on jmeter
 
Hi Bhushan,

Performance testers in almost every software testing company follows a standard process to perform load testing on web or in general any application using any performance/load testing tool:
- Record a scenario
- Parametrize dynamic variables
- Group User scenarios
- Simulate & execute load test
- Analyze test results

Now, as you want to perform load testing of web application using JMeter then you will have to use its elements to implement the above process:

1. Record a Scenario: If you want to record a login-logout scenario of any application, then first of all you have to launch JMeter (by clicking jmeter.bat file on Windows OS) and then select 'Recording' template from Templates. Set any Port (say 8081) in 'HTTP(S) Test Script Recorder' element and click Start button in the bottom (click Ok on certificate dialog displayed). Now, open your Firefox browser, go to Tools>Options>Advanced>Network>Settings>Select Manual proxy configuration>Set Http proxy as 'localhost' and 'Port' same as you have set in JMeter (8081). Your browser (Firefox) will now communicate with JMeter and any action (accessing application) perform in browser will be intercepted or recorded by JMeter. You can now perform your scenario in Firefox and then click Stop button in 'HTTP(S) Test Script Recorder' element once your are done with scenario. You can see that your scenario is recorded under Thread Group>Recording Controller element.

2. Parametrize Dynamic Variable: Every application has some dynamic variables like tokens, session id etc. which you need to parametrize. To parametrize these variables you can use Add>Post Processors>Regular Expression Extractor element. You can study how to create regular expressions & how to use this element on Internet.

3. Group User Scenario: Now if you want to execute multiple scenarios simultaneously then you need to add different scenarios in different Thread Groups for eg. Sign-Up scenario should be in Thread Group1, Login-Logout scenario should be in Thread Group2 etc so that you can set different user load for each scenario.

4. Simulate & Execute Load Test: You need to set Thread (or user) count, Ramp-up & Time Duration in Thread Group element and then click Run button to execute the test.

5. Analyze Test Result: You have to add Add>Listener>Aggregate Report before executing the test. Aggregate report will provide you Average Response time, 90% Line, Min & Max. Response Time of the application and these KPIs are most important in deciding the performance of your application. Once the test is completed then you can go to this element in JMeter to view results of your test.

JMeter is a very popular and favorite tool in the small and large scale organizations that provides different types of software testing services as it is an open source tool & it supports different protocols.

Hope the above information will be helpful to you and please let me know if any further clarification is needed. My colleagues have an extensive expertise in working with Load testing tools specifically Jmeter and they have handled different clients and delivered as per their expectations.

Regards,
Anand
 
Last edited: