smithy.test
Members list
Type members
Classlikes
Value parameters
- CLIENT
-
The test only applies to client implementations.
- SERVER
-
The test only applies to server implementations.
Attributes
- Companion
- object
- Supertypes
-
class Valuetrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Value parameters
- body
-
The HTTP message body to include in the request
- headers
-
Defines a map of HTTP headers to include in the request
- host
-
The host / endpoint provided to the client, not including the path or scheme (for example, "example.com").
- method
-
The HTTP request method.
- queryParams
-
A list of the serialized query string parameters to include in the request. Each element in the list is a query string key value pair that starts with the query string parameter name optionally followed by "=", optionally followed by the query string parameter value. For example, "foo=bar", "foo=", and "foo" are all valid values. The query string parameter name and the value MUST appear in the format in which it is expected to be sent over the wire; if a key or value needs to be percent-encoded, then it MUST appear percent-encoded in this list.
- uri
-
The request-target of the HTTP request, not including the query string (for example, "/foo/bar").
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Companion[HttpMalformedRequestDefinition]trait Has[HttpMalformedRequestDefinition]trait ShapeTag[HttpMalformedRequestDefinition]trait HasIdclass Objecttrait Matchableclass AnyShow all
- Self type
Value parameters
- documentation
-
A description of the test and what is being asserted.
- id
-
The identifier of the test case. This identifier can be used by protocol test implementations to filter out unsupported test cases by ID, to generate test case names, etc. The provided
id
MUST match Smithy'sidentifier
ABNF. No twohttpMalformedRequestTests
test cases can share the same ID. - protocol
-
The name of the protocol to test.
- request
-
The malformed request to send.
- response
-
The expected response.
- tags
-
Applies a list of tags to the test.
- testParameters
-
An optional set of test parameters for parameterized testing.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Companion[HttpMalformedRequestTestCase]trait Has[HttpMalformedRequestTestCase]trait ShapeTag[HttpMalformedRequestTestCase]trait HasIdclass Objecttrait Matchableclass AnyShow all
- Self type
Attributes
- Supertypes
-
class Newtype[Map[String, List[String]]]trait HasIdclass Objecttrait Matchableclass Any
- Self type
Define how a malformed HTTP request is rejected by a server given a specific protocol
Define how a malformed HTTP request is rejected by a server given a specific protocol
Attributes
- Supertypes
-
trait HasIdclass Objecttrait Matchableclass Any
- Self type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class ContentsCaseclass MessageRegexCase
- Self type
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrortrait Companion[HttpMalformedResponseBodyAssertion]trait Has[HttpMalformedResponseBodyAssertion]trait ShapeTag[HttpMalformedResponseBodyAssertion]trait HasIdclass Objecttrait Matchableclass AnyShow all
- Self type
Value parameters
- assertion
-
The assertion to execute against the response body.
- mediaType
-
The media type of the response body. This is used to help test runners to parse and evaluate
contents' and
messageRegex` in the assertion
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Companion[HttpMalformedResponseBodyDefinition]trait Has[HttpMalformedResponseBodyDefinition]trait ShapeTag[HttpMalformedResponseBodyDefinition]trait HasIdclass Objecttrait Matchableclass AnyShow all
- Self type
Value parameters
- body
-
The expected response body.
- code
-
Defines the HTTP response code.
- headers
-
Defines a map of expected HTTP headers. Headers that are not listed in this map are ignored.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Companion[HttpMalformedResponseDefinition]trait Has[HttpMalformedResponseDefinition]trait ShapeTag[HttpMalformedResponseDefinition]trait HasIdclass Objecttrait Matchableclass AnyShow all
- Self type
Value parameters
- appliesTo
-
Indicates that the test case is only to be implemented by "client" or "server" implementations. This property is useful for identifying and testing edge cases of clients and servers that are impossible or undesirable to test in both client and server implementations.
- authScheme
-
The optional authentication scheme shape ID to assume. It's possible that specific authentication schemes might influence the serialization logic of an HTTP request.
- body
-
The expected HTTP message body. If no request body is defined, then no assertions are made about the body of the message.
- bodyMediaType
-
The media type of the
body
. This is used to help test runners to parse and validate the expected data against generated data. - documentation
-
A description of the test and what is being asserted.
- forbidHeaders
-
A list of header field names that must not appear in the serialized HTTP request.
- forbidQueryParams
-
A list of query string parameter names that must not appear in the serialized HTTP request. Each value MUST appear in the format in which it is sent over the wire; if a key needs to be percent-encoded, then it MUST appear percent-encoded in this list.
- headers
-
Defines a map of expected HTTP headers. Headers that are not listed in this map are ignored unless they are explicitly forbidden through
forbidHeaders
. - host
-
The host / endpoint provided to the client, not including the path or scheme (for example, "example.com").
- id
-
The identifier of the test case. This identifier can be used by protocol test implementations to filter out unsupported test cases by ID, to generate test case names, etc. The provided
id
MUST match Smithy'sidentifier
ABNF. No twohttpRequestTests
test cases can share the same ID. - method
-
The expected serialized HTTP request method.
- params
-
Defines the input parameters used to generated the HTTP request. These parameters MUST be compatible with the input of the operation.
- protocol
-
The name of the protocol to test.
- queryParams
-
A list of the expected serialized query string parameters. Each element in the list is a query string key value pair that starts with the query string parameter name optionally followed by "=", optionally followed by the query string parameter value. For example, "foo=bar", "foo=", and "foo" are all valid values. The query string parameter name and the value MUST appear in the format in which it is expected to be sent over the wire; if a key or value needs to be percent-encoded, then it MUST appear percent-encoded in this list. A serialized HTTP request is not in compliance with the protocol if any query string parameter defined in
queryParams
is not defined in the request or if the value of a query string parameter in the request differs from the expected value.queryParams
applies no constraints on additional query parameters. - requireHeaders
-
A list of header field names that must appear in the serialized HTTP message, but no assertion is made on the value. Headers listed in
headers
do not need to appear in this list. - requireQueryParams
-
A list of query string parameter names that MUST appear in the serialized request URI, but no assertion is made on the value. Each value MUST appear in the format in which it is sent over the wire; if a key needs to be percent-encoded, then it MUST appear percent-encoded in this list.
- resolvedHost
-
The host / endpoint that the client should send to, not including the path or scheme (for example, "prefix.example.com"). This can differ from the host provided to the client if the
hostPrefix
member of theendpoint
trait is set, for instance. - tags
-
Applies a list of tags to the test.
- uri
-
The request-target of the HTTP request, not including the query string (for example, "/foo/bar").
- vendorParams
-
Defines vendor-specific parameters that are used to influence the request. For example, some vendors might utilize environment variables, configuration files on disk, or other means to influence the serialization formats used by clients or servers. If a
vendorParamsShape
is set, these parameters MUST be compatible with that shape's definition. - vendorParamsShape
-
A shape to be used to validate the
vendorParams
member contents. If set, the parameters invendorParams
MUST be compatible with this shape's definition.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Companion[HttpRequestTestCase]trait Has[HttpRequestTestCase]trait ShapeTag[HttpRequestTestCase]trait HasIdclass Objecttrait Matchableclass AnyShow all
- Self type
-
HttpRequestTestCase.type
Define how an HTTP request is serialized given a specific protocol, authentication scheme, and set of input parameters.
Define how an HTTP request is serialized given a specific protocol, authentication scheme, and set of input parameters.
Attributes
- Supertypes
- Self type
-
HttpRequestTests.type
Value parameters
- appliesTo
-
Indicates that the test case is only to be implemented by "client" or "server" implementations. This property is useful for identifying and testing edge cases of clients and servers that are impossible or undesirable to test in both client and server implementations.
- authScheme
-
The optional authentication scheme shape ID to assume. It's possible that specific authentication schemes might influence the serialization logic of an HTTP response.
- body
-
Defines the HTTP message body. If no response body is defined, then no assertions are made about the body of the message.
- bodyMediaType
-
The media type of the
body
. This is used to help test runners to parse and validate the expected data against generated data. Binary media type formats require that the contents ofbody
are base64 encoded. - code
-
Defines the HTTP response code.
- documentation
-
A description of the test and what is being asserted.
- forbidHeaders
-
A list of header field names that must not appear.
- headers
-
A map of expected HTTP headers. Each key represents a header field name and each value represents the expected header value. An HTTP response is not in compliance with the protocol if any listed header is missing from the serialized response or if the expected header value differs from the serialized response value.
headers
applies no constraints on additional headers. - id
-
The identifier of the test case. This identifier can be used by protocol test implementations to filter out unsupported test cases by ID, to generate test case names, etc. The provided
id
MUST match Smithy'sidentifier
ABNF. No twohttpResponseTests
test cases can share the same ID. - params
-
Defines the output parameters deserialized from the HTTP response. These parameters MUST be compatible with the output of the operation.
- protocol
-
The shape ID of the protocol to test.
- requireHeaders
-
A list of header field names that must appear in the serialized HTTP message, but no assertion is made on the value. Headers listed in
headers
map do not need to appear in this list. - tags
-
Applies a list of tags to the test.
- vendorParams
-
Defines vendor-specific parameters that are used to influence the response. For example, some vendors might utilize environment variables, configuration files on disk, or other means to influence the serialization formats used by clients or servers. If a
vendorParamsShape
is set, these parameters MUST be compatible with that shape's definition. - vendorParamsShape
-
A shape to be used to validate the
vendorParams
member contents. If set, the parameters invendorParams
MUST be compatible with this shape's definition.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait Companion[HttpResponseTestCase]trait Has[HttpResponseTestCase]trait ShapeTag[HttpResponseTestCase]trait HasIdclass Objecttrait Matchableclass AnyShow all
- Self type
-
HttpResponseTestCase.type
Define how an HTTP response is serialized given a specific protocol, authentication scheme, and set of output or error parameters.
Define how an HTTP response is serialized given a specific protocol, authentication scheme, and set of output or error parameters.
Attributes
- Supertypes
- Self type
-
HttpResponseTests.type
Attributes
- Supertypes
-
class Newtype[String]trait HasIdclass Objecttrait Matchableclass Any
- Self type
-
NonEmptyString.type
Attributes
- Supertypes
- Self type
-
NonEmptyStringList.type
Attributes
- Supertypes
-
class Newtype[List[String]]trait HasIdclass Objecttrait Matchableclass Any
- Self type
-
StringList.type
Types
Define how a malformed HTTP request is rejected by a server given a specific protocol
Define how a malformed HTTP request is rejected by a server given a specific protocol
Attributes
Define how an HTTP request is serialized given a specific protocol, authentication scheme, and set of input parameters.
Define how an HTTP request is serialized given a specific protocol, authentication scheme, and set of input parameters.
Attributes
Define how an HTTP response is serialized given a specific protocol, authentication scheme, and set of output or error parameters.
Define how an HTTP response is serialized given a specific protocol, authentication scheme, and set of output or error parameters.