validates the length of an HTTP(S) response
Name | Type | Default | Description |
---|---|---|---|
min |
NUMBER | 0 |
Minimum number of bytes required for a valid
response. Implied. Defaults to
0 .
|
max |
NUMBER | none | Maximum number of bytes required for a valid response. Optional. When absent, there is no upper limit on the number of bytes in a valid response. |
label |
CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
A byteLength
validation
passes if the HTTP(S) response is at least
min
bytes long, and (when specified) at most
max
bytes long.
validates the presence of an HTTP(S) cookie in a response
Name | Type | Default | Description |
---|---|---|---|
name |
CDATA | none, but required | The name of the cookie to look for. Required. |
value |
CDATA | none, optional | The value that the cookie with the specified name should have (if any). |
label |
CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
A cookie
validation
passes if the HTTP(S) response contains a cookie with the
specified name
.
If a value
is provided,
the cookie must also have the specified value.
username/password credentials for Basic HTTP authentication.
Name | Type | Default | Description |
---|---|---|---|
userName |
CDATA | none, required | User name. Required. |
password |
CDATA | none, required | Password. Required. |
Contains credentials for HTTP Basic Authentication.
validates the response time for an HTTP(S) request
Name | Type | Default | Description |
---|---|---|---|
millis |
NUMBER | 30000 |
Maximum amount of time, in milliseconds, in which
a response must be returned to be considered a
valid response. Implied. Defaults to
30000 milliseconds,
or 30 seconds.
|
label |
CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
A maxRequestTime
validation
passes if the HTTP(S) response is obtained in no more than
millis
milliseconds.
indicates a request parameter as part of an HTTP(S) request to be executed
None.
A parameter to be submitted as part of a request.
the name part of a name/value pair parameter
None.
The name part of param to be submitted as part of a request.
the value part of a name/value pair parameter
None.
The value part of param to be submitted as part of a request.
validates the presence or absence of a regular expression within an HTTP(S) response
Name | Type | Default | Description |
---|---|---|---|
pattern |
CDATA | none, but required. | The regular expression to look for. |
cond |
Enumeration:
|
true |
When true ,
the given pattern
must match within the response.
When false ,
the given pattern
must not match within the response.
|
ignoreCase |
Enumeration:
|
false |
When true ,
case is ignored within the
given pattern .
|
label |
CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
A maxRequestTime
validation
passes if the HTTP(S) response is obtained in no more than
millis
milliseconds.
indicates an HTTP(S) request to be executed
Name | Type | Default | Description |
---|---|---|---|
path |
CDATA | none, but required | Request path. Required. |
method |
enumeration:
|
get |
HTTP method. Implied. Defaults to get . |
host |
CDATA | none | Host to submit request to. Optional. When absent, uses default from suite. |
port |
NUMBER | depends upon protocol | Port to submit request to. Optional. When absent, uses default from suite. |
label |
CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
An HTTP(S) request to be executed.
wrapper for a sequence of requests associated with the same state (session)
Name | Type | Default | Description |
---|---|---|---|
sessionId |
CDATA | none |
Unique identifier for this session .
Sessions with the same sessionId
will share the same underlying state (e.g., cookies, etc.)
|
label |
CDATA | none |
Label associated with this session , which may
be used in programatically generated documentation
or reports. Optional.
|
A session
is a collection of
requests
that share the same underlying state. For example,
a cookie that returned in the response to one
request
will be included in subsequent
requests.
validates an HTTP response code
Name | Type | Default | Description |
---|---|---|---|
code |
NUMBER | 200 |
Numeric HTTP response code to expect.
Implied. Defaults to
200 .
|
label |
CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
A statusCode
validation
passes if the HTTP(S) response code for the given request
matches the value specified by
code
.
root element for a suite of tests
Name | Type | Default | Description |
---|---|---|---|
defaultHost |
CDATA | none | Default hostname for requests. Optional. |
defaultPort |
NUMBER | none | Default port for requests. Optional. |
label |
CDATA | none |
Label associated with this suite , which may
be used in programatically generated documentation
or reports. Optional.
|
None.
A suite
is a collection of
requests
and sessions
to execute.
indicates the suite of validations to apply to the current request (and its response)
None.
Contains the set of validations to apply to the current request (and its response).
xpath - assuming the HTTP(s) response contains XML, checks if an XPath expression matches
Name | Type | Default | Description |
---|---|---|---|
select |
CDATA | none | An XPath expression, designed to match a node in the XML body of the response. |
cond |
Enumeration:
|
true
|
When true , the given XPath expression must match within the
response. When false , the given XPath expression must not
match within the response.
|
value |
CDATA | none, optional | The value that the matched node should have, if any. |
label |
CDATA | none | Label associated with this validation, which may be used in programatically generated documentation or reports. Optional. |
A xpath validation passes if the HTTP(S) response body contains XML, and the specified XPath expression matches (or not, depending on cond)