Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to perform load testing for website using JMeter

Tags:

I want to create a script in JMeter that simulates e.g. 100 users accessing our site over a period of 3-4 minutes.

We need to test whether our application can allow 25.000 users/day - that is 1.100 per hour.

For that i have made this Jmeter test:

enter image description hereenter image description here

and here is the result

enter image description here

and here is the graph

enter image description here

I want to know what this result is exactly telling us, if my test pass or fails, if yahoo.com (for which we have run this test for our example) can allow 25.000 users/day and if i am inputting my criteria / requirements correctly?

Thanks

like image 279
junaidp Avatar asked Feb 16 '12 20:02

junaidp


People also ask

Can JMeter be used for load testing?

JMeter is an open source desktop Java application that is designed to load test and measure performance. It can be used to simulate loads of various scenarios and output performance data in several ways, including CSV and XML files, and graphs.

How do I stress test a website with JMeter?

Step 1 – First, you have to create your own Test Plan in JMeter. Step 2 – Insert a Thread Group and add an HTTP request with the server name of your website on which you want to perform stress testing. Step 3 – Next, you need to add a listener inside the thread group and view the test results.

How does JMeter test web services?

Steps to test a SOAP Web service using JMeter-Right Click on Thread Group -> Hover over Add -> Sampler -> SOAP/XML-RPC Request. Specify the SOAP Web Service WSDL URL. If SOAPAction is required then – Check the SOAPAction checkbox and specify its value. Otherwise, you can keep the checkbox unchecked and field blank.


1 Answers

1. I would advise to use better some custom samplers from jmeter-plugins instead:

  • Ultimate Thread Group: more flexible implementation of Thread Group allows to setup your load-testing scenario exactly how you want;
  • Response Times Over Time / Response Times vs Threads / Active Threads Over Time listeners: more demonstrative graphs as JMeter's default ones.

2. In addition to the @Qwe comment above: test not the single HTTP request but user's transactions: each test-thread should simulate a kind of real-user browsing activity: login (if any), navigating through the site, search, accessing/editing personal settings, logout, etc.
To emulate real-user add also "think-time" timer between transaction steps.

3. Control responses, at least the following:

  • response code of each user's request (@ Response Assertion);
  • duration - to verify non-functional requirements for critical transactions (@ Duration Assertion).

4. Look into corresponding JMeter documentation:

  • My boss wants me to load test our web app!
  • JMeter Wiki

5. Some step-by-step guidelines about Jmeter setup and usage for load-testing you can find here:

  • Load Testing your Applications with Apache JMeter
  • Using JMeter
  • Effective load testing with Apache JMeter
  • Load Testing with JMeter: part 1, part 2, part 3
  • A Simple Load Test with JMeter
  • Load Testing with Apache JMeter
    Performance testing with JMeter
  • Your First JMeter Test
  • Some thoughts on stress testing web applications with JMeter: part 1, part 2.

UPD.
Please find, use and feel free to extend this Awesome JMeter collection continued on github.

like image 141
Aliaksandr Belik Avatar answered Sep 28 '22 02:09

Aliaksandr Belik