Best way to stress test a website [duplicate]

2019-01-04 04:56发布

This question already has an answer here:

This may be the wrong question to ask but, what's the best way to replicate a large load on an asp.net web application? Is there an easy way to simulate many requests on particular pages? Or is the best thing to use a profiler to track a single request and then work out from that if the performance is ok?

It would be good to know how well a web app works with a server spec. I'd like to be able to simulate heavy traffic on my testing server so that I can work out if the production server is good enough (specifically with iis/asp.net not db performance).

10条回答
Melony?
2楼-- · 2019-01-04 04:56

Another tool I like is Open STA: http://opensta.org/

It is mainly focused on the performance testing and it is free.

UPDATE 2018:

Since the answer is quite old, the OpenSTA project seems not very active (however the tool is still available) but now there are two other tool I would also recommends:

In my opinion Gatling seems better as there is no limitation and they also provide commercial Enterprise solution and fit with continuous integration tools like Jenkins.

NeoLoad in the contrary have a free version but limited to 50 user (that can be enough for some cases). The full comparison of features is here.

查看更多
时光不老,我们不散
3楼-- · 2019-01-04 04:57

JMeter would be one such tool. Can be a bit hard to learn and configure, but it's usually worth it.

查看更多
Evening l夕情丶
4楼-- · 2019-01-04 04:58

Maybe grinder will help? You can simulate concurrent request by threads and lightweight processes or distribute test over several machines. I'm using it extensively with success every time.

查看更多
可以哭但决不认输i
5楼-- · 2019-01-04 04:59

The ab (apache bench) tool allows you to send many requests to a single page and you specify how many clients you want to be used and how many concurrent connection you want.

This may be the first step when developing a site. Just test some pages with a specific load. This way of benchmarking may have some problem, like caching being over used.

Later you may want a tool that simulate some concrete traffic and not for a single page. I don't have a refence handy on such tool yet.

查看更多
戒情不戒烟
6楼-- · 2019-01-04 05:01

My suggestion is for you to do some automated tests first. Use selenium for it.

Then deploy selenium grid to test in multiple computers at the same time.

Although Selenium as an automated test tool will run quite fast, making a mini stress test. If you put the same automation running on a couple of computers on your network at the same time you'll be able to see how it behaves.

If you want to record response timings, they have a cool api you can use to write some scripts to run your automations.

Edit: Selenium is quite easy to use, and it does asserts to page contents if you want to test the contents. It also copies your movement through the page if you wish (this would be my suggestion) just navigate the page a lot, and then save it for automation. Avoid putting asserts so selenium might run faster.

查看更多
beautiful°
7楼-- · 2019-01-04 05:03

For web service testing, soap rest or WCF (including WebHttpBinding), try out SOA Cleaner. Can be downloded from:http://xyrow.com. There is a free version, and it doesn't require any installation. It can also perform load tests.

查看更多
登录 后发表回答