Skip to main content

HTTP load testing tools for Django. Like an apache bench but requests are sent from authenticated users.

Project description

HTTP load testing tools for Django. Like an apache bench but requests are sent from authenticated users without having to know their password.

Usage

Requirements:

Supported python versions are python 3.6 or later.

  • django (>= 2.0)

  • requests

Installation

$ python3 -m pip install django-httpbench

HeaderAuthBackend

Django authentication backend that allows one to login without having to know their password. This backend is useful for testing scenarios.

HTTP_BENCH_USERNAME_KEY = "X-USERNAME"  # default: X-USERNAME

INSTALLED_APPS += [
    'httpbench.apps.HttpbenchConfig',
]

MIDDLEWARE += [
    'httpbench.middlewares.HeaderAuthMiddleware',
]
$ curl -H 'X-USERNAME: c-bata' https://localhost:8000/path/to/page/require/auth

‘httpbench’ management command

httpbench management command acts like an apache bench but requests are sent from authenticated users.

$ python manage.py httpbench \
> --username c-bata \
> --url https://localhost:8000/

Contributing

Flake8

$ flake8

Run unittests

$ DJANGO_SETTINGS_MODULE=test_settings python -m django test

License

This software is licensed under the MIT License (See LICENSE ).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

djangohttpbench-0.0.1-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page