问题
Can you suggest a software tool (with GPLv license) to perform load testing for a Web server?
回答1:
Curl will allow you to run through a sequence of URL quite easily. i.e.
curl -s "http://google.com?[1-1000]"
This will make 1000 calls to google i.e.
http://google.com?1
http://google.com?2
etc...
You can then add these calls to a script and run them consecutively as background jobs. There's a full explanation of this http://servermonitoringhq.com/blog/how_to_quickly_stress_test_a_web_server
回答2:
Tsung is best I have used so far. You can create actual usage pattern.
apache benchmark is easiest to use and comes along with apache. Simpler to use,but is not flexible in terms of urls to hit for testing and creating more realistic load patterns.
回答3:
Try one of:
- httperf (http://code.google.com/p/httperf/)
- ab (http://httpd.apache.org/docs/2.0/programs/ab.html)
回答4:
If you need to do some performance/load testing also to web pages/apps, try Apache JMeter http://jmeter.apache.org/
回答5:
You can give a try to wbox by running apt-get install wbox
Then scroll down at hping.org/wbox/
for examples.
comprehensive list at Speed Tools
回答6:
I would suggest using the "headless" PhantomJS (which is related to Selenium WebDriver) or using the Selenium HTMLUnitDriver. Wrap the load tests in a JUnit class. Fork the tests multi-threaded using either Maven Surefire or Gradle (with a filtering test task using maxParallelForks). Gradle or Maven will create a JUnit report (from a CSS transformation) that shows each test and the time each one took.
If you are using Windows, you can can use my .bat scripts to start a Grid Node and Hub in order to run parallel, using multiple computers to supply the load..
回答7:
If you have the production workload, then you could use tcpcopy to copy it to the test system. This kind of testing is more effective and real.
回答8:
Also look at re purposing Selenium WebDriver functional scripts in a Headless browser environment where you can run multiple instances. This approach has become popular with the availability of VMs from the Cloud.
来源:https://stackoverflow.com/questions/5139953/web-server-load-testing-tool