对 Java/Mysql 应用程序进行负载测试,从哪里开始?

发布于 2024-10-05 22:43:30 字数 159 浏览 8 评论 0原文

我正在开发一个在 Tomcat 和 Mysql 中运行的 Java 应用程序。我想知道为这项任务采取什么策略。

到目前为止,我所知道的用于这项工作的唯一工具是 JMeter 和 Siege。我也不知道对这些工具采取什么策略。我是否只测试我可以提出的每个请求,或者是否有识别痛点的通用做法?

I am working on a Java app running in Tomcat with Mysql. I am wondering about what strategy to take for this task.

So far the only tools I know of for the job are JMeter and Siege. I also don't know what strategy to take with these tools. Do I just test every request I can make or is there a general practice for identifying pain points?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

∞琼窗梦回ˉ 2024-10-12 22:43:30

我们代表客户执行大量负载测试服务 - 我们始终推荐采用敏捷、迭代的方法进行负载测试。当日程紧张时尤其如此。

首先,确保您清楚测试的目标。完成后您想回答哪些问题?共同目标是:

  1. NNN 用户在网站上的页面持续时间是多少?
  2. 在维持 4 秒页面加载时间的性能目标的同时,网站可以处理多少用户
  3. ?有多少用户会导致网站崩溃?

考虑到目标,我们建议您首先构建最关键的测试用例并运行测试。越快运行测试,就能越早解决系统范围或架构性能问题。运行测试,必要时优化/修复应用程序,当它满足性能目标时,添加另一个测试用例。继续该循环,直到您 (1) 对测试结果和覆盖范围感到满意或 (2) 您用完时间和/或预算。

选择从哪些测试用例开始可能具有挑战性 - 我在 我们的博客

最后,确保您选择的测试工具能够支持您的目标以及满足您的日程安排所需的生产力水平。需要考虑的事项:

  1. 典型的测试用例需要多长时间才能正常工作?
  2. 它是否提供任何数据分析,或者分析测试期间生成的大量数据的任务是否落到了用户身上?
  3. 该工具能否收集服务器指标并将其集成到报告和/或分析中?

当然,我建议您看一下我们的产品(Web Performance Load Tester),但谨慎的做法是至少尝试一些工具,看看哪一个最适合您的需求。

We perform a lot of load testing services on behalf of our clients - and we always recommend an agile, iterative approach to load testing. This is especially true when schedules are tight.

First, be sure you are clear on the goals of your testing. What questions to you want to answer when you are done? Common goals are:

  1. What are the page durations when NNN users are on the site?
  2. How many users can the site handle while maintaining our performance goals of 4 second page load times
  3. How many users does it take to crash the site?

With the goals in mind, we recommend that you start by building the most critical testcase and run a test. The quicker you get to running tests, the sooner you can address system-wide or architectural performance problems. Run a test, optimize/fix the application if necessary, and when it satisfies the performance goals, add another testcase. Continue that cycle until you are either (1) satisfied with the test results and coverage or (2) you run out of time and/or budget.

Choosing which testcases to start with can be challenging - I've got some more detailed advice on our blog.

Finally, make sure you choose a testing tool that is going to support your goals and the level of productivity you need to meet your schedule. Items to consider:

  1. How long does it take to get a typical testcase working?
  2. Does it provide any analysis of the data, or does the task of analyzing the mountain of data generated during the test fall to the user?
  3. Can the tool gather server metrics and integrate them into the reports and/or analysis?

Naturally, I recommend taking a look at our product (Web Performance Load Tester), but it is prudent to try at least a few tools to see which one best suits your needs.

橘和柠 2024-10-12 22:43:30

我还使用一些网络基础服务(LoadStorm)来帮助进行负载测试...它有一些关于负载测试的指针和文章

http://loadstorm.com/load-testing

I also use some web base service (LoadStorm) to help with load testing... it has some pointers and articles on load testing

http://loadstorm.com/load-testing

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文