Request
formatting...Task calls the request
method of a grizzly.users
implementation.
This is the most essential task in grizzly
, it defines requests that the specified load user is going to execute
against the target under test.
Optionally, the MIME type of the response can be set, this has to be done if any of the response steps is going to be used.
Step implementations
Statistics
Executions of this task will be visible in locust
request statistics with request type method
.
Arguments
Name | Type | Description | Default |
---|---|---|---|
method |
RequestMethod |
method used for the request, e.g. GET or POST , also includes the direction (to or from) |
required |
name |
str |
name of the request, used in locust statistics |
required |
endpoint |
str |
endpoint on the load testing target, have different meaning depending on the specified load user | required |
source |
str |
payload data sent to endpoint , can be a file path |
None |
Format
endpoint
All pipe arguments will be removed from endpoint
before creating the task instance. Depending on the load user, other
pipe arguments might be supported.
Name | Type | Description | Default |
---|---|---|---|
endpoint |
str |
endpoint in format that the specified load user understands | required |
content_type |
TransformerContentType |
MIME type of response from endpoint |
None |
timeout |
float |
maximum number of seconds that the task is allowed to execute, if it is exceeded TaskTimeOutError will be raised |
None (indefinitely) |
Specifying MIME/content type as an argument to endpoint
is the same as using content type step.
Then put request "test/request.j2.json" with name "test-put" to endpoint "/api/test | content_type=json"
# same as
Then put request "test/request.j2.json" with name "test-put" to endpoint "/api/test"
And set response content type to "application/json"