Martin Thurau
Martin Thurau

Reputation: 7654

Scriptable HTTP benchmark (preferable in Python)

I'm searching for a good way to stress test a web application. I'm searching for something like ab with a scriptable interface. Ideally, I want to define some tasks, that simulate different actions on the web app (register an account, log in, search, etc.) and the tool runs a whole bunch of processes that execute these tasks*. As a result, I would like something like "average request time", "slowest request (per URI)", etc.

*: To be independent of the client bandwidth I will run these tests from some EC2 instances so that in a perfect world the tool will already support this - otherwise I will script using boto.

Upvotes: 2

Views: 9280

Answers (4)

Aliaksandr Belik
Aliaksandr Belik

Reputation: 12873

You can maybe look onto these tools:

  1. palb (Python Apache-Like Benchmark Tool) - HTTP benchmark tool with command line interface resembles ab.
    It lacks the advanced features of ab, but it supports multiple URLs (from arguments, files, stdin, and Python code).

  2. Multi-Mechanize - Performance Test Framework in Python
    Multi-Mechanize is an open source framework for performance and load testing.

    • Runs concurrent Python scripts to generate load (synthetic transactions) against a remote site or service.
    • Can be used to generate workload against any remote API accessible from Python.
    • Test output reports are saved as HTML or JMeter-compatible XML.

  3. Pylot (Python Load Tester) - Web Performance Tool
    Pylot is a free open source tool for testing performance and scalability of web services.
    It runs HTTP load tests, which are useful for capacity planning, benchmarking, analysis, and system tuning.
    Pylot generates concurrent load (HTTP Requests), verifies server responses, and produces reports with metrics.
    Tests suites are executed and monitored from a GUI or shell/console.
    ( Pylot on GoogleCode )

  4. The Grinder
    Default script language is Jython.
    Pretty compact how-to guide.

  5. Tsung
    Maybe a bit unusual for the first use but really good for stress-testing.
    Step-by-step guide.

+1 for locust.io in answer above.

Upvotes: 3

Adam Holloway
Adam Holloway

Reputation: 423

If you're familiar with the python requests package, locust is very easy to write load tests in.

http://locust.io/

I've used it to write all of our perf tests in it.

Upvotes: 11

yanjost
yanjost

Reputation: 5441

Don't forget FunkLoad, it's very easy to use

Upvotes: 1

Peter
Peter

Reputation: 1893

I would recommend JMeter.

See: http://jmeter.apache.org/

You can setup JMeter as proxy of your browser to record actions like login and then stress test your web application. You can also write scripts to it.

Upvotes: 1

Related Questions