-
Notifications
You must be signed in to change notification settings - Fork 17
Home
#### I set base URL to "{base_url}"
Saves desired value into context.base_url
variable
#### I add path "{path}" to base URL
Appends desired value to context.base_url
variable
#### I set "{header_name}" header to "{header_value}"
Saves variable header_name = header_value into context
#### I set Authorization header to "{header_value}"####
Sets Authorization
header to Bearer
+ desired value and saves into context
#### I clear "{header_name}" header
Removes desired header from context
#### I clear all headers
Removes all headers from context
#### I want to reuse "{parameter_name}" parameter
Saves parameter and its value from JSON body (top level) into context
, e.g.:
{
"array": [1, 2, 3],
"data": {
"numbers": {
"int": 123,
"float": 3.0,
"long": 9223372036854775808
}
}
}
will work only with "array" parameter
#### I want to reuse parameter "{parameter_name}" at path "{json_path}"
Saves parameter and its value from JSON body with specified path into context
, e.g.:
{
"array": [1, 2, 3],
"data": {
"numbers": {
"int": 123,
"float": 3.0,
"long": 9223372036854775808
}
}
}
to get to the "float" parameter, we need to specify path .data.numbers.float
#### I want to reuse "{header_name}" header
Saves desired response header and it's value into context
#### I make a {request_verb} request to "{url_path_segment}"
Makes specified request to context.base_url
+ provided path, using headers stored in context, without parameters
#### I make a {request_verb} request to "{url_path_segment}" with parameters
Makes specified request to context.base_url
+ provided path, using headers stored in context
, with parameters described in table, e.g.:
|email|password|
|test@test.com|qwerty|
#### the response status code should equal {expected_http_status_code}
Checks that response status code equals provided value
#### the response status code should not equal {invalid_http_status_code}
Checks that response status code doesn't equal provided value
#### the response status code should be among {expected_http_status_codes}
Checks that response status code equals any value from the provided list
#### the response status message should equal "{expected_http_status_message}"
Checks that response status message equals provided value
#### the response parameter "{parameter_name}" should equal {expected_parameter_value}
Checks that parameter from JSON (top level) equals provided value
#### JSON at path "{json_path}" should equal {expected_json_value}
Checks that parameter from JSON at specified path equals provided value
#### the response header "{header_name}" should equal "{expected_header_value}"
Checks that response header's value equals provided value
#### the response structure should equal "{expected_response_structure}"
Checks that JSON in response validates against provided structure (uses Trafaret)
### Steps related to SSL validation:
#### I do not want to verify SSL certs
Sets context.verify_ssl
parameter to False
, thus disabling requests
check for certificates validity
#### I want to verify SSL certs
Sets context.verify_ssl
parameter to True
, thus enabling requests
check for certificates validity
#### I make an untrusted {request_verb} request to "{url_path_segment}"
Makes specified request to context.base_url
+ provided path, using headers stored in context, without parameters, with disabled SSL validation
#### I make an untrusted {request_verb} request to "{url_path_segment}" with parameters
Makes specified request to context.base_url
+ provided path, using headers stored in context, with parameters, and disabled SSL validation