Skip to main content

bloodaxe is the nice way to testing and metrifying api flows.

Project description

CircleCI

bloodaxe logo

bloodaxe is the nice way to testing and metrifying api flows.

GIF demo

Usage

Usage: bloodaxe.py [OPTIONS] CONFIG_FILE

Options:
  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.

  --help                Show this message and exit.

$ bloodaxe example.toml

Installation Options

Install with pip

$ pip install bloodaxe

$ bloodaxe

Flow configuration examples

[configs]
number_of_concurrent_flows = 10 # Number of concurrent coroutines flows
duration = 60 # Stressing duration

[[api]] # Api context
name = "user_api"
base_url = "http://127.0.0.1:8080" # Base url at the moment, is the unique parameter in api section.
[api.envvars] # Environment variables for given api
client_id = "CLIENT_ID" # Envvars names
client_secret = "CLIENT_SECRET"

[[api]]
name = "any_api"
base_url = "http://127.0.0.1:1010"

[[request]] # Request context
name = "get_token" 
url = "{{ user_api.base_url }}/token/" # Use user_api context to get the base_url
method = "POST"
timeout = 60 # The bloodaxe default timeout value is 10 secs, but it's possible override the default value
save_result = true # Save request result in request name context, default value is false
[request.data] # Request data section
client_id = "{{ user_api.client_id }}" # templating syntax is allowed in request.data
client_secret = "{{ user_api.client_secret }}"
[request.headers] # Request header section
Content-Type = 'application/x-www-form-urlencoded'

[[request]]
name = "get_user"
url = "{{ user_api.base_url }}/users/1"
method = "GET"
timeout = 60
save_result = true
[request.headers]
Authorization = "{{ get_token.access_token}}" # templating syntax is allowed in request.headers

[[request]]
name ="get_user_with_params"
url = "{{ user_api.base_url }}/users/"
method = "GET"
timeout = 60
save_result = false
[request.params] # Request params section
name = "{{ get_user.name }}" # templating syntax is allowed in request.params/querystring
[request.headers]
Authorization = "{{ get_token.access_token}}"

[[request]]
name = "create_new_user"
url = "{{  user_api.base_url }}/users/"
method = "POST"
[request.data]
firstname = "{{ get_user.firstname }} test"
lastname = "{{ get_user.Lastname }} test"
status = "{{ get_user.status }} test"
[request.headers]
Authorization = "{{ get_token.access_token}}"
[request.response_check] # response_check feature checking response data and status_code
status_code = 201
[request.response_check.data]
firstname = "{{ get_user.firstname }} test" # templating syntax is allowed in response data checks
lastname = "{{ get_user.Lastname }} test"
status = "{{ get_user.status }} test"

[[request]]
name = "create_new_user_with_from_file"
url = "{{  user_api.base_url }}/users/"
method = "PATCH"
[request.data]
from_file = "user.json" # from_file help you configure request.data
[request.headers]
Authorization = "{{ get_token.access_token}}"

Backlog

https://github.com/rfunix/bloodaxe/projects/1

Project details


Download files

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

Source Distribution

bloodaxe-0.2.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

bloodaxe-0.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file bloodaxe-0.2.0.tar.gz.

File metadata

  • Download URL: bloodaxe-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.1 Linux/4.15.0-58-generic

File hashes

Hashes for bloodaxe-0.2.0.tar.gz
Algorithm Hash digest
SHA256 06fd4229fe8121cd231c8998115f2fbadcd295e3a5986b77f14e23f34ade4562
MD5 553199717e83600c8ddae2dc222ee3a9
BLAKE2b-256 88675d5c9e3c834594630b7a373cbc0b1f0b2e07599f6e1e4e9f3cdaa422b62f

See more details on using hashes here.

File details

Details for the file bloodaxe-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bloodaxe-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.1 Linux/4.15.0-58-generic

File hashes

Hashes for bloodaxe-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfa05ee190e0e0356029d2e51133fca3ec2e6140759929197e8a282d630349c4
MD5 2ab57e9aff69b7cdc20c6ef12d9e2f96
BLAKE2b-256 0fc70256e9f1775f8e7f937d17871b40bbf4bbb7931f6337aa3bccece5918806

See more details on using hashes here.

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