问题
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).
回答1:
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.
回答2:
Try http://loadimpact.com the best I have found so far, but no alternative to it I can find.
回答3:
JMeter would be one such tool. Can be a bit hard to learn and configure, but it's usually worth it.
回答4:
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.
回答5:
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.
回答6:
We tried a few applications, both trials of commercial products and freely available ones. Ultimately, it was the trial edition of the Team Test Load Agent software that we tried. It definitely works great and is fairly simple to use. In the long run, it bolstered our argument to move to Team Foundation Server and equip all parts of the department with the appropriate tooling.
The obvious downside, however, is the price.
回答7:
I have used WebLOAD for this kind of project. It's easy to create scripts, and it has built in support for monitoring ASP.NET stats
回答8:
DUP: ASP.Net Stress Testing
回答9:
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.
回答10:
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:
- Gatling "Load test as code"
- NeoLoad "The Load Testing Platform"
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.
来源:https://stackoverflow.com/questions/340564/best-way-to-stress-test-a-website