action load

run_load_test

Run a load test against a URL

Run it now
View details
Typeaction
Modulechaosreliably.activities.load.actions
Namerun_load_test
Returnmapping

Usage

JSON

{
  "name": "run-load-test",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosreliably.activities.load.actions",
    "func": "run_load_test",
    "arguments": {
      "url": ""
    }
  }
}

YAML

name: run-load-test
provider:
  arguments:
    url: ''
  func: run_load_test
  module: chaosreliably.activities.load.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
urlstringYesTarget URL
durationinteger30YesTest DurationDuration of the entire load test
test_namestringload testNoTest NameUnique name for this particular test.
qpsinteger5NoQPSQuery per second rate
insecurebooleanfalseNoInsecure ConnectionAllow connection to an insecure HTTPS server
hoststringNoHost HeaderForce this Host header value
methodstringGETNoMethodUse this HTTP method
headersstringNoHeadersComma-separated list of headers
bodystringNoBodyContent to pass to the request
content_typestringNoBody Content-TypeContent-Type of the body request

This action requies oha in your PATH.

Signature

def run_load_test(url: str,
                  duration: int = 30,
                  qps: int = 5,
                  use_dns_servers: str = '',
                  insecure: bool = False,
                  host: str = 'None',
                  method: str = 'GET',
                  headers: str = '',
                  body: str = '',
                  content_type: str = '') -> Dict[str, Any]:
    pass