Skip to content

A flexible tool for stress testing servers with easily configurable HTTP requests.

Notifications You must be signed in to change notification settings

andgineer/bombard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bombard

Made with Python Latest release Coverage Pip upload Latest release MIT license

A flexible tool for stress testing servers with easily configurable requests.

Bombard allows you to simulate high-load scenarios by sending customizable requests to your server, helping you assess its performance and stability under stress.

It's especially good at simulating heavy loads and initial bursts of simultaneous HTTP requests with complex logic.

Bombard is designed to be an extremely simple yet powerful tool for load testing functional behavior.

Thanks to optional Python inlines, you can quickly and easily describe complex logic for your tests.

The test report shows you how many requests per second your server is capable of serving and with what latency.

Installation

pip install bombard --upgrade

After that, use the bombard (bombard.exe on Windows) executable:

bombard --help

Request Configuration

Requests can be a simple URL or contain JSON configuration like this:

supply:  # you can redefine variables from command line (--supply host=http://localhost/)
  host: https://jsonplaceholder.typicode.com/

getToken:
    url: "{host}auth"  # use custom {host} variable to stay DRY
    method: POST
    body:  # below is JSON object for request body
        email: name@example.com
        password: admin
    extract:  # get token for next requests
        token:

In the first request, you can get a security token as in the example above.

Then use it in subsequent requests:

postsList:
   url: "{host}posts"
   headers:
       Authorization: "Bearer {token}"  # we get {token} in 1st request
   script: |
       for post in resp[:3]:  # for 1st three posts from response
           # schedule getPost request (from ammo section)
           # and provide it with id we got from the response
           reload(ammo.getPost, id=post['id'])

Bombard includes examples. To list available examples:

bombard --examples

Command Line Options

From the command line, you can change the number of threads, loop count, supply variables, customize the report, and more.

You can also bootstrap your own bombard.yaml file from any example you like:

bombard --init --example simple

Report

Example of report for the command:

bombard --example simple --repeat 2 --threshold 100

https://github.com/andgineer/bombard/blob/master/docs/src/en/images/simple_stdout.png?raw=true

Publishing

Automatically published to PyPI when creating a release on GitHub.

If you want to publish from a local machine: 1) Place PyPI password in ~/.pypirc 2) Run make upload

Documentation

Bombard documentation

Scripts

make help

Coverage Report

About

A flexible tool for stress testing servers with easily configurable HTTP requests.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published