Request
This 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
-
method
RequestMethod - method used for the request, e.g.GET
orPOST
, also includes the direction (to or from) -
name
str - name of the request, used inlocust
statistics -
endpoint
str - endpoint on the load testing target, have different meaning depending on the specified Load User -
source
str (optional) - payload data sent toendpoint
, can be a file path
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.
<endpoint> [| content_type=<content_type>]
-
endpoint
str - endpoint in format that the specified Load User understands -
content_type
TransformerContentType (optional) - MIME type of response fromendpoint
Specifying MIME/content type as an argument to endpoint
is the same as using step_response_content_type.
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"