How to perform load testing for website using JMeter

青春壹個敷衍的年華 提交于 2019-12-20 08:40:40

问题


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:

and here is the result

and here is the graph

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


回答1:


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.



来源:https://stackoverflow.com/questions/9318780/how-to-perform-load-testing-for-website-using-jmeter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!