在过去,我使用微软Web应用程序压力测试工具和Pylot对Web应用程序进行压力测试。我写了一个简单的主页、登录脚本和站点演练(在一个电子商务网站中添加一些商品到购物车和结帐)。

只要让少数开发人员在主页上使劲敲一下,就几乎总能找到一个主要问题。更多的可伸缩性问题将在第二阶段浮出水面,甚至更多——在发布之后。

我使用的工具的URL是Microsoft Homer(又名Microsoft Web Application Stress Tool)和Pylot。

这些工具生成的报告对我来说没有多大意义,我花了很多时间试图弄清楚站点能够支持什么样的并发负载。这总是值得的,因为最愚蠢的错误和瓶颈总是会出现(例如,web服务器配置错误)。

你做了什么,你使用了什么工具,你的方法有什么成功?对我来说,最有趣的部分是提出某种有意义的公式,用于从压力测试应用程序报告的数字中计算应用程序可以支持的并发用户数。


当前回答

我玩JMeter。一个认为它不能不测试的是ASP。净Webforms。视图状态破坏了我的测试。我不知道为什么,但是有一些工具不能正确处理视图状态。我目前的项目是ASP。NET MVC和JMeter都能很好地与之配合。

其他回答

尝试ZebraTester,它比jMeter更容易使用。我已经使用jMeter很长一段时间了,但是负载测试的总设置时间总是一个问题。虽然ZebraTester不是开源的,但我在过去六个月节省的时间弥补了它。他们还有一个SaaS门户,可以使用他们的负载生成器快速运行测试。

这是给JMeter的另一票。

JMeter是一个开源的负载测试工具,用Java编写。它能够测试许多不同的服务器类型(例如,web, web服务,数据库,基本上使用请求的任何东西)。

然而,一旦你开始面对复杂的测试,它确实有一个陡峭的学习曲线,但它是非常值得的。您可以非常快速地启动并运行,这取决于您想要进行哪种类型的压力测试,这可能没问题。

优点:

Open-Source/Free tool from the Apache project (helps with buy-in) Easy to get started with, and easy to use once you grasp the core concepts. (Ie, how to create a request, how to create an assertion, how to work with variables etc). Very scalable. I've run tests with 11 machines generating load on the server to the tune of almost a million hits/hour. It was much easier to setup than I was expecting. Has an active community and good resources to help you get up and running. Read the tutorials first and play with it for a while.

缺点:

The UI is written in Swing. (ugh!) JMeter works by parsing the response text returned by the server. So if you're looking to validate any sort of javascript behaviours, you're out of luck. Learning curve is steep for non-programmers. If you're familiar with regular expressions, you're already ahead of the game. There are large numbers of (insert expletive) idiots in the support forum asking stupid questions that could be easily solved if they'd give the documentation even a cursory glance. ('How do I use JMeter to stress-test my Windows GUI' shows up quite frequently). Reporting 'out of the box' leaves much to be desired, particularly for larger tests. In the test I mentioned above, I ended up having to write a quick console app to do some of the 'xml-logfile' to 'html' conversions. That was a few years ago though, so it's probable that this would no longer be required.

看看LoadBooster(https://www.loadbooster.com)。它利用无头脚本浏览器PhantomJS/CasperJs来测试网站。Phantomjs将解析和渲染每个页面,执行客户端脚本。无头浏览器方法更容易编写测试场景,以支持复杂的AJAX重载Web 2.0应用程序、浏览器导航、鼠标单击和对浏览器的击键,或者等待DOM中存在元素。LoadBooster也支持硒HTML脚本。

免责声明:我为LoadBooster工作。

看一下TestComplete。

冒着被指责为无耻的自我推销的风险,我想指出,在我寻求免费负载测试工具的过程中,我访问了这篇文章:http://www.devcurry.com/2010/07/10-free-tools-to-loadstress-test-your.html

要么我无法获得我想要的吞吐量,要么我无法获得我想要的灵活性。并且我想在测试后分析中轻松地聚合多个负载测试生成主机的结果。

我尝试了清单上的每一种工具,但令我沮丧的是,它们没有一种完全符合我的要求。所以我做了一个,并分享它。

这里是:http://sourceforge.net/projects/loadmonger

PS:熟悉城市俚语的人不会对这个名字做出恶意评论。我以前不是,但现在更世故了。