Performance test - approach

时间:2015-04-23 05:19:08

标签: jmeter performance-testing load-testing loadrunner

I have User Registration, Flight Search, Book Tickets modules in my application. I have created my JMeter test & I have different thread groups for each module in my test. I verified & it works well.

  • Thread Group 1: XX number of users - access the site - click on regression , enter the details & register. (bold -> loop- happening again and again)
  • Thread Group 2: XX number of users - access the site - login, - search for flights - (bold -> loop - happening again and again)
  • Thread Group 3: XX number of users - access the site - login, book ticket - (bold -> loop - happening again and again)

Issue:

My manager says we need to run all modules (all thread groups) together with appropriate users as that is how It is going to be in Production. Even though i can run them all together, - in case of issues - i would not know which feature of the application caused the issue.

My aim is to run each module separately & find its performance. I think that doing the module wise would be the correct approach to get the response time, resource utilization etc.

Clarify:

  • I do not have much experience in performance testing. What is the correct approach / How do you do your test for your application?
  • If i have to find server's optimal load (at which it performs better) - what should my approach be?

Intentionally tagging loadrunner as this question is not specific to JMeter & it is generic.

4 个答案:

答案 0 :(得分:1)

如果您的目标是表示人类行为以评估部署风险,那么以原子方式测试每个业务流程将无法实现您的目标。

您似乎正在参与一个更适合称为性能单元测试的流程。这与开发人员(与绩效测试人员不同)非常普遍,他们寻求在一定数量的用户中使个人业务流程的性能合格。这些通常也被分类为非正常思考时间(通常完全消除),小数据集,小于有用的测试环境和极短的测试持续时间,例如5-15分钟。

答案 1 :(得分:1)

您可以将此业务场景标记为事务,这意味着每个模块的HTTP请求将针对一个组或事务中的ex-Login请求进行分组,将航班搜索为一个组或事务,以及类似的预订票据等。你将以综合的方式对它进行测试,它也将是一个类似生产的场景。由于分组运行后,您可以轻松找到哪一组请求花费更多时间搜索,预订门票等...这样您将获得准确的性能统计数据,您将实现类似场景的生产

答案 2 :(得分:0)

这种方法实际上取决于您的测试目标是什么。如果您正在寻求优化或分析特定模块,那么单独测试它是有意义的。

但是,如果您正在尝试检查服务器是否可扩展,或者您是否有足够的容量,则应该一次性测试所有模块,或者高于预期的负载水平。

孤立方法的反例:

假设您必须使用模块A和B.它们都是CPU密集型的,运行时占用80%的CPU。你首先测试A,它使用80%的CPU,你有20%的备用,它表现良好。现在你单独测试B,结果相同。

现在你去生产,用户尝试同时使用A和B模块,两者都试图使用80%的CPU,突然你没有足够的CPU,你的性能就会受到影响。

答案 3 :(得分:0)

我知道这有点晚了但仍然。

  

我在性能测试方面没有太多经验。是什么   正确的方法/您如何为您的申请进行测试?

正如詹姆斯所说,在正常情况下进行性能测试的方法是同时运行所有关键业务流程,而不是以孤立的方式运行。

为了识别问题,我们会根据事务对请求进行分组,并适当地命名业务流程。这将有助于识别哪些请求失败以及哪个功能/部分应用程序出错。

单独运行它们不会为您提供更多的见解,因为负载测试工具只能确认是否存在瓶颈而不是根本原因,无论涉及的业务流程数量如何。

  

如果我必须找到服务器的最佳负载(它表现得更好)    - 我的方法应该是什么?

为了确定服务器的最佳负载,必须同时运行所有脚本,因为最终用户将同时访问应用程序(所有关键方案),而不是以模块化方式访问。