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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for djangohttpbench-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05fa01fd226a33147afe6df40407afda5e6bb06590aed214e9aa8444522932b1 |
|
MD5 | 010b698510c5f673f9affb67fe5de722 |
|
BLAKE2b-256 | 1988be30809edbe7289415777123d91d651c8846c30b326ba7e41f625646c4fc |