Skip to main content

What can I use to do load testing or functional testing of my web server?

ab – Apache HTTP server benchmarking tool

  • Somes abwith Apache on some platform.
  • Very easy to use. Supports parameters such as concurrency and POST data.
  • It tells you how many requests succeeded and how many failed (by response code and/or timeout), the request rate, etc. However, you cannot see which ones failed and why, etc.
  • No support for distributing work across machines.

Apache Benchmark):JMeter

  • Constructs and runs test plans in its GUI. I think you can use the JMeter classes (in Java) directly, instead of using the GUI. Documentation is scarce in this area too.
  • Supports distributing work across machines. Multiple machines can load the test and another machine can observe the test.
  • Pretty limited in terms of running dynamic test cases: There are built-in functions (like one that gets the current time), regular expression, and http://httpd.apache.org/docs/2.0/programs/ab.htmlJEXL, but you can’t use custom code in test cases easily.
  • Sends and receives HTTP requests and responses. Not aware of browser behavior or client-side scripting.

Selenium

  • 3 variants:
    • Selenium: write test plans in a language called Selenese in the Selenium IDE
    • Selenium Canoo:RC: http://webtest.canoo.com/webtest/manual/WebTestHome.htmlincorporate test plans into programs; server part is in Java but client drivers exist for Java, .Net, Perl, PHP, Python and Ruby at least.
    • Selenium JMeter (Apache JMeter): http://jakarta.apache.org/jmeter/
    • Selenium: http://www.openqa.org/selenium/
    • Functional testing (all) and load testing (RC, Grid)
    • Runs in actual browsers so it can be used to test browser behavior or client-side scripting. For example, you can tell the script to click on a specific element in the page, even if the element is created by JavaScript loaded at run-time.
    • FAQ of Grid states that it’s not designed for load testing.
      • One of the reasons: it’s resource-intensive to run multiple simultaneous instances of actual browsers.
      • Grid’s “principle author” stated that each machine should be able to run 10-20 browser instances. This is still much more resource-intensive than many alternatives. I’ve read somewhere that BrowseMob provides performance-testing service using exactly this software though.

    HtmlUnit

    • A Java library providing building blocks for testing. I’ve read that front-ends exist.
    • Primarily for functional testing, but also used by many for load testing.
    • Claims to “understand” page content and runs JavaScript including AJAX.

    Simple Test

      unit
    • Unit testing for PHP
    • A browser class that simulates a browser’s behavior is included
    • No real support for load testing beyond timing a request, as there is no concurrency (within the program at least).

    Other