pub struct TestScriptSetupActionAssert {Show 53 fields
pub id: Option<String>,
pub extension: Vec<Extension>,
pub modifier_extension: Vec<Extension>,
pub label: Option<String>,
pub label_ext: Option<FieldExtension>,
pub description: Option<String>,
pub description_ext: Option<FieldExtension>,
pub direction: Option<AssertionDirectionType>,
pub direction_ext: Option<FieldExtension>,
pub compare_to_source_id: Option<String>,
pub compare_to_source_id_ext: Option<FieldExtension>,
pub compare_to_source_expression: Option<String>,
pub compare_to_source_expression_ext: Option<FieldExtension>,
pub compare_to_source_path: Option<String>,
pub compare_to_source_path_ext: Option<FieldExtension>,
pub content_type: Option<String>,
pub content_type_ext: Option<FieldExtension>,
pub default_manual_completion: Option<AssertionManualCompletionType>,
pub default_manual_completion_ext: Option<FieldExtension>,
pub expression: Option<String>,
pub expression_ext: Option<FieldExtension>,
pub header_field: Option<String>,
pub header_field_ext: Option<FieldExtension>,
pub minimum_id: Option<String>,
pub minimum_id_ext: Option<FieldExtension>,
pub navigation_links: Option<bool>,
pub navigation_links_ext: Option<FieldExtension>,
pub operator: Option<AssertionOperatorType>,
pub operator_ext: Option<FieldExtension>,
pub path: Option<String>,
pub path_ext: Option<FieldExtension>,
pub request_method: Option<TestScriptRequestMethodCode>,
pub request_method_ext: Option<FieldExtension>,
pub request_url: Option<String>,
pub request_url_ext: Option<FieldExtension>,
pub resource: Option<String>,
pub resource_ext: Option<FieldExtension>,
pub response: Option<AssertionResponseTypes>,
pub response_ext: Option<FieldExtension>,
pub response_code: Option<String>,
pub response_code_ext: Option<FieldExtension>,
pub source_id: Option<String>,
pub source_id_ext: Option<FieldExtension>,
pub stop_test_on_fail: bool,
pub stop_test_on_fail_ext: Option<FieldExtension>,
pub validate_profile_id: Option<String>,
pub validate_profile_id_ext: Option<FieldExtension>,
pub value: Option<String>,
pub value_ext: Option<FieldExtension>,
pub warning_only: bool,
pub warning_only_ext: Option<FieldExtension>,
pub requirement: Vec<Option<TestScriptSetupActionAssertRequirement>>,
pub requirement_ext: Vec<Option<FieldExtension>>,
}
Expand description
Sub-fields of the assert field in TestScriptSetupAction
Fields§
§id: Option<String>
Unique id for inter-element referencing
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
extension: Vec<Extension>
Additional content defined by implementations
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
modifier_extension: Vec<Extension>
Extensions that cannot be ignored even if unrecognized
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element’s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
label: Option<String>
Tracking/logging assertion label
The label would be used for tracking/logging purposes by test engines.
This has no impact on the verification itself.
label_ext: Option<FieldExtension>
Extension field.
description: Option<String>
Tracking/reporting assertion description
The description would be used by test engines for tracking and reporting purposes.
This has no impact on the verification itself.
description_ext: Option<FieldExtension>
Extension field.
direction: Option<AssertionDirectionType>
AssertionDirectionType; response | request
The direction to use for the assertion.
If the direction is specified as “response” (the default), then the processing of this assert is against the received response message. If the direction is specified as “request”, then the processing of this assert is against the sent request message.
direction_ext: Option<FieldExtension>
Extension field.
compare_to_source_id: Option<String>
Id of the source fixture to be evaluated
Id of the source fixture used as the contents to be evaluated by either the “source/expression” or “sourceId/path” definition.
compare_to_source_id_ext: Option<FieldExtension>
Extension field.
compare_to_source_expression: Option<String>
The FHIRPath expression to evaluate against the source fixture
The FHIRPath expression for a specific value to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
Thefhirpath expression to be evaluated against the expected fixture to compare to. Ignored if “assert.value” is used. The evaluation will be done before the assertion is evaluated.
compare_to_source_expression_ext: Option<FieldExtension>
Extension field.
compare_to_source_path: Option<String>
XPath or JSONPath expression to evaluate against the source fixture
XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if “assert.value” is used. The evaluation will be done before the assertion is evaluated.
compare_to_source_path_ext: Option<FieldExtension>
Extension field.
content_type: Option<String>
MimeType; Mime type to compare against the ‘Content-Type’ header
The mime-type contents to compare against the request or response message ‘Content-Type’ header.
If this is specified, then test engine shall confirm that the content-type of the last operation’s headers is set to this value. If “assert.sourceId” element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation’s headers). If you’d like to have more control over the string, then use ‘assert.headerField’ instead.
content_type_ext: Option<FieldExtension>
Extension field.
default_manual_completion: Option<AssertionManualCompletionType>
AssertionManualCompletionType; fail | pass | skip | stop
The default manual completion outcome applied to this assertion.
Manual completion is used to pause the test engine execution and evaluation allowing an external review of the defined assert condition. The defaultManualCompletion defines the default manual completion outcome applied if one of the enumerated values is not applied.
default_manual_completion_ext: Option<FieldExtension>
Extension field.
expression: Option<String>
The FHIRPath expression to be evaluated
The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
If both “expression” and a “fixtureId” are specified, then the expression will be evaluated against the request or response body mapped to the fixtureId. If “expression” is specified and a “fixtureId” is not, then the expression will be evaluated against the response body of the last operation. Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.
The FHIRPath expression can be evaluated as either a path to a specific value or as a boolean expression against the given FHIR resource. When the FHIRPath is a boolean expression, the assert.value element is not used. See Testing FHIR Use Expressions.
expression_ext: Option<FieldExtension>
Extension field.
header_field: Option<String>
HTTP header field name
The HTTP header field name e.g. ‘Location’.
If “headerField” is specified then “value” must be specified. If “sourceId” is not specified, then “headerField” will be evaluated against the last operation’s response headers. Test engines are to keep track of the last operation’s response body and response headers.
header_field_ext: Option<FieldExtension>
Extension field.
minimum_id: Option<String>
Fixture Id of minimum content resource
The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.
Asserts that the response contains all the element/content in another fixture pointed to by minimumId. This can be a statically defined fixture or one that is dynamically set via responseId.
See Testing FHIR Use minimumId for a more complete description of the test engine’s comparison logic.
minimum_id_ext: Option<FieldExtension>
Extension field.
Perform validation on navigation links?
Whether or not the test execution performs validation on the bundle navigation links.
Asserts that the Bundle contains first, last, and next links.
Extension field.
operator: Option<AssertionOperatorType>
AssertionOperatorType; equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
The operator type defines the conditional behavior of the assert.
Operators are useful for both positive and negative testing. If operator is not specified, then the default conditional behavior is implemented as defined in Testing FHIR Assertions.
operator_ext: Option<FieldExtension>
Extension field.
path: Option<String>
XPath or JSONPath expression
The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
If both “path” and a “fixtureId” are specified, then the path will be evaluated against the request or response body mapped to the fixtureId. If “path” is specified and a “fixtureId” is not, then the path will be evaluated against the response body of the last operation. Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.
path_ext: Option<FieldExtension>
Extension field.
request_method: Option<TestScriptRequestMethodCode>
TestScriptRequestMethodCode; delete | get | options | patch | post | put | head
The request method or HTTP operation code to compare against that used by the client system under test.
If “requestMethod” is specified then it will be used in place of “value”. The “requestMethod” will evaluate against the last operation’s request HTTP operation.
request_method_ext: Option<FieldExtension>
Extension field.
request_url: Option<String>
Request URL comparison value
The value to use in a comparison against the request URL path string.
If “requestURL” is specified then it will be used in place of “value”. The “requestURL” will evaluate against the last operation’s full request URL path string.
request_url_ext: Option<FieldExtension>
Extension field.
resource: Option<String>
FHIRConcreteType; Resource type
The type of the resource. See the resource list.
This will be expected resource type in response body e.g. in read, vread, search, etc. See the Resource List for complete list of resource types; e.g.
resource_ext: Option<FieldExtension>
Extension field.
response: Option<AssertionResponseTypes>
AssertionResponseTypes; continue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported
continue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported.
This is a shorter way of achieving similar verifications via “assert.responseCode”. If you need more control, then use “assert.responseCode” e.g.
response_ext: Option<FieldExtension>
Extension field.
response_code: Option<String>
HTTP response code to test
The value of the HTTP response code to be tested.
To be used with “operator” attribute value. Asserts that the response code equals this value if “operator” is not specified. If the operator is “in” or “notIn” then the responseCode would be a comma-separated list of values e.g. “200,201”. Otherwise, it’s expected to be a numeric value. If “fixture” is not specified, then the “responseBodyId” value of the last operation is assumed.
response_code_ext: Option<FieldExtension>
Extension field.
source_id: Option<String>
Fixture Id of source expression or headerField
Fixture to evaluate the XPath/JSONPath expression or the headerField against.
This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.
source_id_ext: Option<FieldExtension>
Extension field.
stop_test_on_fail: bool
If this assert fails, will the current test execution stop?
Whether or not the current test execution will stop on failure for this assert.
If this element is specified and it is true, then assertion failures should not stop the current test execution from proceeding.
stop_test_on_fail_ext: Option<FieldExtension>
Extension field.
validate_profile_id: Option<String>
Profile Id of validation profile reference
The ID of the Profile to validate against.
The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.
validate_profile_id_ext: Option<FieldExtension>
Extension field.
value: Option<String>
The value to compare to
The value to compare to.
The string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.
value_ext: Option<FieldExtension>
Extension field.
warning_only: bool
Will this assert produce a warning only on error?
Whether or not the test execution will produce a warning only on error for this assert.
If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding. There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning.
warning_only_ext: Option<FieldExtension>
Extension field.
requirement: Vec<Option<TestScriptSetupActionAssertRequirement>>
Links or references to the testing requirements
Links or references providing traceability to the testing requirements for this assert.
TestScript and TestReport instances are typically (and expected to be) based on known, defined test requirements and documentation. These links provide traceability from the executable/executed TestScript and TestReport tests to these requirements.
requirement_ext: Vec<Option<FieldExtension>>
Extension field.
Implementations§
Source§impl TestScriptSetupActionAssert
impl TestScriptSetupActionAssert
Sourcepub fn builder() -> TestScriptSetupActionAssertBuilder
pub fn builder() -> TestScriptSetupActionAssertBuilder
Start building a new instance
Trait Implementations§
Source§impl Clone for TestScriptSetupActionAssert
impl Clone for TestScriptSetupActionAssert
Source§fn clone(&self) -> TestScriptSetupActionAssert
fn clone(&self) -> TestScriptSetupActionAssert
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more