如何用jmeter设计电子商务应用的压力测试 [英] How to design a stress test for e-commerce application with jmeter

查看:40
本文介绍了如何用jmeter设计电子商务应用的压力测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对一个 Web 应用程序进行压力测试,但我很困惑我应该如何设计测试周期.所以我有一个带有几个控制器的测试脚本,例如主页、登录、产品目录和统一的随机计时器.但是我应该运行压力测试多长时间和多少时间才能做出正确的决定.另外例如,我使用最终线程组进行测试,每次应该添加多少用户,以及斜坡上升、保持时间和关闭时间多长时间才能获得正确的结果?提前致谢!

I am conducting a stress testing for a web application but I am quite confused how should I design the test cycle. So I have a test script with few controllers for example homepage, login, product catalogue and a uniform random timer. But How long and how many time should I run the the stress test to make a proper decision. Also for example I am using ultimate thread group for testing and how many user should add each time and how long the ramp up, hold time and shutting time can be for a proper result? Thanks in advance!

推荐答案

压力测试是关于找到应用程序的边界,简化的方法是:

Stress test is about finding the boundaries of your application, the simplified approach is:

  1. 设计您的测试以 100% 准确度模拟真实用户的活动,JMeter 应该产生与真实浏览器相同的请求,您可以使用网络"交叉检查 JMeter 发送的请求.浏览器开发者工具
  2. 的标签
  3. 从 1 个虚拟用户开始
  4. 逐渐增加负荷
  5. 研究增加负载(即活动线程随时间变化侦听器或等效项)与其他性能指标,主要是响应时间(即 Response Time Over Time 或等效的)和每秒点击次数(即每秒交易次数或同等)
  1. Design your test to simulate real user(s) activities with 100% accuracy, JMeter should produce the same requests as the real browser, you can cross check the requests sent by JMeter with "Network" tab of your browser developer tools
  2. Start with 1 virtual user
  3. Gradually increase the load
  4. Look into correlation of increasing load (i.e. Active Threads Over Time listener or equivalent) with the other performance metrics, the main ones are response time (i.e. Response Times Over Time or equivalent) and number of hits per second (i.e. Transactions Per Second or equivalent)

在表现良好的系统上,当您增加用户数量时,每秒点击次数应成比例增加,响应时间应保持不变,不应发生错误.

On well behaved system when you increase the number of users the number of hits per second should increase proportionally, response time should remain the same, no errors should occur.

但是,如果您的被测系统在某个时间点的硬件/扩展能力有限,您将面临虚拟用户数量不断增长而每秒点击次数保持不变或下降或出错的情况将开始发生.这意味着您发现了瓶颈

However if your system under test has limited hardware/scaling capabilities at certain point of time you will face the situation when the number of virtual users will be growing and the number of hits per second will remain the same or go down or errors will start occurring. This means that you found the bottleneck

这篇关于如何用jmeter设计电子商务应用的压力测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆