R6 Ballot (2nd Draft)

Publish-box (todo)

7.4 Resource TestScript - Content

FHIR Infrastructure icon Work GroupMaturity Level: 4 Trial UseSecurity Category: Anonymous Compartments: No defined compartments

A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.

This resource is a Quality Reporting & Testing resource from a FHIR Implementation Support perspective - see Implementation Support Module.

The TestScript resource is used to define tests that can be executed against one or more FHIR clients and servers. The TestScript resource will typically contain

  • a list of fixtures (required resources used in the tests)
  • setup procedures
  • a suite of thematically related tests
  • teardown procedures

For example, one TestScript might feature a set of tests focusing on searching Patients and validating the Bundle responses. The fixtures for such a test would contain a list of Patient resources that are required for the test to complete successfully. The setup procedures create the fixtures on the FHIR server being tested. A series of tests execute search operations with various search parameter combinations and evaluate the client requests and server responses for conformance and expected results. The teardown procedures could then clean up (delete) the fixtures on FHIR server that were created during the setup procedures.

The purpose of the TestScript is to encode in an executable representation tests that can be used

  1. to support end-to-end testing of business case workflow, such as patient coordination
  2. within an Ecosystem or Community of Systems-Under-Test
  3. to determine whether given FHIR clients and servers adhere and are conformant to the FHIR specification
  4. to determine whether the capabilities of two or more FHIR implementations capabilities are compatible and interoperable according to the FHIR specification
It might not be possible to fully automate the latter goal (especially with regards to business rules that might ride on top of different implementations), however the tests should be able to determine whether two servers support the operations, value sets, profiles, and extensions to exchange FHIR Resources; for example, the request sent and response returned from a Patient $everything operation.

Note to Implementers: At this time the scope and usage of TestScript resources is focused on the FHIR specification. The TestScript resource scope and usage may expand in the future to include support for other HL7 specifications such as C-CDA and V2 as HL7 aligns these specifications with FHIR-based nomenclature and definitions. Future support may also additionally include non-HL7 specifications that leverage the FHIR specification such as IHE profiles.

The TestScript resource should NOT be used to represent Clinical tests, Prescriptions, or any other Healthcare related concept. The TestScript resource is an infrastructure support resource used to represent standardized tests to determine a FHIR implementation's level of adherence to the FHIR specification.

TestScript is a part of the conformance framework and is used to validate the behavior of FHIR systems, specifically their correct implementation of StructureDefinition, ValueSet, OperationDefinition, CapabilityStatement and other FHIR resources that govern system behavior. TestScript instances may be included as part of ImplementationGuides to help define and test the desired behavior of systems that choose to comply with the implementation guide.

The following resources represent the FHIR conformance framework that are used to express the expected behavior of a FHIR compliant system:

The TestScript resource is designed to establish testing as a first class artifact within the FHIR specification. This resource allows defining a suite of tests that can be executed on one or more FHIR servers and clients.

Implementers should be familiar with the testing concepts and descriptions found in Testing FHIR before working with this resource.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript TU DomainResource Describes a set of tests
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation

Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource
... url ΣC 0..1 uri Canonical identifier for this test script, represented as a URI (globally unique)
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
... identifier Σ 0..* Identifier Additional identifier for the test script

... version Σ 0..1 string Business version of the test script
... versionAlgorithm[x] Σ 0..1 How to compare versions
Binding: Version Algorithm (Extensible)
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 1..1 string Name for this test script (computer friendly)
... title ΣT 0..1 string Name for this test script (human friendly)
... status ?!Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (Required)
... experimental Σ 0..1 boolean For testing purposes, not real usage
... date Σ 0..1 dateTime Date last changed
... publisher ΣT 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher

... description T 0..1 markdown Natural language description of the test script
... useContext Σ 0..* UsageContext The context that the content is intended to support

... jurisdiction ΣXD 0..* CodeableConcept Intended jurisdiction for test script (if applicable)
Binding: Jurisdiction ValueSet (Extensible)

... purpose T 0..1 markdown Why this test script is defined
... copyright T 0..1 markdown Use and/or publishing restrictions
... copyrightLabel T 0..1 string Copyright holder and year(s)
... origin 0..* BackboneElement An abstract server representing a client or sender in a message exchange

.... index 1..1 integer The index of the abstract origin server starting at 1
.... profile 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller
Binding: Test Script Profile Origin Type (Extensible)
.... url 0..1 url The url path of the origin server
... destination 0..* BackboneElement An abstract server representing a destination or receiver in a message exchange

.... index 1..1 integer The index of the abstract destination server starting at 1
.... profile 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
Binding: Test Script Profile Destination Type (Extensible)
.... url 0..1 url The url path of the destination server
... metadata C 0..1 BackboneElement Required capability that is assumed to function correctly on the FHIR server being tested
+ Rule: TestScript metadata capability SHALL contain required or validated or both.
.... link 0..* BackboneElement Links to the FHIR specification

..... url 1..1 uri URL to the specification
..... description 0..1 string Short description
.... capability C 1..* BackboneElement Capabilities that are assumed to function correctly on the FHIR server being tested

..... required C 1..1 boolean Are the capabilities required?
..... validated C 1..1 boolean Are the capabilities validated?
..... description 0..1 string The expected capabilities of the server
..... origin 0..* integer Which origin server these requirements apply to

..... destination 0..1 integer Which server these requirements apply to
..... link 0..* uri Links to the FHIR specification

..... capabilities 1..1 canonical(CapabilityStatement) Required Capability Statement
... scope 0..* BackboneElement Indication of the artifact(s) that are tested by this test case

.... artifact 1..1 canonical(Any) The specific conformance artifact being tested
.... conformance 0..1 CodeableConcept required | optional | strict
Binding: Test Script Scope Conformance Type (Extensible)
.... phase 0..1 CodeableConcept unit | integration | production
Binding: Test Script Scope Phase Type (Extensible)
... fixture 0..* BackboneElement Fixture in the test script - by reference (uri)

.... autocreate 1..1 boolean Whether or not to implicitly create the fixture during setup
.... autodelete 1..1 boolean Whether or not to implicitly delete the fixture during teardown
.... resource 0..1 Reference(Any) Reference of the resource
... profile 0..* canonical(StructureDefinition) Reference of the validation profile

... variable C 0..* BackboneElement Placeholder for evaluated elements
+ Rule: Variable can only contain one of expression, headerField or path.

.... name 1..1 string Descriptive name for this variable
.... defaultValue 0..1 string Default, hard-coded, or user-defined value for this variable
.... description 0..1 string Natural language description of the variable
.... expression C 0..1 string The FHIRPath expression against the fixture body
.... headerField C 0..1 string HTTP header field name for source
.... hint 0..1 string Hint help text for default value to enter
.... path C 0..1 string XPath or JSONPath against the fixture body
.... sourceId 0..1 id Fixture Id of source expression or headerField within this variable
... setup 0..1 BackboneElement A series of required setup operations before tests are executed
.... action C 0..* BackboneElement A setup common or operation or assert to perform
+ Rule: Setup action SHALL contain only one of either a common or an operation or an assert.

..... common C 0..1 BackboneElement Links or references to common collection(s) of actions
...... testScript 0..1 canonical(TestScript) Canonical reference to the common TestScript instance
...... keyRef 1..1 id Common key reference that identifies the common collection of actions to perform
...... parameter 0..* BackboneElement Parameter(s) to convey input values to the identified common collection of actions

....... name 1..1 string Name of the parameter from the identified common collection of actions
....... value 1..1 string Value to assign to the parameter from the identified common collection of actions
..... operation C 0..1 BackboneElement The setup operation to perform
+ Rule: Setup operation SHALL contain either sourceId or targetId or params or url.
...... type C 0..1 Coding The operation code type that will be executed
Binding: Test Script Operation Code (Extensible)
...... resource 0..1 uri Resource type
Binding: Concrete FHIR Types (Extensible)
...... label 0..1 string Tracking/logging operation label
...... description 0..1 string Tracking/reporting operation description
...... accept 0..1 code Mime type to accept in the payload of the response, with charset etc
Binding: Mime Types (Required)
...... contentType 0..1 code Mime type of the request payload contents, with charset etc
Binding: Mime Types (Required)
...... destination 0..1 integer Server responding to the request
...... encodeRequestUrl 1..1 boolean Whether or not to send the request url in encoded format
...... method 0..1 code delete | get | options | patch | post | put | head
Binding: Test Script Request Method Code (Required)
...... origin 0..1 integer Server initiating the request
...... params C 0..1 string Explicitly defined path parameters
...... requestHeader 0..* BackboneElement Each operation can have one or more header elements

....... field 1..1 string HTTP header field name
....... value 1..1 string HTTP headerfield value
...... requestId 0..1 id Fixture Id of mapped request
...... responseId 0..1 id Fixture Id of mapped response
...... sourceId C 0..1 id Fixture Id of body for PUT and POST requests
...... targetId C 0..1 id Id of fixture used for extracting the [id], [type], and [vid] for GET requests
...... url C 0..1 string Request URL
..... assert C 0..1 BackboneElement The assertion to perform
+ Rule: Only a single assertion SHALL be present within setup action assert element.
+ Rule: Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Rule: Setup action assert response and responseCode SHALL be empty when direction equals request
...... label 0..1 string Tracking/logging assertion label
...... description 0..1 string Tracking/reporting assertion description
...... direction C 0..1 code response | request
Binding: Assertion Direction Type (Required)
...... compareToSourceId C 0..1 string Id of the source fixture to be evaluated
...... compareToSourceExpression C 0..1 string The FHIRPath expression to evaluate against the source fixture
...... compareToSourcePath C 0..1 string XPath or JSONPath expression to evaluate against the source fixture
...... contentType C 0..1 code Mime type to compare against the 'Content-Type' header
Binding: Mime Types (Required)
...... defaultManualCompletion 0..1 code fail | pass | skip | stop
Binding: Assertion Manual Completion Type (Required)
...... expression C 0..1 string The FHIRPath expression to be evaluated
...... headerField C 0..1 string HTTP header field name
...... minimumId C 0..1 string Fixture Id of minimum content resource
...... navigationLinks C 0..1 boolean Perform validation on navigation links?
...... operator 0..1 code equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
Binding: Assertion Operator Type (Required)
...... path C 0..1 string XPath or JSONPath expression
...... requestMethod C 0..1 code delete | get | options | patch | post | put | head
Binding: Test Script Request Method Code (Required)
...... requestURL 0..1 string Request URL comparison value
...... resource C 0..1 uri Resource type
Binding: Concrete FHIR Types (Extensible)
...... response C 0..1 code 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
Binding: Assertion Response Types (Required)
...... responseCode C 0..1 string HTTP response code to test
...... sourceId 0..1 id Fixture Id of source expression or headerField
...... stopTestOnFail 1..1 boolean If this assert fails, will the current test execution stop?
...... validateProfileId C 0..1 id Profile Id of validation profile reference
...... value 0..1 string The value to compare to
...... warningOnly 1..1 boolean Will this assert produce a warning only on error?
...... requirement 0..* BackboneElement Links or references to the testing requirements

....... reference 1..1 canonical(Requirements) Canonical reference to the Requirements instance
....... key 1..1 id Requirements statement key identifier
... test 0..* BackboneElement A test in this script

.... name 0..1 string Tracking/logging name of this test
.... description 0..1 string Tracking/reporting short description of the test
.... action C 0..* BackboneElement A test operation or assert to perform
+ Rule: Test action SHALL contain only one of either a common or an operation or an assert.

..... common 0..1 see common Links or references to common collection(s) of actions
..... operation C 0..1 see operation The setup operation to perform
+ Rule: Test operation SHALL contain either sourceId or targetId or params or url.
..... assert C 0..1 see assert The setup assertion to perform
+ Rule: Only a single assertion SHALL be present within test action assert element.
+ Rule: Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Rule: Test action assert response and response and responseCode SHALL be empty when direction equals request
... teardown 0..1 BackboneElement A series of required clean up steps
.... action 1..* BackboneElement One or more teardown operations to perform

..... common 0..1 see common Links or references to common collection(s) of actions
..... operation C 1..1 see operation The teardown operation to perform
+ Rule: Teardown operation SHALL contain either sourceId or targetId or params or url.
... common 0..* BackboneElement A common collection of actions in this script

.... key 1..1 id Key that identifies this common collection of actions
.... name 0..1 string Tracking/logging name of this common collection of actions
.... description 0..1 string Tracking/reporting short description of this common collection of actions
.... parameter 0..* BackboneElement Parameter(s) to convey input values to this common collection of actions in this script

..... name 0..1 string Tracking/logging name of this parameter to be used in this common collection of actions
..... description 0..1 string Tracking/reporting short description of this parameter to be used this common collection of actions
.... action C 1..* BackboneElement A common operation or assert that can be re-used in this script
+ Rule: Common action SHALL contain either an operation or assert but not both.

..... operation C 0..1 see operation The common operation that can be re-used in this script
+ Rule: Common operation SHALL contain either sourceId or targetId or params or url.
..... assert C 0..1 see assert The common assertion to perform
+ Rule: Common action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Rule: Common action assert response and response and responseCode SHALL be empty when direction equals request
+ Rule: Only a single assertion SHALL be present within common action assert element.

doco Documentation for this format icon

See the Extensions for this resource

UML Diagram (Legend)

TestScript (DomainResource) +CanonicalResourceAn absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different serversurl : uri [0..1]A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instanceidentifier : Identifier [0..*]The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequenceversion : string [0..1]Indicates the mechanism used to compare versions to determine which is more currentversionAlgorithm[x] : DataType [0..1] « string|Coding; null (Strength=Extensible) VersionAlgorithm+ »A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generationname : string [1..1] « This element has or is affected by some invariantsC »A short, descriptive, user-friendly title for the test scripttitle : string [0..1]The status of this test script. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements)status : code [1..1] « null (Strength=Required)PublicationStatus! »A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the test script was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changesdate : dateTime [0..1]The name of the organization or individual responsible for the release and ongoing maintenance of the test scriptpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the test script from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instancesuseContext : UsageContext [0..*]A legal or geographic region in which the test script is intended to be usedjurisdiction : CodeableConcept [0..*] « null (Strength=Extensible)JurisdictionValueSet+ »Explanation of why this test script is needed and why it has been designed as it haspurpose : markdown [0..1]A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test scriptcopyright : markdown [0..1]A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')copyrightLabel : string [0..1]Reference to the profile to be used for validationprofile : canonical [0..*] « StructureDefinition »OriginAbstract name given to an origin server in this test script. The name is provided as a number starting at 1index : integer [1..1]The type of origin profile the test system supportsprofile : Coding [1..1] « null (Strength=Extensible)TestScriptProfileOriginType+ »The explicit url path of the origin server used in this test scripturl : url [0..1]DestinationAbstract name given to a destination server in this test script. The name is provided as a number starting at 1index : integer [1..1]The type of destination profile the test system supportsprofile : Coding [1..1] « null (Strength=Extensible)TestScriptProfileDestinationT...+ »The explicit url path of the destination server used in this test scripturl : url [0..1]MetadataLinkURL to a particular requirement or feature within the FHIR specificationurl : uri [1..1]Short description of the linkdescription : string [0..1]CapabilityWhether or not the test execution will require the given capabilities of the server in order for this test script to executerequired : boolean [1..1] « This element has or is affected by some invariantsC »Whether or not the test execution will validate the given capabilities of the server in order for this test script to executevalidated : boolean [1..1] « This element has or is affected by some invariantsC »Description of the capabilities that this test script is requiring the server to supportdescription : string [0..1]Which origin server these requirements apply toorigin : integer [0..*]Which server these requirements apply todestination : integer [0..1]Links to the FHIR specification that describes this interaction and the resources involved in more detaillink : uri [0..*]Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skippedcapabilities : canonical [1..1] « CapabilityStatement »ScopeThe specific conformance artifact being tested. The canonical reference can be version-specificartifact : canonical [1..1] « Any »The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failureconformance : CodeableConcept [0..1] « The expectation of whether the test must pass for the system to be considered conformant with the artifact. (Strength=Extensible) TestScriptScopeConformanceType+ »The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data)phase : CodeableConcept [0..1] « The phase of testing for this artifact. (Strength=Extensible)TestScriptScopePhaseType+ »FixtureWhether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup sectionautocreate : boolean [1..1]Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown sectionautodelete : boolean [1..1]Reference to the resource (containing the contents of the resource needed for operations). This is allowed to be a Parameters resourceresource : Reference [0..1] « Any »VariableDescriptive name for this variablename : string [1..1]A default, hard-coded, or user-defined value for this variabledefaultValue : string [0..1]A free text natural language description of the variable and its purposedescription : string [0..1]The FHIRPath expression for a specific value to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specifiedexpression : string [0..1] « This element has or is affected by some invariantsC »Will be used to grab the HTTP header field value from the headers that sourceId is pointing toheaderField : string [0..1] « This element has or is affected by some invariantsC »Displayable text string with hint help information to the user when entering a default valuehint : string [0..1]XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specifiedpath : string [0..1] « This element has or is affected by some invariantsC »Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variablesourceId : id [0..1]SetupSetupActionCommonCanonical reference providing traceability to the common TestScript instance containing the commonKeytestScript : canonical [0..1] « TestScript »Common key reference that identifies the common collection of actions to perform as defined the this or the common testScriptkeyRef : id [1..1]ParameterThe name of this parameter from the identified common collection of actions from this or an external TestScriptname : string [1..1]The value to assign to this parameter from the identified common collection of actions from this or an external TestScriptvalue : string [1..1]OperationServer interaction or operation typetype : Coding [0..1] « The allowable operation code types. (Strength=Extensible)TestScriptOperationCode+ » « This element has or is affected by some invariantsC »The type of the FHIR resource. See the [resource list](resourcelist.html). Data type of uri is needed when non-HL7 artifacts are identifiedresource : uri [0..1] « null (Strength=Extensible)ConcreteFHIRTypes+ »The label would be used for tracking/logging purposes by test engineslabel : string [0..1]The description would be used by test engines for tracking and reporting purposesdescription : string [0..1]The mime-type to use for RESTful operation in the 'Accept' headeraccept : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required)MimeTypes! »The mime-type to use for RESTful operation in the 'Content-Type' headercontentType : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required)MimeTypes! »The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination sectiondestination : integer [0..1]Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url pathsencodeRequestUrl : boolean [1..1]The HTTP method the test engine MUST use for this operation regardless of any other operation detailsmethod : code [0..1] « null (Strength=Required)TestScriptRequestMethodCode! »The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin sectionorigin : integer [0..1]Path plus parameters after [type]. Used to set parts of the request URL explicitlyparams : string [0..1] « This element has or is affected by some invariantsC »The fixture id (maybe new) to map to the requestrequestId : id [0..1]The fixture id (maybe new) to map to the responseresponseId : id [0..1]The id of the fixture used as the body of a PUT or POST requestsourceId : id [0..1] « This element has or is affected by some invariantsC »Id of fixture used for extracting the [id], [type], and [vid] for GET requeststargetId : id [0..1] « This element has or is affected by some invariantsC »Complete request URLurl : string [0..1] « This element has or is affected by some invariantsC »RequestHeaderThe HTTP header field e.g. "Accept"field : string [1..1]The value of the header e.g. "application/fhir+xml"value : string [1..1]AssertThe label would be used for tracking/logging purposes by test engineslabel : string [0..1]The description would be used by test engines for tracking and reporting purposesdescription : string [0..1]The direction to use for the assertiondirection : code [0..1] « The type of direction to use for assertion. (Strength=Required)AssertionDirectionType! » « This element has or is affected by some invariantsC »Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definitioncompareToSourceId : string [0..1] « This element has or is affected by some invariantsC »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 bothcompareToSourceExpression : string [0..1] « This element has or is affected by some invariantsC »XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not bothcompareToSourcePath : string [0..1] « This element has or is affected by some invariantsC »The mime-type contents to compare against the request or response message 'Content-Type' headercontentType : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required)MimeTypes! » « This element has or is affected by some invariantsC »The default manual completion outcome applied to this assertiondefaultManualCompletion : code [0..1] « The type of operator to use for assertion. (Strength=Required) AssertionManualCompletionType! »The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payloadexpression : string [0..1] « This element has or is affected by some invariantsC »The HTTP header field name e.g. 'Location'headerField : string [0..1] « This element has or is affected by some invariantsC »The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumIdminimumId : string [0..1] « This element has or is affected by some invariantsC »Whether or not the test execution performs validation on the bundle navigation linksnavigationLinks : boolean [0..1] « This element has or is affected by some invariantsC »The operator type defines the conditional behavior of the assertoperator : code [0..1] « The type of operator to use for assertion. (Strength=Required)AssertionOperatorType! »The XPath or JSONPath expression to be evaluated against the fixture representing the response received from serverpath : string [0..1] « This element has or is affected by some invariantsC »The request method or HTTP operation code to compare against that used by the client system under testrequestMethod : code [0..1] « null (Strength=Required)TestScriptRequestMethodCode! » « This element has or is affected by some invariantsC »The value to use in a comparison against the request URL path stringrequestURL : string [0..1]The type of the resource. See the [resource list](resourcelist.html)resource : uri [0..1] « null (Strength=Extensible)ConcreteFHIRTypes+ » « This element has or is affected by some invariantsC »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 | httpVersionNotSupportedresponse : code [0..1] « The type of response code to use for assertion. (Strength=Required)AssertionResponseTypes! » « This element has or is affected by some invariantsC »The value of the HTTP response code to be testedresponseCode : string [0..1] « This element has or is affected by some invariantsC »Fixture to evaluate the XPath/JSONPath expression or the headerField againstsourceId : id [0..1]Whether or not the current test execution will stop on failure for this assertstopTestOnFail : boolean [1..1]The ID of the Profile to validate againstvalidateProfileId : id [0..1] « This element has or is affected by some invariantsC »The value to compare tovalue : string [0..1]Whether or not the test execution will produce a warning only on error for this assertwarningOnly : boolean [1..1]RequirementCanonical reference providing traceability to the testing requirement for this assertreference : canonical [1..1] « Requirements »Requirements.statement.key that identifies the statement that this assert satisfieskey : id [1..1]TestThe name of this test used for tracking/logging purposes by test enginesname : string [0..1]A short description of the test used by test engines for tracking and reporting purposesdescription : string [0..1]TestActionTeardownTeardownActionCommonKey that identifies this common collection of actions (unique within this resource)key : id [1..1]The name of this this common collection of actions used for tracking/logging purposes by test enginesname : string [0..1]A short description of this common collection of actions used by test engines for tracking and reporting purposesdescription : string [0..1]ParameterThe name of this parameter that will referenced in this common collection of actions using the TestScript variable nomenclature '${name}name : string [0..1]An optional short description of this parameter to be used this common collection of actions used by test engines for tracking and reporting purposesdescription : string [0..1]CommonActionAn abstract server used in operations within this test script in the origin elementorigin[0..*]An abstract server used in operations within this test script in the destination elementdestination[0..*]A link to the FHIR specification that this test is coveringlink[0..*]Capabilities that must exist and are assumed to function correctly on the FHIR server being testedcapability[1..*]The required capability must exist and are assumed to function correctly on the FHIR server being testedmetadata[0..1]The scope indicates a conformance artifact that is tested by the test(s) within this test case and the expectation of the test outcome(s) as well as the intended test phase inclusionscope[0..*]Fixture in the test script - by reference (uri). All fixtures are required for the test script to executefixture[0..*]Variable is set based either on element value in response body or on header field value in the response headersvariable[0..*]Optional named parameter(s) to provide input values to the identified common collection of actions from this or an external TestScriptparameter[0..*]Links or references to common collection(s) of actions in this or an external TestScript instancecommon[0..1]Header elements would be used to set HTTP headersrequestHeader[0..*]The operation to performoperation[0..1]Links or references providing traceability to the testing requirements for this assertrequirement[0..*]Evaluates the results of previous operations to determine if the server under test behaves appropriatelyassert[0..1]Action would contain either a common or operation or an assertionaction[0..*]A series of required setup operations before tests are executedsetup[0..1]Links or references to common collection(s) of actions in this or an external TestScript instancecommon[0..1]An operation would involve a REST request to a serveroperation[0..1]Evaluates the results of previous operations to determine if the server under test behaves appropriatelyassert[0..1]Action would contain either an operation or an assertionaction[0..*]A test in this scripttest[0..*]Links or references to common collection(s) of actions in this or an external TestScript instance. Action asserts SHALL be ignored for the TestScript.teardowncommon[0..1]An operation would involve a REST request to a serveroperation[1..1]The teardown action will only contain an operationaction[1..*]A series of operations required to clean up after all the tests are executed (successfully or otherwise)teardown[0..1]Optional named parameter(s) to provide input values to this common collection of actions from this or an external TestScriptparameter[0..*]An operation would involve a REST request to a serveroperation[0..1]Evaluates the results of previous operations to determine if the server under test behaves appropriatelyassert[0..1]An action will contain either an operation or an assertion but not bothaction[1..*]A common collection of actions that can be re-used in a TestScriptcommon[0..*]

XML Template

<TestScript xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 Canonical identifier for this test script, represented as a URI (globally unique) -->
 <identifier><!-- 0..* Identifier Additional identifier for the test script --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the test script -->
 <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 1..1 Name for this test script (computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this test script (human friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher/steward (organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the test script -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for test script (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this test script is defined -->
 <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) -->
 <origin>  <!-- 0..* An abstract server representing a client or sender in a message exchange -->
  <index value="[integer]"/><!-- 1..1 The index of the abstract origin server starting at 1 -->
  <profile><!-- 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller --></profile>
  <url value="[url]"/><!-- 0..1 The url path of the origin server -->
 </origin>
 <destination>  <!-- 0..* An abstract server representing a destination or receiver in a message exchange -->
  <index value="[integer]"/><!-- 1..1 The index of the abstract destination server starting at 1 -->
  <profile><!-- 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor --></profile>
  <url value="[url]"/><!-- 0..1 The url path of the destination server -->
 </destination>
 <metadata>  <!-- 0..1 Required capability that is assumed to function correctly on the FHIR server being tested -->
  <link>  <!-- 0..* Links to the FHIR specification -->
   <url value="[uri]"/><!-- 1..1 URL to the specification -->
   <description value="[string]"/><!-- 0..1 Short description -->
  </link>
  <capability>  <!-- I 1..* Capabilities  that are assumed to function correctly on the FHIR server being tested -->
   <required value="[boolean]"/><!-- I 1..1 Are the capabilities required? -->
   <validated value="[boolean]"/><!-- I 1..1 Are the capabilities validated? -->
   <description value="[string]"/><!-- 0..1 The expected capabilities of the server -->
   <origin value="[integer]"/><!-- 0..* Which origin server these requirements apply to -->
   <destination value="[integer]"/><!-- 0..1 Which server these requirements apply to -->
   <link value="[uri]"/><!-- 0..* Links to the FHIR specification -->
   <capabilities><!-- 1..1 canonical(CapabilityStatement) Required Capability Statement --></capabilities>
  </capability>
 </metadata>
 <scope>  <!-- 0..* Indication of the artifact(s) that are tested by this test case -->
  <artifact><!-- 1..1 canonical(Any) The specific conformance artifact being tested --></artifact>
  <conformance><!-- 0..1 CodeableConcept required | optional | strict --></conformance>
  <phase><!-- 0..1 CodeableConcept unit | integration | production --></phase>
 </scope>
 <fixture>  <!-- 0..* Fixture in the test script - by reference (uri) -->
  <autocreate value="[boolean]"/><!-- 1..1 Whether or not to implicitly create the fixture during setup -->
  <autodelete value="[boolean]"/><!-- 1..1 Whether or not to implicitly delete the fixture during teardown -->
  <resource><!-- 0..1 Reference(Any) Reference of the resource --></resource>
 </fixture>
 <profile><!-- 0..* canonical(StructureDefinition) Reference of the validation profile --></profile>
 <variable>  <!-- 0..* Placeholder for evaluated elements -->
  <name value="[string]"/><!-- 1..1 Descriptive name for this variable -->
  <defaultValue value="[string]"/><!-- 0..1 Default, hard-coded, or user-defined value for this variable -->
  <description value="[string]"/><!-- 0..1 Natural language description of the variable -->
  <expression value="[string]"/><!-- I 0..1 The FHIRPath expression against the fixture body -->
  <headerField value="[string]"/><!-- I 0..1 HTTP header field name for source -->
  <hint value="[string]"/><!-- 0..1 Hint help text for default value to enter -->
  <path value="[string]"/><!-- I 0..1 XPath or JSONPath against the fixture body -->
  <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField within this variable -->
 </variable>
 <setup>  <!-- 0..1 A series of required setup operations before tests are executed -->
  <action>  <!-- 0..* A setup common or operation or assert to perform -->
   <common>  <!-- I 0..1 Links or references to common collection(s) of actions -->
    <testScript><!-- 0..1 canonical(TestScript) Canonical reference to the common TestScript instance --></testScript>
    <keyRef value="[id]"/><!-- 1..1 Common key reference that identifies the common collection of actions to perform -->
    <parameter>  <!-- 0..* Parameter(s) to convey input values to the identified common collection of actions -->
     <name value="[string]"/><!-- 1..1 Name of the parameter from the identified common collection of actions -->
     <value value="[string]"/><!-- 1..1 Value to assign to the parameter from the identified common collection of actions -->
    </parameter>
   </common>
   <operation>  <!-- I 0..1 The setup operation to perform -->
    <type><!-- I 0..1 Coding The operation code type that will be executed --></type>
    <resource value="[uri]"/><!-- 0..1 Resource type -->
    <label value="[string]"/><!-- 0..1 Tracking/logging operation label -->
    <description value="[string]"/><!-- 0..1 Tracking/reporting operation description -->
    <accept value="[code]"/><!-- 0..1 Mime type to accept in the payload of the response, with charset etc -->
    <contentType value="[code]"/><!-- 0..1 Mime type of the request payload contents, with charset etc -->
    <destination value="[integer]"/><!-- 0..1 Server responding to the request -->
    <encodeRequestUrl value="[boolean]"/><!-- 1..1 Whether or not to send the request url in encoded format -->
    <method value="[code]"/><!-- 0..1 delete | get | options | patch | post | put | head -->
    <origin value="[integer]"/><!-- 0..1 Server initiating the request -->
    <params value="[string]"/><!-- I 0..1 Explicitly defined path parameters -->
    <requestHeader>  <!-- 0..* Each operation can have one or more header elements -->
     <field value="[string]"/><!-- 1..1 HTTP header field name -->
     <value value="[string]"/><!-- 1..1 HTTP headerfield value -->
    </requestHeader>
    <requestId value="[id]"/><!-- 0..1 Fixture Id of mapped request -->
    <responseId value="[id]"/><!-- 0..1 Fixture Id of mapped response -->
    <sourceId value="[id]"/><!-- I 0..1 Fixture Id of body for PUT and POST requests -->
    <targetId value="[id]"/><!-- I 0..1 Id of fixture used for extracting the [id],  [type], and [vid] for GET requests -->
    <url value="[string]"/><!-- I 0..1 Request URL -->
   </operation>
   <assert>  <!-- I 0..1 The assertion to perform -->
    <label value="[string]"/><!-- 0..1 Tracking/logging assertion label -->
    <description value="[string]"/><!-- 0..1 Tracking/reporting assertion description -->
    <direction value="[code]"/><!-- I 0..1 response | request -->
    <compareToSourceId value="[string]"/><!-- I 0..1 Id of the source fixture to be evaluated -->
    <compareToSourceExpression value="[string]"/><!-- I 0..1 The FHIRPath expression to evaluate against the source fixture -->
    <compareToSourcePath value="[string]"/><!-- I 0..1 XPath or JSONPath expression to evaluate against the source fixture -->
    <contentType value="[code]"/><!-- I 0..1 Mime type to compare against the 'Content-Type' header -->
    <defaultManualCompletion value="[code]"/><!-- 0..1 fail | pass | skip | stop -->
    <expression value="[string]"/><!-- I 0..1 The FHIRPath expression to be evaluated -->
    <headerField value="[string]"/><!-- I 0..1 HTTP header field name -->
    <minimumId value="[string]"/><!-- I 0..1 Fixture Id of minimum content resource -->
    <navigationLinks value="[boolean]"/><!-- I 0..1 Perform validation on navigation links? -->
    <operator value="[code]"/><!-- 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval -->
    <path value="[string]"/><!-- I 0..1 XPath or JSONPath expression -->
    <requestMethod value="[code]"/><!-- I 0..1 delete | get | options | patch | post | put | head -->
    <requestURL value="[string]"/><!-- 0..1 Request URL comparison value -->
    <resource value="[uri]"/><!-- I 0..1 Resource type -->
    <response value="[code]"/><!-- I 0..1 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 -->
    <responseCode value="[string]"/><!-- I 0..1 HTTP response code to test -->
    <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField -->
    <stopTestOnFail value="[boolean]"/><!-- 1..1 If this assert fails, will the current test execution stop? -->
    <validateProfileId value="[id]"/><!-- I 0..1 Profile Id of validation profile reference -->
    <value value="[string]"/><!-- 0..1 The value to compare to -->
    <warningOnly value="[boolean]"/><!-- 1..1 Will this assert produce a warning only on error? -->
    <requirement>  <!-- 0..* Links or references to the testing requirements -->
     <reference><!-- 1..1 canonical(Requirements) Canonical reference to the Requirements instance --></reference>
     <key value="[id]"/><!-- 1..1 Requirements statement key identifier -->
    </requirement>
   </assert>
  </action>
 </setup>
 <test>  <!-- 0..* A test in this script -->
  <name value="[string]"/><!-- 0..1 Tracking/logging name of this test -->
  <description value="[string]"/><!-- 0..1 Tracking/reporting short description of the test -->
  <action>  <!-- 0..* A test operation or assert to perform -->
   <common><!-- 0..1 Content as for TestScript.setup.action.common Links or references to common collection(s) of actions --></common>
   <operation><!-- 0..1 Content as for TestScript.setup.action.operation The setup operation to perform --></operation>
   <assert><!-- 0..1 Content as for TestScript.setup.action.assert The setup assertion to perform --></assert>
  </action>
 </test>
 <teardown>  <!-- 0..1 A series of required clean up steps -->
  <action>  <!-- 1..* One or more teardown operations to perform -->
   <common><!-- 0..1 Content as for TestScript.setup.action.common Links or references to common collection(s) of actions --></common>
   <operation><!-- 1..1 Content as for TestScript.setup.action.operation The teardown operation to perform --></operation>
  </action>
 </teardown>
 <common>  <!-- 0..* A common collection of actions in this script -->
  <key value="[id]"/><!-- 1..1 Key that identifies this common collection of actions -->
  <name value="[string]"/><!-- 0..1 Tracking/logging name of this common collection of actions -->
  <description value="[string]"/><!-- 0..1 Tracking/reporting short description of this common collection of actions -->
  <parameter>  <!-- 0..* Parameter(s) to convey input values to this common collection of actions in this script -->
   <name value="[string]"/><!-- 0..1 Tracking/logging name of this parameter to be used in this common collection of actions -->
   <description value="[string]"/><!-- 0..1 Tracking/reporting short description of this parameter to be used this common collection of actions -->
  </parameter>
  <action>  <!-- 1..* A common operation or assert that can be re-used in this script -->
   <operation><!-- 0..1 Content as for TestScript.setup.action.operation The common operation that can be re-used in this script --></operation>
   <assert><!-- 0..1 Content as for TestScript.setup.action.assert The common assertion to perform --></assert>
  </action>
 </common>
</TestScript>

JSON Template

{doco
  "resourceType" : "TestScript",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // Canonical identifier for this test script, represented as a URI (globally unique)
  "identifier" : [{ Identifier }], // Additional identifier for the test script
  "version" : "<string>", // Business version of the test script
  // versionAlgorithm[x]: How to compare versions. One of these 2:
  "versionAlgorithmString" : "<string>",
  "versionAlgorithmCoding" : { Coding },
  "name" : "<string>", // I R!  Name for this test script (computer friendly)
  "title" : "<string>", // Name for this test script (human friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher/steward (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the test script
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for test script (if applicable)
  "purpose" : "<markdown>", // Why this test script is defined
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "copyrightLabel" : "<string>", // Copyright holder and year(s)
  "origin" : [{ // An abstract server representing a client or sender in a message exchange
    "index" : <integer>, // R!  The index of the abstract origin server starting at 1
    "profile" : { Coding }, // R!  FHIR-Client | FHIR-SDC-FormFiller
    "url" : "<url>" // The url path of the origin server
  }],
  "destination" : [{ // An abstract server representing a destination or receiver in a message exchange
    "index" : <integer>, // R!  The index of the abstract destination server starting at 1
    "profile" : { Coding }, // R!  FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
    "url" : "<url>" // The url path of the destination server
  }],
  "metadata" : { // Required capability that is assumed to function correctly on the FHIR server being tested
    "link" : [{ // Links to the FHIR specification
      "url" : "<uri>", // R!  URL to the specification
      "description" : "<string>" // Short description
    }],
    "capability" : [{ // I R!  Capabilities  that are assumed to function correctly on the FHIR server being tested
      "required" : <boolean>, // I R!  Are the capabilities required?
      "validated" : <boolean>, // I R!  Are the capabilities validated?
      "description" : "<string>", // The expected capabilities of the server
      "origin" : [<integer>], // Which origin server these requirements apply to
      "destination" : <integer>, // Which server these requirements apply to
      "link" : ["<uri>"], // Links to the FHIR specification
      "capabilities" : "<canonical(CapabilityStatement)>" // R!  Required Capability Statement
    }]
  },
  "scope" : [{ // Indication of the artifact(s) that are tested by this test case
    "artifact" : "<canonical(Any)>", // R!  The specific conformance artifact being tested
    "conformance" : { CodeableConcept }, // required | optional | strict
    "phase" : { CodeableConcept } // unit | integration | production
  }],
  "fixture" : [{ // Fixture in the test script - by reference (uri)
    "autocreate" : <boolean>, // R!  Whether or not to implicitly create the fixture during setup
    "autodelete" : <boolean>, // R!  Whether or not to implicitly delete the fixture during teardown
    "resource" : { Reference(Any) } // Reference of the resource
  }],
  "profile" : ["<canonical(StructureDefinition)>"], // Reference of the validation profile
  "variable" : [{ // Placeholder for evaluated elements
    "name" : "<string>", // R!  Descriptive name for this variable
    "defaultValue" : "<string>", // Default, hard-coded, or user-defined value for this variable
    "description" : "<string>", // Natural language description of the variable
    "expression" : "<string>", // I The FHIRPath expression against the fixture body
    "headerField" : "<string>", // I HTTP header field name for source
    "hint" : "<string>", // Hint help text for default value to enter
    "path" : "<string>", // I XPath or JSONPath against the fixture body
    "sourceId" : "<id>" // Fixture Id of source expression or headerField within this variable
  }],
  "setup" : { // A series of required setup operations before tests are executed
    "action" : [{ // A setup common or operation or assert to perform
      "common" : { // I Links or references to common collection(s) of actions
        "testScript" : "<canonical(TestScript)>", // Canonical reference to the common TestScript instance
        "keyRef" : "<id>", // R!  Common key reference that identifies the common collection of actions to perform
        "parameter" : [{ // Parameter(s) to convey input values to the identified common collection of actions
          "name" : "<string>", // R!  Name of the parameter from the identified common collection of actions
          "value" : "<string>" // R!  Value to assign to the parameter from the identified common collection of actions
        }]
      },
      "operation" : { // I The setup operation to perform
        "type" : { Coding }, // I The operation code type that will be executed
        "resource" : "<uri>", // Resource type
        "label" : "<string>", // Tracking/logging operation label
        "description" : "<string>", // Tracking/reporting operation description
        "accept" : "<code>", // Mime type to accept in the payload of the response, with charset etc
        "contentType" : "<code>", // Mime type of the request payload contents, with charset etc
        "destination" : <integer>, // Server responding to the request
        "encodeRequestUrl" : <boolean>, // R!  Whether or not to send the request url in encoded format
        "method" : "<code>", // delete | get | options | patch | post | put | head
        "origin" : <integer>, // Server initiating the request
        "params" : "<string>", // I Explicitly defined path parameters
        "requestHeader" : [{ // Each operation can have one or more header elements
          "field" : "<string>", // R!  HTTP header field name
          "value" : "<string>" // R!  HTTP headerfield value
        }],
        "requestId" : "<id>", // Fixture Id of mapped request
        "responseId" : "<id>", // Fixture Id of mapped response
        "sourceId" : "<id>", // I Fixture Id of body for PUT and POST requests
        "targetId" : "<id>", // I Id of fixture used for extracting the [id],  [type], and [vid] for GET requests
        "url" : "<string>" // I Request URL
      },
      "assert" : { // I The assertion to perform
        "label" : "<string>", // Tracking/logging assertion label
        "description" : "<string>", // Tracking/reporting assertion description
        "direction" : "<code>", // I response | request
        "compareToSourceId" : "<string>", // I Id of the source fixture to be evaluated
        "compareToSourceExpression" : "<string>", // I The FHIRPath expression to evaluate against the source fixture
        "compareToSourcePath" : "<string>", // I XPath or JSONPath expression to evaluate against the source fixture
        "contentType" : "<code>", // I Mime type to compare against the 'Content-Type' header
        "defaultManualCompletion" : "<code>", // fail | pass | skip | stop
        "expression" : "<string>", // I The FHIRPath expression to be evaluated
        "headerField" : "<string>", // I HTTP header field name
        "minimumId" : "<string>", // I Fixture Id of minimum content resource
        "navigationLinks" : <boolean>, // I Perform validation on navigation links?
        "operator" : "<code>", // equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
        "path" : "<string>", // I XPath or JSONPath expression
        "requestMethod" : "<code>", // I delete | get | options | patch | post | put | head
        "requestURL" : "<string>", // Request URL comparison value
        "resource" : "<uri>", // I Resource type
        "response" : "<code>", // I 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
        "responseCode" : "<string>", // I HTTP response code to test
        "sourceId" : "<id>", // Fixture Id of source expression or headerField
        "stopTestOnFail" : <boolean>, // R!  If this assert fails, will the current test execution stop?
        "validateProfileId" : "<id>", // I Profile Id of validation profile reference
        "value" : "<string>", // The value to compare to
        "warningOnly" : <boolean>, // R!  Will this assert produce a warning only on error?
        "requirement" : [{ // Links or references to the testing requirements
          "reference" : "<canonical(Requirements)>", // R!  Canonical reference to the Requirements instance
          "key" : "<id>" // R!  Requirements statement key identifier
        }]
      }
    }]
  },
  "test" : [{ // A test in this script
    "name" : "<string>", // Tracking/logging name of this test
    "description" : "<string>", // Tracking/reporting short description of the test
    "action" : [{ // A test operation or assert to perform
      "common" : { Content as for TestScript.setup.action.common }, // Links or references to common collection(s) of actions
      "operation" : { Content as for TestScript.setup.action.operation }, // The setup operation to perform
      "assert" : { Content as for TestScript.setup.action.assert } // The setup assertion to perform
    }]
  }],
  "teardown" : { // A series of required clean up steps
    "action" : [{ // R!  One or more teardown operations to perform
      "common" : { Content as for TestScript.setup.action.common }, // Links or references to common collection(s) of actions
      "operation" : { Content as for TestScript.setup.action.operation } // R!  The teardown operation to perform
    }]
  },
  "common" : [{ // A common collection of actions in this script
    "key" : "<id>", // R!  Key that identifies this common collection of actions
    "name" : "<string>", // Tracking/logging name of this common collection of actions
    "description" : "<string>", // Tracking/reporting short description of this common collection of actions
    "parameter" : [{ // Parameter(s) to convey input values to this common collection of actions in this script
      "name" : "<string>", // Tracking/logging name of this parameter to be used in this common collection of actions
      "description" : "<string>" // Tracking/reporting short description of this parameter to be used this common collection of actions
    }],
    "action" : [{ // R!  A common operation or assert that can be re-used in this script
      "operation" : { Content as for TestScript.setup.action.operation }, // The common operation that can be re-used in this script
      "assert" : { Content as for TestScript.setup.action.assert } // The common assertion to perform
    }]
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:TestScript;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:url [ uri ] ; # 0..1 Canonical identifier for this test script, represented as a URI (globally unique)
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Additional identifier for the test script
  fhir:version [ string ] ; # 0..1 Business version of the test script
  # versionAlgorithm[x] : 0..1 How to compare versions. One of these 2
    fhir:versionAlgorithm [  a fhir:string ; string ]
    fhir:versionAlgorithm [  a fhir:Coding ; Coding ]
  fhir:name [ string ] ; # 1..1 I Name for this test script (computer friendly)
  fhir:title [ string ] ; # 0..1 Name for this test script (human friendly)
  fhir:status [ code ] ; # 1..1 draft | active | retired | unknown
  fhir:experimental [ boolean ] ; # 0..1 For testing purposes, not real usage
  fhir:date [ dateTime ] ; # 0..1 Date last changed
  fhir:publisher [ string ] ; # 0..1 Name of the publisher/steward (organization or individual)
  fhir:contact  ( [ ContactDetail ] ... ) ; # 0..* Contact details for the publisher
  fhir:description [ markdown ] ; # 0..1 Natural language description of the test script
  fhir:useContext  ( [ UsageContext ] ... ) ; # 0..* The context that the content is intended to support
  fhir:jurisdiction  ( [ CodeableConcept ] ... ) ; # 0..* Intended jurisdiction for test script (if applicable)
  fhir:purpose [ markdown ] ; # 0..1 Why this test script is defined
  fhir:copyright [ markdown ] ; # 0..1 Use and/or publishing restrictions
  fhir:copyrightLabel [ string ] ; # 0..1 Copyright holder and year(s)
  fhir:origin ( [ # 0..* An abstract server representing a client or sender in a message exchange
    fhir:index [ integer ] ; # 1..1 The index of the abstract origin server starting at 1
    fhir:profile [ Coding ] ; # 1..1 FHIR-Client | FHIR-SDC-FormFiller
    fhir:url [ url ] ; # 0..1 The url path of the origin server
  ] ... ) ;
  fhir:destination ( [ # 0..* An abstract server representing a destination or receiver in a message exchange
    fhir:index [ integer ] ; # 1..1 The index of the abstract destination server starting at 1
    fhir:profile [ Coding ] ; # 1..1 FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
    fhir:url [ url ] ; # 0..1 The url path of the destination server
  ] ... ) ;
  fhir:metadata [ # 0..1 Required capability that is assumed to function correctly on the FHIR server being tested
    fhir:link ( [ # 0..* Links to the FHIR specification
      fhir:url [ uri ] ; # 1..1 URL to the specification
      fhir:description [ string ] ; # 0..1 Short description
    ] ... ) ;
    fhir:capability ( [ # 1..* I Capabilities  that are assumed to function correctly on the FHIR server being tested
      fhir:required [ boolean ] ; # 1..1 I Are the capabilities required?
      fhir:validated [ boolean ] ; # 1..1 I Are the capabilities validated?
      fhir:description [ string ] ; # 0..1 The expected capabilities of the server
      fhir:origin  ( [ integer ] ... ) ; # 0..* Which origin server these requirements apply to
      fhir:destination [ integer ] ; # 0..1 Which server these requirements apply to
      fhir:link  ( [ uri ] ... ) ; # 0..* Links to the FHIR specification
      fhir:capabilities [ canonical(CapabilityStatement) ] ; # 1..1 Required Capability Statement
    ] ... ) ;
  ] ;
  fhir:scope ( [ # 0..* Indication of the artifact(s) that are tested by this test case
    fhir:artifact [ canonical(Any) ] ; # 1..1 The specific conformance artifact being tested
    fhir:conformance [ CodeableConcept ] ; # 0..1 required | optional | strict
    fhir:phase [ CodeableConcept ] ; # 0..1 unit | integration | production
  ] ... ) ;
  fhir:fixture ( [ # 0..* Fixture in the test script - by reference (uri)
    fhir:autocreate [ boolean ] ; # 1..1 Whether or not to implicitly create the fixture during setup
    fhir:autodelete [ boolean ] ; # 1..1 Whether or not to implicitly delete the fixture during teardown
    fhir:resource [ Reference(Any) ] ; # 0..1 Reference of the resource
  ] ... ) ;
  fhir:profile  ( [ canonical(StructureDefinition) ] ... ) ; # 0..* Reference of the validation profile
  fhir:variable ( [ # 0..* Placeholder for evaluated elements
    fhir:name [ string ] ; # 1..1 Descriptive name for this variable
    fhir:defaultValue [ string ] ; # 0..1 Default, hard-coded, or user-defined value for this variable
    fhir:description [ string ] ; # 0..1 Natural language description of the variable
    fhir:expression [ string ] ; # 0..1 I The FHIRPath expression against the fixture body
    fhir:headerField [ string ] ; # 0..1 I HTTP header field name for source
    fhir:hint [ string ] ; # 0..1 Hint help text for default value to enter
    fhir:path [ string ] ; # 0..1 I XPath or JSONPath against the fixture body
    fhir:sourceId [ id ] ; # 0..1 Fixture Id of source expression or headerField within this variable
  ] ... ) ;
  fhir:setup [ # 0..1 A series of required setup operations before tests are executed
    fhir:action ( [ # 0..* A setup common or operation or assert to perform
      fhir:common [ # 0..1 I Links or references to common collection(s) of actions
        fhir:testScript [ canonical(TestScript) ] ; # 0..1 Canonical reference to the common TestScript instance
        fhir:keyRef [ id ] ; # 1..1 Common key reference that identifies the common collection of actions to perform
        fhir:parameter ( [ # 0..* Parameter(s) to convey input values to the identified common collection of actions
          fhir:name [ string ] ; # 1..1 Name of the parameter from the identified common collection of actions
          fhir:value [ string ] ; # 1..1 Value to assign to the parameter from the identified common collection of actions
        ] ... ) ;
      ] ;
      fhir:operation [ # 0..1 I The setup operation to perform
        fhir:type [ Coding ] ; # 0..1 I The operation code type that will be executed
        fhir:resource [ uri ] ; # 0..1 Resource type
        fhir:label [ string ] ; # 0..1 Tracking/logging operation label
        fhir:description [ string ] ; # 0..1 Tracking/reporting operation description
        fhir:accept [ code ] ; # 0..1 Mime type to accept in the payload of the response, with charset etc
        fhir:contentType [ code ] ; # 0..1 Mime type of the request payload contents, with charset etc
        fhir:destination [ integer ] ; # 0..1 Server responding to the request
        fhir:encodeRequestUrl [ boolean ] ; # 1..1 Whether or not to send the request url in encoded format
        fhir:method [ code ] ; # 0..1 delete | get | options | patch | post | put | head
        fhir:origin [ integer ] ; # 0..1 Server initiating the request
        fhir:params [ string ] ; # 0..1 I Explicitly defined path parameters
        fhir:requestHeader ( [ # 0..* Each operation can have one or more header elements
          fhir:field [ string ] ; # 1..1 HTTP header field name
          fhir:value [ string ] ; # 1..1 HTTP headerfield value
        ] ... ) ;
        fhir:requestId [ id ] ; # 0..1 Fixture Id of mapped request
        fhir:responseId [ id ] ; # 0..1 Fixture Id of mapped response
        fhir:sourceId [ id ] ; # 0..1 I Fixture Id of body for PUT and POST requests
        fhir:targetId [ id ] ; # 0..1 I Id of fixture used for extracting the [id],  [type], and [vid] for GET requests
        fhir:url [ string ] ; # 0..1 I Request URL
      ] ;
      fhir:assert [ # 0..1 I The assertion to perform
        fhir:label [ string ] ; # 0..1 Tracking/logging assertion label
        fhir:description [ string ] ; # 0..1 Tracking/reporting assertion description
        fhir:direction [ code ] ; # 0..1 I response | request
        fhir:compareToSourceId [ string ] ; # 0..1 I Id of the source fixture to be evaluated
        fhir:compareToSourceExpression [ string ] ; # 0..1 I The FHIRPath expression to evaluate against the source fixture
        fhir:compareToSourcePath [ string ] ; # 0..1 I XPath or JSONPath expression to evaluate against the source fixture
        fhir:contentType [ code ] ; # 0..1 I Mime type to compare against the 'Content-Type' header
        fhir:defaultManualCompletion [ code ] ; # 0..1 fail | pass | skip | stop
        fhir:expression [ string ] ; # 0..1 I The FHIRPath expression to be evaluated
        fhir:headerField [ string ] ; # 0..1 I HTTP header field name
        fhir:minimumId [ string ] ; # 0..1 I Fixture Id of minimum content resource
        fhir:navigationLinks [ boolean ] ; # 0..1 I Perform validation on navigation links?
        fhir:operator [ code ] ; # 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
        fhir:path [ string ] ; # 0..1 I XPath or JSONPath expression
        fhir:requestMethod [ code ] ; # 0..1 I delete | get | options | patch | post | put | head
        fhir:requestURL [ string ] ; # 0..1 Request URL comparison value
        fhir:resource [ uri ] ; # 0..1 I Resource type
        fhir:response [ code ] ; # 0..1 I 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
        fhir:responseCode [ string ] ; # 0..1 I HTTP response code to test
        fhir:sourceId [ id ] ; # 0..1 Fixture Id of source expression or headerField
        fhir:stopTestOnFail [ boolean ] ; # 1..1 If this assert fails, will the current test execution stop?
        fhir:validateProfileId [ id ] ; # 0..1 I Profile Id of validation profile reference
        fhir:value [ string ] ; # 0..1 The value to compare to
        fhir:warningOnly [ boolean ] ; # 1..1 Will this assert produce a warning only on error?
        fhir:requirement ( [ # 0..* Links or references to the testing requirements
          fhir:reference [ canonical(Requirements) ] ; # 1..1 Canonical reference to the Requirements instance
          fhir:key [ id ] ; # 1..1 Requirements statement key identifier
        ] ... ) ;
      ] ;
    ] ... ) ;
  ] ;
  fhir:test ( [ # 0..* A test in this script
    fhir:name [ string ] ; # 0..1 Tracking/logging name of this test
    fhir:description [ string ] ; # 0..1 Tracking/reporting short description of the test
    fhir:action ( [ # 0..* A test operation or assert to perform
      fhir:common [ See TestScript.setup.action.common ] ; # 0..1 Links or references to common collection(s) of actions
      fhir:operation [ See TestScript.setup.action.operation ] ; # 0..1 The setup operation to perform
      fhir:assert [ See TestScript.setup.action.assert ] ; # 0..1 The setup assertion to perform
    ] ... ) ;
  ] ... ) ;
  fhir:teardown [ # 0..1 A series of required clean up steps
    fhir:action ( [ # 1..* One or more teardown operations to perform
      fhir:common [ See TestScript.setup.action.common ] ; # 0..1 Links or references to common collection(s) of actions
      fhir:operation [ See TestScript.setup.action.operation ] ; # 1..1 The teardown operation to perform
    ] ... ) ;
  ] ;
  fhir:common ( [ # 0..* A common collection of actions in this script
    fhir:key [ id ] ; # 1..1 Key that identifies this common collection of actions
    fhir:name [ string ] ; # 0..1 Tracking/logging name of this common collection of actions
    fhir:description [ string ] ; # 0..1 Tracking/reporting short description of this common collection of actions
    fhir:parameter ( [ # 0..* Parameter(s) to convey input values to this common collection of actions in this script
      fhir:name [ string ] ; # 0..1 Tracking/logging name of this parameter to be used in this common collection of actions
      fhir:description [ string ] ; # 0..1 Tracking/reporting short description of this parameter to be used this common collection of actions
    ] ... ) ;
    fhir:action ( [ # 1..* A common operation or assert that can be re-used in this script
      fhir:operation [ See TestScript.setup.action.operation ] ; # 0..1 The common operation that can be re-used in this script
      fhir:assert [ See TestScript.setup.action.assert ] ; # 0..1 The common assertion to perform
    ] ... ) ;
  ] ... ) ;
]

Changes from both R4 and R4B

TestScript
TestScript.url
  • Min Cardinality changed from 1 to 0
TestScript.identifier
  • Max Cardinality changed from 1 to *
TestScript.versionAlgorithm[x]
  • Added Element
TestScript.copyrightLabel
  • Added Element
TestScript.origin.url
  • Added Element
TestScript.destination.url
  • Added Element
TestScript.scope
  • Added Element
TestScript.scope.artifact
  • Added Mandatory Element
TestScript.scope.conformance
  • Added Element
TestScript.scope.phase
  • Added Element
TestScript.profile
  • Type changed from Reference(Resource) to canonical(StructureDefinition)
TestScript.setup.action
  • Min Cardinality changed from 1 to 0
TestScript.setup.action.common
  • Added Element
TestScript.setup.action.common.testScript
  • Added Element
TestScript.setup.action.common.keyRef
  • Added Mandatory Element
TestScript.setup.action.common.parameter
  • Added Element
TestScript.setup.action.common.parameter.name
  • Added Mandatory Element
TestScript.setup.action.common.parameter.value
  • Added Mandatory Element
TestScript.setup.action.operation.type
  • Change code system for extensibly bound codes from "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" to "http://hl7.org/fhir/restful-interaction"
TestScript.setup.action.operation.resource
  • Type changed from code to uri
  • Change binding strength from required to extensible
  • Change value set from http://hl7.org/fhir/ValueSet/defined-types|4.0.0 to Concrete FHIR Types
TestScript.setup.action.assert.defaultManualCompletion
  • Added Element
TestScript.setup.action.assert.operator
  • Add code manualEval
TestScript.setup.action.assert.resource
  • Type changed from code to uri
  • Change binding strength from required to extensible
  • Change value set from http://hl7.org/fhir/ValueSet/defined-types|4.0.0 to Concrete FHIR Types
TestScript.setup.action.assert.response
  • Remove codes bad, unprocessable
  • Add codes continue, switchingProtocols, accepted, nonAuthoritativeInformation, resetContent, partialContent, multipleChoices, movedPermanently, found, seeOther, useProxy, temporaryRedirect, permanentRedirect, badRequest, unauthorized, paymentRequired, notAcceptable, proxyAuthenticationRequired, requestTimeout, lengthRequired, contentTooLarge, uriTooLong, unsupportedMediaType, rangeNotSatisfiable, expectationFailed, misdirectedRequest, unprocessableContent, upgradeRequired, internalServerError, notImplemented, badGateway, serviceUnavailable, gatewayTimeout, httpVersionNotSupported
TestScript.setup.action.assert.stopTestOnFail
  • Added Mandatory Element
TestScript.setup.action.assert.requirement
  • Added Element
TestScript.setup.action.assert.requirement.reference
  • Added Mandatory Element
TestScript.setup.action.assert.requirement.key
  • Added Mandatory Element
TestScript.test.action
  • Min Cardinality changed from 1 to 0
TestScript.test.action.common
  • Added Element
TestScript.teardown.action.common
  • Added Element
TestScript.common
  • Added Element
TestScript.common.key
  • Added Mandatory Element
TestScript.common.name
  • Added Element
TestScript.common.description
  • Added Element
TestScript.common.parameter
  • Added Element
TestScript.common.parameter.name
  • Added Element
TestScript.common.parameter.description
  • Added Element
TestScript.common.action
  • Added Mandatory Element
TestScript.common.action.operation
  • Added Element
TestScript.common.action.assert
  • Added Element

See the Full Difference for further information

This analysis is available for R4 as XML or JSON and for R4B as XML or JSON.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript TU DomainResource Describes a set of tests
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation

Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource
... url ΣC 0..1 uri Canonical identifier for this test script, represented as a URI (globally unique)
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
... identifier Σ 0..* Identifier Additional identifier for the test script

... version Σ 0..1 string Business version of the test script
... versionAlgorithm[x] Σ 0..1 How to compare versions
Binding: Version Algorithm (Extensible)
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 1..1 string Name for this test script (computer friendly)
... title ΣT 0..1 string Name for this test script (human friendly)
... status ?!Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (Required)
... experimental Σ 0..1 boolean For testing purposes, not real usage
... date Σ 0..1 dateTime Date last changed
... publisher ΣT 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher

... description T 0..1 markdown Natural language description of the test script
... useContext Σ 0..* UsageContext The context that the content is intended to support

... jurisdiction ΣXD 0..* CodeableConcept Intended jurisdiction for test script (if applicable)
Binding: Jurisdiction ValueSet (Extensible)

... purpose T 0..1 markdown Why this test script is defined
... copyright T 0..1 markdown Use and/or publishing restrictions
... copyrightLabel T 0..1 string Copyright holder and year(s)
... origin 0..* BackboneElement An abstract server representing a client or sender in a message exchange

.... index 1..1 integer The index of the abstract origin server starting at 1
.... profile 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller
Binding: Test Script Profile Origin Type (Extensible)
.... url 0..1 url The url path of the origin server
... destination 0..* BackboneElement An abstract server representing a destination or receiver in a message exchange

.... index 1..1 integer The index of the abstract destination server starting at 1
.... profile 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
Binding: Test Script Profile Destination Type (Extensible)
.... url 0..1 url The url path of the destination server
... metadata C 0..1 BackboneElement Required capability that is assumed to function correctly on the FHIR server being tested
+ Rule: TestScript metadata capability SHALL contain required or validated or both.
.... link 0..* BackboneElement Links to the FHIR specification

..... url 1..1 uri URL to the specification
..... description 0..1 string Short description
.... capability C 1..* BackboneElement Capabilities that are assumed to function correctly on the FHIR server being tested

..... required C 1..1 boolean Are the capabilities required?
..... validated C 1..1 boolean Are the capabilities validated?
..... description 0..1 string The expected capabilities of the server
..... origin 0..* integer Which origin server these requirements apply to

..... destination 0..1 integer Which server these requirements apply to
..... link 0..* uri Links to the FHIR specification

..... capabilities 1..1 canonical(CapabilityStatement) Required Capability Statement
... scope 0..* BackboneElement Indication of the artifact(s) that are tested by this test case

.... artifact 1..1 canonical(Any) The specific conformance artifact being tested
.... conformance 0..1 CodeableConcept required | optional | strict
Binding: Test Script Scope Conformance Type (Extensible)
.... phase 0..1 CodeableConcept unit | integration | production
Binding: Test Script Scope Phase Type (Extensible)
... fixture 0..* BackboneElement Fixture in the test script - by reference (uri)

.... autocreate 1..1 boolean Whether or not to implicitly create the fixture during setup
.... autodelete 1..1 boolean Whether or not to implicitly delete the fixture during teardown
.... resource 0..1 Reference(Any) Reference of the resource
... profile 0..* canonical(StructureDefinition) Reference of the validation profile

... variable C 0..* BackboneElement Placeholder for evaluated elements
+ Rule: Variable can only contain one of expression, headerField or path.

.... name 1..1 string Descriptive name for this variable
.... defaultValue 0..1 string Default, hard-coded, or user-defined value for this variable
.... description 0..1 string Natural language description of the variable
.... expression C 0..1 string The FHIRPath expression against the fixture body
.... headerField C 0..1 string HTTP header field name for source
.... hint 0..1 string Hint help text for default value to enter
.... path C 0..1 string XPath or JSONPath against the fixture body
.... sourceId 0..1 id Fixture Id of source expression or headerField within this variable
... setup 0..1 BackboneElement A series of required setup operations before tests are executed
.... action C 0..* BackboneElement A setup common or operation or assert to perform
+ Rule: Setup action SHALL contain only one of either a common or an operation or an assert.

..... common C 0..1 BackboneElement Links or references to common collection(s) of actions
...... testScript 0..1 canonical(TestScript) Canonical reference to the common TestScript instance
...... keyRef 1..1 id Common key reference that identifies the common collection of actions to perform
...... parameter 0..* BackboneElement Parameter(s) to convey input values to the identified common collection of actions

....... name 1..1 string Name of the parameter from the identified common collection of actions
....... value 1..1 string Value to assign to the parameter from the identified common collection of actions
..... operation C 0..1 BackboneElement The setup operation to perform
+ Rule: Setup operation SHALL contain either sourceId or targetId or params or url.
...... type C 0..1 Coding The operation code type that will be executed
Binding: Test Script Operation Code (Extensible)
...... resource 0..1 uri Resource type
Binding: Concrete FHIR Types (Extensible)
...... label 0..1 string Tracking/logging operation label
...... description 0..1 string Tracking/reporting operation description
...... accept 0..1 code Mime type to accept in the payload of the response, with charset etc
Binding: Mime Types (Required)
...... contentType 0..1 code Mime type of the request payload contents, with charset etc
Binding: Mime Types (Required)
...... destination 0..1 integer Server responding to the request
...... encodeRequestUrl 1..1 boolean Whether or not to send the request url in encoded format
...... method 0..1 code delete | get | options | patch | post | put | head
Binding: Test Script Request Method Code (Required)
...... origin 0..1 integer Server initiating the request
...... params C 0..1 string Explicitly defined path parameters
...... requestHeader 0..* BackboneElement Each operation can have one or more header elements

....... field 1..1 string HTTP header field name
....... value 1..1 string HTTP headerfield value
...... requestId 0..1 id Fixture Id of mapped request
...... responseId 0..1 id Fixture Id of mapped response
...... sourceId C 0..1 id Fixture Id of body for PUT and POST requests
...... targetId C 0..1 id Id of fixture used for extracting the [id], [type], and [vid] for GET requests
...... url C 0..1 string Request URL
..... assert C 0..1 BackboneElement The assertion to perform
+ Rule: Only a single assertion SHALL be present within setup action assert element.
+ Rule: Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Rule: Setup action assert response and responseCode SHALL be empty when direction equals request
...... label 0..1 string Tracking/logging assertion label
...... description 0..1 string Tracking/reporting assertion description
...... direction C 0..1 code response | request
Binding: Assertion Direction Type (Required)
...... compareToSourceId C 0..1 string Id of the source fixture to be evaluated
...... compareToSourceExpression C 0..1 string The FHIRPath expression to evaluate against the source fixture
...... compareToSourcePath C 0..1 string XPath or JSONPath expression to evaluate against the source fixture
...... contentType C 0..1 code Mime type to compare against the 'Content-Type' header
Binding: Mime Types (Required)
...... defaultManualCompletion 0..1 code fail | pass | skip | stop
Binding: Assertion Manual Completion Type (Required)
...... expression C 0..1 string The FHIRPath expression to be evaluated
...... headerField C 0..1 string HTTP header field name
...... minimumId C 0..1 string Fixture Id of minimum content resource
...... navigationLinks C 0..1 boolean Perform validation on navigation links?
...... operator 0..1 code equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
Binding: Assertion Operator Type (Required)
...... path C 0..1 string XPath or JSONPath expression
...... requestMethod C 0..1 code delete | get | options | patch | post | put | head
Binding: Test Script Request Method Code (Required)
...... requestURL 0..1 string Request URL comparison value
...... resource C 0..1 uri Resource type
Binding: Concrete FHIR Types (Extensible)
...... response C 0..1 code 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
Binding: Assertion Response Types (Required)
...... responseCode C 0..1 string HTTP response code to test
...... sourceId 0..1 id Fixture Id of source expression or headerField
...... stopTestOnFail 1..1 boolean If this assert fails, will the current test execution stop?
...... validateProfileId C 0..1 id Profile Id of validation profile reference
...... value 0..1 string The value to compare to
...... warningOnly 1..1 boolean Will this assert produce a warning only on error?
...... requirement 0..* BackboneElement Links or references to the testing requirements

....... reference 1..1 canonical(Requirements) Canonical reference to the Requirements instance
....... key 1..1 id Requirements statement key identifier
... test 0..* BackboneElement A test in this script

.... name 0..1 string Tracking/logging name of this test
.... description 0..1 string Tracking/reporting short description of the test
.... action C 0..* BackboneElement A test operation or assert to perform
+ Rule: Test action SHALL contain only one of either a common or an operation or an assert.

..... common 0..1 see common Links or references to common collection(s) of actions
..... operation C 0..1 see operation The setup operation to perform
+ Rule: Test operation SHALL contain either sourceId or targetId or params or url.
..... assert C 0..1 see assert The setup assertion to perform
+ Rule: Only a single assertion SHALL be present within test action assert element.
+ Rule: Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Rule: Test action assert response and response and responseCode SHALL be empty when direction equals request
... teardown 0..1 BackboneElement A series of required clean up steps
.... action 1..* BackboneElement One or more teardown operations to perform

..... common 0..1 see common Links or references to common collection(s) of actions
..... operation C 1..1 see operation The teardown operation to perform
+ Rule: Teardown operation SHALL contain either sourceId or targetId or params or url.
... common 0..* BackboneElement A common collection of actions in this script

.... key 1..1 id Key that identifies this common collection of actions
.... name 0..1 string Tracking/logging name of this common collection of actions
.... description 0..1 string Tracking/reporting short description of this common collection of actions
.... parameter 0..* BackboneElement Parameter(s) to convey input values to this common collection of actions in this script

..... name 0..1 string Tracking/logging name of this parameter to be used in this common collection of actions
..... description 0..1 string Tracking/reporting short description of this parameter to be used this common collection of actions
.... action C 1..* BackboneElement A common operation or assert that can be re-used in this script
+ Rule: Common action SHALL contain either an operation or assert but not both.

..... operation C 0..1 see operation The common operation that can be re-used in this script
+ Rule: Common operation SHALL contain either sourceId or targetId or params or url.
..... assert C 0..1 see assert The common assertion to perform
+ Rule: Common action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
+ Rule: Common action assert response and response and responseCode SHALL be empty when direction equals request
+ Rule: Only a single assertion SHALL be present within common action assert element.

doco Documentation for this format icon

See the Extensions for this resource

UML Diagram (Legend)

TestScript (DomainResource) +CanonicalResourceAn absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different serversurl : uri [0..1]A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instanceidentifier : Identifier [0..*]The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequenceversion : string [0..1]Indicates the mechanism used to compare versions to determine which is more currentversionAlgorithm[x] : DataType [0..1] « string|Coding; null (Strength=Extensible) VersionAlgorithm+ »A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generationname : string [1..1] « This element has or is affected by some invariantsC »A short, descriptive, user-friendly title for the test scripttitle : string [0..1]The status of this test script. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements)status : code [1..1] « null (Strength=Required)PublicationStatus! »A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the test script was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changesdate : dateTime [0..1]The name of the organization or individual responsible for the release and ongoing maintenance of the test scriptpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the test script from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instancesuseContext : UsageContext [0..*]A legal or geographic region in which the test script is intended to be usedjurisdiction : CodeableConcept [0..*] « null (Strength=Extensible)JurisdictionValueSet+ »Explanation of why this test script is needed and why it has been designed as it haspurpose : markdown [0..1]A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test scriptcopyright : markdown [0..1]A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')copyrightLabel : string [0..1]Reference to the profile to be used for validationprofile : canonical [0..*] « StructureDefinition »OriginAbstract name given to an origin server in this test script. The name is provided as a number starting at 1index : integer [1..1]The type of origin profile the test system supportsprofile : Coding [1..1] « null (Strength=Extensible)TestScriptProfileOriginType+ »The explicit url path of the origin server used in this test scripturl : url [0..1]DestinationAbstract name given to a destination server in this test script. The name is provided as a number starting at 1index : integer [1..1]The type of destination profile the test system supportsprofile : Coding [1..1] « null (Strength=Extensible)TestScriptProfileDestinationT...+ »The explicit url path of the destination server used in this test scripturl : url [0..1]MetadataLinkURL to a particular requirement or feature within the FHIR specificationurl : uri [1..1]Short description of the linkdescription : string [0..1]CapabilityWhether or not the test execution will require the given capabilities of the server in order for this test script to executerequired : boolean [1..1] « This element has or is affected by some invariantsC »Whether or not the test execution will validate the given capabilities of the server in order for this test script to executevalidated : boolean [1..1] « This element has or is affected by some invariantsC »Description of the capabilities that this test script is requiring the server to supportdescription : string [0..1]Which origin server these requirements apply toorigin : integer [0..*]Which server these requirements apply todestination : integer [0..1]Links to the FHIR specification that describes this interaction and the resources involved in more detaillink : uri [0..*]Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skippedcapabilities : canonical [1..1] « CapabilityStatement »ScopeThe specific conformance artifact being tested. The canonical reference can be version-specificartifact : canonical [1..1] « Any »The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failureconformance : CodeableConcept [0..1] « The expectation of whether the test must pass for the system to be considered conformant with the artifact. (Strength=Extensible) TestScriptScopeConformanceType+ »The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data)phase : CodeableConcept [0..1] « The phase of testing for this artifact. (Strength=Extensible)TestScriptScopePhaseType+ »FixtureWhether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup sectionautocreate : boolean [1..1]Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown sectionautodelete : boolean [1..1]Reference to the resource (containing the contents of the resource needed for operations). This is allowed to be a Parameters resourceresource : Reference [0..1] « Any »VariableDescriptive name for this variablename : string [1..1]A default, hard-coded, or user-defined value for this variabledefaultValue : string [0..1]A free text natural language description of the variable and its purposedescription : string [0..1]The FHIRPath expression for a specific value to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specifiedexpression : string [0..1] « This element has or is affected by some invariantsC »Will be used to grab the HTTP header field value from the headers that sourceId is pointing toheaderField : string [0..1] « This element has or is affected by some invariantsC »Displayable text string with hint help information to the user when entering a default valuehint : string [0..1]XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specifiedpath : string [0..1] « This element has or is affected by some invariantsC »Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variablesourceId : id [0..1]SetupSetupActionCommonCanonical reference providing traceability to the common TestScript instance containing the commonKeytestScript : canonical [0..1] « TestScript »Common key reference that identifies the common collection of actions to perform as defined the this or the common testScriptkeyRef : id [1..1]ParameterThe name of this parameter from the identified common collection of actions from this or an external TestScriptname : string [1..1]The value to assign to this parameter from the identified common collection of actions from this or an external TestScriptvalue : string [1..1]OperationServer interaction or operation typetype : Coding [0..1] « The allowable operation code types. (Strength=Extensible)TestScriptOperationCode+ » « This element has or is affected by some invariantsC »The type of the FHIR resource. See the [resource list](resourcelist.html). Data type of uri is needed when non-HL7 artifacts are identifiedresource : uri [0..1] « null (Strength=Extensible)ConcreteFHIRTypes+ »The label would be used for tracking/logging purposes by test engineslabel : string [0..1]The description would be used by test engines for tracking and reporting purposesdescription : string [0..1]The mime-type to use for RESTful operation in the 'Accept' headeraccept : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required)MimeTypes! »The mime-type to use for RESTful operation in the 'Content-Type' headercontentType : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required)MimeTypes! »The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination sectiondestination : integer [0..1]Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url pathsencodeRequestUrl : boolean [1..1]The HTTP method the test engine MUST use for this operation regardless of any other operation detailsmethod : code [0..1] « null (Strength=Required)TestScriptRequestMethodCode! »The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin sectionorigin : integer [0..1]Path plus parameters after [type]. Used to set parts of the request URL explicitlyparams : string [0..1] « This element has or is affected by some invariantsC »The fixture id (maybe new) to map to the requestrequestId : id [0..1]The fixture id (maybe new) to map to the responseresponseId : id [0..1]The id of the fixture used as the body of a PUT or POST requestsourceId : id [0..1] « This element has or is affected by some invariantsC »Id of fixture used for extracting the [id], [type], and [vid] for GET requeststargetId : id [0..1] « This element has or is affected by some invariantsC »Complete request URLurl : string [0..1] « This element has or is affected by some invariantsC »RequestHeaderThe HTTP header field e.g. "Accept"field : string [1..1]The value of the header e.g. "application/fhir+xml"value : string [1..1]AssertThe label would be used for tracking/logging purposes by test engineslabel : string [0..1]The description would be used by test engines for tracking and reporting purposesdescription : string [0..1]The direction to use for the assertiondirection : code [0..1] « The type of direction to use for assertion. (Strength=Required)AssertionDirectionType! » « This element has or is affected by some invariantsC »Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definitioncompareToSourceId : string [0..1] « This element has or is affected by some invariantsC »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 bothcompareToSourceExpression : string [0..1] « This element has or is affected by some invariantsC »XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not bothcompareToSourcePath : string [0..1] « This element has or is affected by some invariantsC »The mime-type contents to compare against the request or response message 'Content-Type' headercontentType : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required)MimeTypes! » « This element has or is affected by some invariantsC »The default manual completion outcome applied to this assertiondefaultManualCompletion : code [0..1] « The type of operator to use for assertion. (Strength=Required) AssertionManualCompletionType! »The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payloadexpression : string [0..1] « This element has or is affected by some invariantsC »The HTTP header field name e.g. 'Location'headerField : string [0..1] « This element has or is affected by some invariantsC »The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumIdminimumId : string [0..1] « This element has or is affected by some invariantsC »Whether or not the test execution performs validation on the bundle navigation linksnavigationLinks : boolean [0..1] « This element has or is affected by some invariantsC »The operator type defines the conditional behavior of the assertoperator : code [0..1] « The type of operator to use for assertion. (Strength=Required)AssertionOperatorType! »The XPath or JSONPath expression to be evaluated against the fixture representing the response received from serverpath : string [0..1] « This element has or is affected by some invariantsC »The request method or HTTP operation code to compare against that used by the client system under testrequestMethod : code [0..1] « null (Strength=Required)TestScriptRequestMethodCode! » « This element has or is affected by some invariantsC »The value to use in a comparison against the request URL path stringrequestURL : string [0..1]The type of the resource. See the [resource list](resourcelist.html)resource : uri [0..1] « null (Strength=Extensible)ConcreteFHIRTypes+ » « This element has or is affected by some invariantsC »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 | httpVersionNotSupportedresponse : code [0..1] « The type of response code to use for assertion. (Strength=Required)AssertionResponseTypes! » « This element has or is affected by some invariantsC »The value of the HTTP response code to be testedresponseCode : string [0..1] « This element has or is affected by some invariantsC »Fixture to evaluate the XPath/JSONPath expression or the headerField againstsourceId : id [0..1]Whether or not the current test execution will stop on failure for this assertstopTestOnFail : boolean [1..1]The ID of the Profile to validate againstvalidateProfileId : id [0..1] « This element has or is affected by some invariantsC »The value to compare tovalue : string [0..1]Whether or not the test execution will produce a warning only on error for this assertwarningOnly : boolean [1..1]RequirementCanonical reference providing traceability to the testing requirement for this assertreference : canonical [1..1] « Requirements »Requirements.statement.key that identifies the statement that this assert satisfieskey : id [1..1]TestThe name of this test used for tracking/logging purposes by test enginesname : string [0..1]A short description of the test used by test engines for tracking and reporting purposesdescription : string [0..1]TestActionTeardownTeardownActionCommonKey that identifies this common collection of actions (unique within this resource)key : id [1..1]The name of this this common collection of actions used for tracking/logging purposes by test enginesname : string [0..1]A short description of this common collection of actions used by test engines for tracking and reporting purposesdescription : string [0..1]ParameterThe name of this parameter that will referenced in this common collection of actions using the TestScript variable nomenclature '${name}name : string [0..1]An optional short description of this parameter to be used this common collection of actions used by test engines for tracking and reporting purposesdescription : string [0..1]CommonActionAn abstract server used in operations within this test script in the origin elementorigin[0..*]An abstract server used in operations within this test script in the destination elementdestination[0..*]A link to the FHIR specification that this test is coveringlink[0..*]Capabilities that must exist and are assumed to function correctly on the FHIR server being testedcapability[1..*]The required capability must exist and are assumed to function correctly on the FHIR server being testedmetadata[0..1]The scope indicates a conformance artifact that is tested by the test(s) within this test case and the expectation of the test outcome(s) as well as the intended test phase inclusionscope[0..*]Fixture in the test script - by reference (uri). All fixtures are required for the test script to executefixture[0..*]Variable is set based either on element value in response body or on header field value in the response headersvariable[0..*]Optional named parameter(s) to provide input values to the identified common collection of actions from this or an external TestScriptparameter[0..*]Links or references to common collection(s) of actions in this or an external TestScript instancecommon[0..1]Header elements would be used to set HTTP headersrequestHeader[0..*]The operation to performoperation[0..1]Links or references providing traceability to the testing requirements for this assertrequirement[0..*]Evaluates the results of previous operations to determine if the server under test behaves appropriatelyassert[0..1]Action would contain either a common or operation or an assertionaction[0..*]A series of required setup operations before tests are executedsetup[0..1]Links or references to common collection(s) of actions in this or an external TestScript instancecommon[0..1]An operation would involve a REST request to a serveroperation[0..1]Evaluates the results of previous operations to determine if the server under test behaves appropriatelyassert[0..1]Action would contain either an operation or an assertionaction[0..*]A test in this scripttest[0..*]Links or references to common collection(s) of actions in this or an external TestScript instance. Action asserts SHALL be ignored for the TestScript.teardowncommon[0..1]An operation would involve a REST request to a serveroperation[1..1]The teardown action will only contain an operationaction[1..*]A series of operations required to clean up after all the tests are executed (successfully or otherwise)teardown[0..1]Optional named parameter(s) to provide input values to this common collection of actions from this or an external TestScriptparameter[0..*]An operation would involve a REST request to a serveroperation[0..1]Evaluates the results of previous operations to determine if the server under test behaves appropriatelyassert[0..1]An action will contain either an operation or an assertion but not bothaction[1..*]A common collection of actions that can be re-used in a TestScriptcommon[0..*]

XML Template

<TestScript xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 Canonical identifier for this test script, represented as a URI (globally unique) -->
 <identifier><!-- 0..* Identifier Additional identifier for the test script --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the test script -->
 <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 1..1 Name for this test script (computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this test script (human friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher/steward (organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the test script -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for test script (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this test script is defined -->
 <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) -->
 <origin>  <!-- 0..* An abstract server representing a client or sender in a message exchange -->
  <index value="[integer]"/><!-- 1..1 The index of the abstract origin server starting at 1 -->
  <profile><!-- 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller --></profile>
  <url value="[url]"/><!-- 0..1 The url path of the origin server -->
 </origin>
 <destination>  <!-- 0..* An abstract server representing a destination or receiver in a message exchange -->
  <index value="[integer]"/><!-- 1..1 The index of the abstract destination server starting at 1 -->
  <profile><!-- 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor --></profile>
  <url value="[url]"/><!-- 0..1 The url path of the destination server -->
 </destination>
 <metadata>  <!-- 0..1 Required capability that is assumed to function correctly on the FHIR server being tested -->
  <link>  <!-- 0..* Links to the FHIR specification -->
   <url value="[uri]"/><!-- 1..1 URL to the specification -->
   <description value="[string]"/><!-- 0..1 Short description -->
  </link>
  <capability>  <!-- I 1..* Capabilities  that are assumed to function correctly on the FHIR server being tested -->
   <required value="[boolean]"/><!-- I 1..1 Are the capabilities required? -->
   <validated value="[boolean]"/><!-- I 1..1 Are the capabilities validated? -->
   <description value="[string]"/><!-- 0..1 The expected capabilities of the server -->
   <origin value="[integer]"/><!-- 0..* Which origin server these requirements apply to -->
   <destination value="[integer]"/><!-- 0..1 Which server these requirements apply to -->
   <link value="[uri]"/><!-- 0..* Links to the FHIR specification -->
   <capabilities><!-- 1..1 canonical(CapabilityStatement) Required Capability Statement --></capabilities>
  </capability>
 </metadata>
 <scope>  <!-- 0..* Indication of the artifact(s) that are tested by this test case -->
  <artifact><!-- 1..1 canonical(Any) The specific conformance artifact being tested --></artifact>
  <conformance><!-- 0..1 CodeableConcept required | optional | strict --></conformance>
  <phase><!-- 0..1 CodeableConcept unit | integration | production --></phase>
 </scope>
 <fixture>  <!-- 0..* Fixture in the test script - by reference (uri) -->
  <autocreate value="[boolean]"/><!-- 1..1 Whether or not to implicitly create the fixture during setup -->
  <autodelete value="[boolean]"/><!-- 1..1 Whether or not to implicitly delete the fixture during teardown -->
  <resource><!-- 0..1 Reference(Any) Reference of the resource --></resource>
 </fixture>
 <profile><!-- 0..* canonical(StructureDefinition) Reference of the validation profile --></profile>
 <variable>  <!-- 0..* Placeholder for evaluated elements -->
  <name value="[string]"/><!-- 1..1 Descriptive name for this variable -->
  <defaultValue value="[string]"/><!-- 0..1 Default, hard-coded, or user-defined value for this variable -->
  <description value="[string]"/><!-- 0..1 Natural language description of the variable -->
  <expression value="[string]"/><!-- I 0..1 The FHIRPath expression against the fixture body -->
  <headerField value="[string]"/><!-- I 0..1 HTTP header field name for source -->
  <hint value="[string]"/><!-- 0..1 Hint help text for default value to enter -->
  <path value="[string]"/><!-- I 0..1 XPath or JSONPath against the fixture body -->
  <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField within this variable -->
 </variable>
 <setup>  <!-- 0..1 A series of required setup operations before tests are executed -->
  <action>  <!-- 0..* A setup common or operation or assert to perform -->
   <common>  <!-- I 0..1 Links or references to common collection(s) of actions -->
    <testScript><!-- 0..1 canonical(TestScript) Canonical reference to the common TestScript instance --></testScript>
    <keyRef value="[id]"/><!-- 1..1 Common key reference that identifies the common collection of actions to perform -->
    <parameter>  <!-- 0..* Parameter(s) to convey input values to the identified common collection of actions -->
     <name value="[string]"/><!-- 1..1 Name of the parameter from the identified common collection of actions -->
     <value value="[string]"/><!-- 1..1 Value to assign to the parameter from the identified common collection of actions -->
    </parameter>
   </common>
   <operation>  <!-- I 0..1 The setup operation to perform -->
    <type><!-- I 0..1 Coding The operation code type that will be executed --></type>
    <resource value="[uri]"/><!-- 0..1 Resource type -->
    <label value="[string]"/><!-- 0..1 Tracking/logging operation label -->
    <description value="[string]"/><!-- 0..1 Tracking/reporting operation description -->
    <accept value="[code]"/><!-- 0..1 Mime type to accept in the payload of the response, with charset etc -->
    <contentType value="[code]"/><!-- 0..1 Mime type of the request payload contents, with charset etc -->
    <destination value="[integer]"/><!-- 0..1 Server responding to the request -->
    <encodeRequestUrl value="[boolean]"/><!-- 1..1 Whether or not to send the request url in encoded format -->
    <method value="[code]"/><!-- 0..1 delete | get | options | patch | post | put | head -->
    <origin value="[integer]"/><!-- 0..1 Server initiating the request -->
    <params value="[string]"/><!-- I 0..1 Explicitly defined path parameters -->
    <requestHeader>  <!-- 0..* Each operation can have one or more header elements -->
     <field value="[string]"/><!-- 1..1 HTTP header field name -->
     <value value="[string]"/><!-- 1..1 HTTP headerfield value -->
    </requestHeader>
    <requestId value="[id]"/><!-- 0..1 Fixture Id of mapped request -->
    <responseId value="[id]"/><!-- 0..1 Fixture Id of mapped response -->
    <sourceId value="[id]"/><!-- I 0..1 Fixture Id of body for PUT and POST requests -->
    <targetId value="[id]"/><!-- I 0..1 Id of fixture used for extracting the [id],  [type], and [vid] for GET requests -->
    <url value="[string]"/><!-- I 0..1 Request URL -->
   </operation>
   <assert>  <!-- I 0..1 The assertion to perform -->
    <label value="[string]"/><!-- 0..1 Tracking/logging assertion label -->
    <description value="[string]"/><!-- 0..1 Tracking/reporting assertion description -->
    <direction value="[code]"/><!-- I 0..1 response | request -->
    <compareToSourceId value="[string]"/><!-- I 0..1 Id of the source fixture to be evaluated -->
    <compareToSourceExpression value="[string]"/><!-- I 0..1 The FHIRPath expression to evaluate against the source fixture -->
    <compareToSourcePath value="[string]"/><!-- I 0..1 XPath or JSONPath expression to evaluate against the source fixture -->
    <contentType value="[code]"/><!-- I 0..1 Mime type to compare against the 'Content-Type' header -->
    <defaultManualCompletion value="[code]"/><!-- 0..1 fail | pass | skip | stop -->
    <expression value="[string]"/><!-- I 0..1 The FHIRPath expression to be evaluated -->
    <headerField value="[string]"/><!-- I 0..1 HTTP header field name -->
    <minimumId value="[string]"/><!-- I 0..1 Fixture Id of minimum content resource -->
    <navigationLinks value="[boolean]"/><!-- I 0..1 Perform validation on navigation links? -->
    <operator value="[code]"/><!-- 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval -->
    <path value="[string]"/><!-- I 0..1 XPath or JSONPath expression -->
    <requestMethod value="[code]"/><!-- I 0..1 delete | get | options | patch | post | put | head -->
    <requestURL value="[string]"/><!-- 0..1 Request URL comparison value -->
    <resource value="[uri]"/><!-- I 0..1 Resource type -->
    <response value="[code]"/><!-- I 0..1 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 -->
    <responseCode value="[string]"/><!-- I 0..1 HTTP response code to test -->
    <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField -->
    <stopTestOnFail value="[boolean]"/><!-- 1..1 If this assert fails, will the current test execution stop? -->
    <validateProfileId value="[id]"/><!-- I 0..1 Profile Id of validation profile reference -->
    <value value="[string]"/><!-- 0..1 The value to compare to -->
    <warningOnly value="[boolean]"/><!-- 1..1 Will this assert produce a warning only on error? -->
    <requirement>  <!-- 0..* Links or references to the testing requirements -->
     <reference><!-- 1..1 canonical(Requirements) Canonical reference to the Requirements instance --></reference>
     <key value="[id]"/><!-- 1..1 Requirements statement key identifier -->
    </requirement>
   </assert>
  </action>
 </setup>
 <test>  <!-- 0..* A test in this script -->
  <name value="[string]"/><!-- 0..1 Tracking/logging name of this test -->
  <description value="[string]"/><!-- 0..1 Tracking/reporting short description of the test -->
  <action>  <!-- 0..* A test operation or assert to perform -->
   <common><!-- 0..1 Content as for TestScript.setup.action.common Links or references to common collection(s) of actions --></common>
   <operation><!-- 0..1 Content as for TestScript.setup.action.operation The setup operation to perform --></operation>
   <assert><!-- 0..1 Content as for TestScript.setup.action.assert The setup assertion to perform --></assert>
  </action>
 </test>
 <teardown>  <!-- 0..1 A series of required clean up steps -->
  <action>  <!-- 1..* One or more teardown operations to perform -->
   <common><!-- 0..1 Content as for TestScript.setup.action.common Links or references to common collection(s) of actions --></common>
   <operation><!-- 1..1 Content as for TestScript.setup.action.operation The teardown operation to perform --></operation>
  </action>
 </teardown>
 <common>  <!-- 0..* A common collection of actions in this script -->
  <key value="[id]"/><!-- 1..1 Key that identifies this common collection of actions -->
  <name value="[string]"/><!-- 0..1 Tracking/logging name of this common collection of actions -->
  <description value="[string]"/><!-- 0..1 Tracking/reporting short description of this common collection of actions -->
  <parameter>  <!-- 0..* Parameter(s) to convey input values to this common collection of actions in this script -->
   <name value="[string]"/><!-- 0..1 Tracking/logging name of this parameter to be used in this common collection of actions -->
   <description value="[string]"/><!-- 0..1 Tracking/reporting short description of this parameter to be used this common collection of actions -->
  </parameter>
  <action>  <!-- 1..* A common operation or assert that can be re-used in this script -->
   <operation><!-- 0..1 Content as for TestScript.setup.action.operation The common operation that can be re-used in this script --></operation>
   <assert><!-- 0..1 Content as for TestScript.setup.action.assert The common assertion to perform --></assert>
  </action>
 </common>
</TestScript>

JSON Template

{doco
  "resourceType" : "TestScript",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // Canonical identifier for this test script, represented as a URI (globally unique)
  "identifier" : [{ Identifier }], // Additional identifier for the test script
  "version" : "<string>", // Business version of the test script
  // versionAlgorithm[x]: How to compare versions. One of these 2:
  "versionAlgorithmString" : "<string>",
  "versionAlgorithmCoding" : { Coding },
  "name" : "<string>", // I R!  Name for this test script (computer friendly)
  "title" : "<string>", // Name for this test script (human friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher/steward (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the test script
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for test script (if applicable)
  "purpose" : "<markdown>", // Why this test script is defined
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "copyrightLabel" : "<string>", // Copyright holder and year(s)
  "origin" : [{ // An abstract server representing a client or sender in a message exchange
    "index" : <integer>, // R!  The index of the abstract origin server starting at 1
    "profile" : { Coding }, // R!  FHIR-Client | FHIR-SDC-FormFiller
    "url" : "<url>" // The url path of the origin server
  }],
  "destination" : [{ // An abstract server representing a destination or receiver in a message exchange
    "index" : <integer>, // R!  The index of the abstract destination server starting at 1
    "profile" : { Coding }, // R!  FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
    "url" : "<url>" // The url path of the destination server
  }],
  "metadata" : { // Required capability that is assumed to function correctly on the FHIR server being tested
    "link" : [{ // Links to the FHIR specification
      "url" : "<uri>", // R!  URL to the specification
      "description" : "<string>" // Short description
    }],
    "capability" : [{ // I R!  Capabilities  that are assumed to function correctly on the FHIR server being tested
      "required" : <boolean>, // I R!  Are the capabilities required?
      "validated" : <boolean>, // I R!  Are the capabilities validated?
      "description" : "<string>", // The expected capabilities of the server
      "origin" : [<integer>], // Which origin server these requirements apply to
      "destination" : <integer>, // Which server these requirements apply to
      "link" : ["<uri>"], // Links to the FHIR specification
      "capabilities" : "<canonical(CapabilityStatement)>" // R!  Required Capability Statement
    }]
  },
  "scope" : [{ // Indication of the artifact(s) that are tested by this test case
    "artifact" : "<canonical(Any)>", // R!  The specific conformance artifact being tested
    "conformance" : { CodeableConcept }, // required | optional | strict
    "phase" : { CodeableConcept } // unit | integration | production
  }],
  "fixture" : [{ // Fixture in the test script - by reference (uri)
    "autocreate" : <boolean>, // R!  Whether or not to implicitly create the fixture during setup
    "autodelete" : <boolean>, // R!  Whether or not to implicitly delete the fixture during teardown
    "resource" : { Reference(Any) } // Reference of the resource
  }],
  "profile" : ["<canonical(StructureDefinition)>"], // Reference of the validation profile
  "variable" : [{ // Placeholder for evaluated elements
    "name" : "<string>", // R!  Descriptive name for this variable
    "defaultValue" : "<string>", // Default, hard-coded, or user-defined value for this variable
    "description" : "<string>", // Natural language description of the variable
    "expression" : "<string>", // I The FHIRPath expression against the fixture body
    "headerField" : "<string>", // I HTTP header field name for source
    "hint" : "<string>", // Hint help text for default value to enter
    "path" : "<string>", // I XPath or JSONPath against the fixture body
    "sourceId" : "<id>" // Fixture Id of source expression or headerField within this variable
  }],
  "setup" : { // A series of required setup operations before tests are executed
    "action" : [{ // A setup common or operation or assert to perform
      "common" : { // I Links or references to common collection(s) of actions
        "testScript" : "<canonical(TestScript)>", // Canonical reference to the common TestScript instance
        "keyRef" : "<id>", // R!  Common key reference that identifies the common collection of actions to perform
        "parameter" : [{ // Parameter(s) to convey input values to the identified common collection of actions
          "name" : "<string>", // R!  Name of the parameter from the identified common collection of actions
          "value" : "<string>" // R!  Value to assign to the parameter from the identified common collection of actions
        }]
      },
      "operation" : { // I The setup operation to perform
        "type" : { Coding }, // I The operation code type that will be executed
        "resource" : "<uri>", // Resource type
        "label" : "<string>", // Tracking/logging operation label
        "description" : "<string>", // Tracking/reporting operation description
        "accept" : "<code>", // Mime type to accept in the payload of the response, with charset etc
        "contentType" : "<code>", // Mime type of the request payload contents, with charset etc
        "destination" : <integer>, // Server responding to the request
        "encodeRequestUrl" : <boolean>, // R!  Whether or not to send the request url in encoded format
        "method" : "<code>", // delete | get | options | patch | post | put | head
        "origin" : <integer>, // Server initiating the request
        "params" : "<string>", // I Explicitly defined path parameters
        "requestHeader" : [{ // Each operation can have one or more header elements
          "field" : "<string>", // R!  HTTP header field name
          "value" : "<string>" // R!  HTTP headerfield value
        }],
        "requestId" : "<id>", // Fixture Id of mapped request
        "responseId" : "<id>", // Fixture Id of mapped response
        "sourceId" : "<id>", // I Fixture Id of body for PUT and POST requests
        "targetId" : "<id>", // I Id of fixture used for extracting the [id],  [type], and [vid] for GET requests
        "url" : "<string>" // I Request URL
      },
      "assert" : { // I The assertion to perform
        "label" : "<string>", // Tracking/logging assertion label
        "description" : "<string>", // Tracking/reporting assertion description
        "direction" : "<code>", // I response | request
        "compareToSourceId" : "<string>", // I Id of the source fixture to be evaluated
        "compareToSourceExpression" : "<string>", // I The FHIRPath expression to evaluate against the source fixture
        "compareToSourcePath" : "<string>", // I XPath or JSONPath expression to evaluate against the source fixture
        "contentType" : "<code>", // I Mime type to compare against the 'Content-Type' header
        "defaultManualCompletion" : "<code>", // fail | pass | skip | stop
        "expression" : "<string>", // I The FHIRPath expression to be evaluated
        "headerField" : "<string>", // I HTTP header field name
        "minimumId" : "<string>", // I Fixture Id of minimum content resource
        "navigationLinks" : <boolean>, // I Perform validation on navigation links?
        "operator" : "<code>", // equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
        "path" : "<string>", // I XPath or JSONPath expression
        "requestMethod" : "<code>", // I delete | get | options | patch | post | put | head
        "requestURL" : "<string>", // Request URL comparison value
        "resource" : "<uri>", // I Resource type
        "response" : "<code>", // I 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
        "responseCode" : "<string>", // I HTTP response code to test
        "sourceId" : "<id>", // Fixture Id of source expression or headerField
        "stopTestOnFail" : <boolean>, // R!  If this assert fails, will the current test execution stop?
        "validateProfileId" : "<id>", // I Profile Id of validation profile reference
        "value" : "<string>", // The value to compare to
        "warningOnly" : <boolean>, // R!  Will this assert produce a warning only on error?
        "requirement" : [{ // Links or references to the testing requirements
          "reference" : "<canonical(Requirements)>", // R!  Canonical reference to the Requirements instance
          "key" : "<id>" // R!  Requirements statement key identifier
        }]
      }
    }]
  },
  "test" : [{ // A test in this script
    "name" : "<string>", // Tracking/logging name of this test
    "description" : "<string>", // Tracking/reporting short description of the test
    "action" : [{ // A test operation or assert to perform
      "common" : { Content as for TestScript.setup.action.common }, // Links or references to common collection(s) of actions
      "operation" : { Content as for TestScript.setup.action.operation }, // The setup operation to perform
      "assert" : { Content as for TestScript.setup.action.assert } // The setup assertion to perform
    }]
  }],
  "teardown" : { // A series of required clean up steps
    "action" : [{ // R!  One or more teardown operations to perform
      "common" : { Content as for TestScript.setup.action.common }, // Links or references to common collection(s) of actions
      "operation" : { Content as for TestScript.setup.action.operation } // R!  The teardown operation to perform
    }]
  },
  "common" : [{ // A common collection of actions in this script
    "key" : "<id>", // R!  Key that identifies this common collection of actions
    "name" : "<string>", // Tracking/logging name of this common collection of actions
    "description" : "<string>", // Tracking/reporting short description of this common collection of actions
    "parameter" : [{ // Parameter(s) to convey input values to this common collection of actions in this script
      "name" : "<string>", // Tracking/logging name of this parameter to be used in this common collection of actions
      "description" : "<string>" // Tracking/reporting short description of this parameter to be used this common collection of actions
    }],
    "action" : [{ // R!  A common operation or assert that can be re-used in this script
      "operation" : { Content as for TestScript.setup.action.operation }, // The common operation that can be re-used in this script
      "assert" : { Content as for TestScript.setup.action.assert } // The common assertion to perform
    }]
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:TestScript;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:url [ uri ] ; # 0..1 Canonical identifier for this test script, represented as a URI (globally unique)
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Additional identifier for the test script
  fhir:version [ string ] ; # 0..1 Business version of the test script
  # versionAlgorithm[x] : 0..1 How to compare versions. One of these 2
    fhir:versionAlgorithm [  a fhir:string ; string ]
    fhir:versionAlgorithm [  a fhir:Coding ; Coding ]
  fhir:name [ string ] ; # 1..1 I Name for this test script (computer friendly)
  fhir:title [ string ] ; # 0..1 Name for this test script (human friendly)
  fhir:status [ code ] ; # 1..1 draft | active | retired | unknown
  fhir:experimental [ boolean ] ; # 0..1 For testing purposes, not real usage
  fhir:date [ dateTime ] ; # 0..1 Date last changed
  fhir:publisher [ string ] ; # 0..1 Name of the publisher/steward (organization or individual)
  fhir:contact  ( [ ContactDetail ] ... ) ; # 0..* Contact details for the publisher
  fhir:description [ markdown ] ; # 0..1 Natural language description of the test script
  fhir:useContext  ( [ UsageContext ] ... ) ; # 0..* The context that the content is intended to support
  fhir:jurisdiction  ( [ CodeableConcept ] ... ) ; # 0..* Intended jurisdiction for test script (if applicable)
  fhir:purpose [ markdown ] ; # 0..1 Why this test script is defined
  fhir:copyright [ markdown ] ; # 0..1 Use and/or publishing restrictions
  fhir:copyrightLabel [ string ] ; # 0..1 Copyright holder and year(s)
  fhir:origin ( [ # 0..* An abstract server representing a client or sender in a message exchange
    fhir:index [ integer ] ; # 1..1 The index of the abstract origin server starting at 1
    fhir:profile [ Coding ] ; # 1..1 FHIR-Client | FHIR-SDC-FormFiller
    fhir:url [ url ] ; # 0..1 The url path of the origin server
  ] ... ) ;
  fhir:destination ( [ # 0..* An abstract server representing a destination or receiver in a message exchange
    fhir:index [ integer ] ; # 1..1 The index of the abstract destination server starting at 1
    fhir:profile [ Coding ] ; # 1..1 FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
    fhir:url [ url ] ; # 0..1 The url path of the destination server
  ] ... ) ;
  fhir:metadata [ # 0..1 Required capability that is assumed to function correctly on the FHIR server being tested
    fhir:link ( [ # 0..* Links to the FHIR specification
      fhir:url [ uri ] ; # 1..1 URL to the specification
      fhir:description [ string ] ; # 0..1 Short description
    ] ... ) ;
    fhir:capability ( [ # 1..* I Capabilities  that are assumed to function correctly on the FHIR server being tested
      fhir:required [ boolean ] ; # 1..1 I Are the capabilities required?
      fhir:validated [ boolean ] ; # 1..1 I Are the capabilities validated?
      fhir:description [ string ] ; # 0..1 The expected capabilities of the server
      fhir:origin  ( [ integer ] ... ) ; # 0..* Which origin server these requirements apply to
      fhir:destination [ integer ] ; # 0..1 Which server these requirements apply to
      fhir:link  ( [ uri ] ... ) ; # 0..* Links to the FHIR specification
      fhir:capabilities [ canonical(CapabilityStatement) ] ; # 1..1 Required Capability Statement
    ] ... ) ;
  ] ;
  fhir:scope ( [ # 0..* Indication of the artifact(s) that are tested by this test case
    fhir:artifact [ canonical(Any) ] ; # 1..1 The specific conformance artifact being tested
    fhir:conformance [ CodeableConcept ] ; # 0..1 required | optional | strict
    fhir:phase [ CodeableConcept ] ; # 0..1 unit | integration | production
  ] ... ) ;
  fhir:fixture ( [ # 0..* Fixture in the test script - by reference (uri)
    fhir:autocreate [ boolean ] ; # 1..1 Whether or not to implicitly create the fixture during setup
    fhir:autodelete [ boolean ] ; # 1..1 Whether or not to implicitly delete the fixture during teardown
    fhir:resource [ Reference(Any) ] ; # 0..1 Reference of the resource
  ] ... ) ;
  fhir:profile  ( [ canonical(StructureDefinition) ] ... ) ; # 0..* Reference of the validation profile
  fhir:variable ( [ # 0..* Placeholder for evaluated elements
    fhir:name [ string ] ; # 1..1 Descriptive name for this variable
    fhir:defaultValue [ string ] ; # 0..1 Default, hard-coded, or user-defined value for this variable
    fhir:description [ string ] ; # 0..1 Natural language description of the variable
    fhir:expression [ string ] ; # 0..1 I The FHIRPath expression against the fixture body
    fhir:headerField [ string ] ; # 0..1 I HTTP header field name for source
    fhir:hint [ string ] ; # 0..1 Hint help text for default value to enter
    fhir:path [ string ] ; # 0..1 I XPath or JSONPath against the fixture body
    fhir:sourceId [ id ] ; # 0..1 Fixture Id of source expression or headerField within this variable
  ] ... ) ;
  fhir:setup [ # 0..1 A series of required setup operations before tests are executed
    fhir:action ( [ # 0..* A setup common or operation or assert to perform
      fhir:common [ # 0..1 I Links or references to common collection(s) of actions
        fhir:testScript [ canonical(TestScript) ] ; # 0..1 Canonical reference to the common TestScript instance
        fhir:keyRef [ id ] ; # 1..1 Common key reference that identifies the common collection of actions to perform
        fhir:parameter ( [ # 0..* Parameter(s) to convey input values to the identified common collection of actions
          fhir:name [ string ] ; # 1..1 Name of the parameter from the identified common collection of actions
          fhir:value [ string ] ; # 1..1 Value to assign to the parameter from the identified common collection of actions
        ] ... ) ;
      ] ;
      fhir:operation [ # 0..1 I The setup operation to perform
        fhir:type [ Coding ] ; # 0..1 I The operation code type that will be executed
        fhir:resource [ uri ] ; # 0..1 Resource type
        fhir:label [ string ] ; # 0..1 Tracking/logging operation label
        fhir:description [ string ] ; # 0..1 Tracking/reporting operation description
        fhir:accept [ code ] ; # 0..1 Mime type to accept in the payload of the response, with charset etc
        fhir:contentType [ code ] ; # 0..1 Mime type of the request payload contents, with charset etc
        fhir:destination [ integer ] ; # 0..1 Server responding to the request
        fhir:encodeRequestUrl [ boolean ] ; # 1..1 Whether or not to send the request url in encoded format
        fhir:method [ code ] ; # 0..1 delete | get | options | patch | post | put | head
        fhir:origin [ integer ] ; # 0..1 Server initiating the request
        fhir:params [ string ] ; # 0..1 I Explicitly defined path parameters
        fhir:requestHeader ( [ # 0..* Each operation can have one or more header elements
          fhir:field [ string ] ; # 1..1 HTTP header field name
          fhir:value [ string ] ; # 1..1 HTTP headerfield value
        ] ... ) ;
        fhir:requestId [ id ] ; # 0..1 Fixture Id of mapped request
        fhir:responseId [ id ] ; # 0..1 Fixture Id of mapped response
        fhir:sourceId [ id ] ; # 0..1 I Fixture Id of body for PUT and POST requests
        fhir:targetId [ id ] ; # 0..1 I Id of fixture used for extracting the [id],  [type], and [vid] for GET requests
        fhir:url [ string ] ; # 0..1 I Request URL
      ] ;
      fhir:assert [ # 0..1 I The assertion to perform
        fhir:label [ string ] ; # 0..1 Tracking/logging assertion label
        fhir:description [ string ] ; # 0..1 Tracking/reporting assertion description
        fhir:direction [ code ] ; # 0..1 I response | request
        fhir:compareToSourceId [ string ] ; # 0..1 I Id of the source fixture to be evaluated
        fhir:compareToSourceExpression [ string ] ; # 0..1 I The FHIRPath expression to evaluate against the source fixture
        fhir:compareToSourcePath [ string ] ; # 0..1 I XPath or JSONPath expression to evaluate against the source fixture
        fhir:contentType [ code ] ; # 0..1 I Mime type to compare against the 'Content-Type' header
        fhir:defaultManualCompletion [ code ] ; # 0..1 fail | pass | skip | stop
        fhir:expression [ string ] ; # 0..1 I The FHIRPath expression to be evaluated
        fhir:headerField [ string ] ; # 0..1 I HTTP header field name
        fhir:minimumId [ string ] ; # 0..1 I Fixture Id of minimum content resource
        fhir:navigationLinks [ boolean ] ; # 0..1 I Perform validation on navigation links?
        fhir:operator [ code ] ; # 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval
        fhir:path [ string ] ; # 0..1 I XPath or JSONPath expression
        fhir:requestMethod [ code ] ; # 0..1 I delete | get | options | patch | post | put | head
        fhir:requestURL [ string ] ; # 0..1 Request URL comparison value
        fhir:resource [ uri ] ; # 0..1 I Resource type
        fhir:response [ code ] ; # 0..1 I 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
        fhir:responseCode [ string ] ; # 0..1 I HTTP response code to test
        fhir:sourceId [ id ] ; # 0..1 Fixture Id of source expression or headerField
        fhir:stopTestOnFail [ boolean ] ; # 1..1 If this assert fails, will the current test execution stop?
        fhir:validateProfileId [ id ] ; # 0..1 I Profile Id of validation profile reference
        fhir:value [ string ] ; # 0..1 The value to compare to
        fhir:warningOnly [ boolean ] ; # 1..1 Will this assert produce a warning only on error?
        fhir:requirement ( [ # 0..* Links or references to the testing requirements
          fhir:reference [ canonical(Requirements) ] ; # 1..1 Canonical reference to the Requirements instance
          fhir:key [ id ] ; # 1..1 Requirements statement key identifier
        ] ... ) ;
      ] ;
    ] ... ) ;
  ] ;
  fhir:test ( [ # 0..* A test in this script
    fhir:name [ string ] ; # 0..1 Tracking/logging name of this test
    fhir:description [ string ] ; # 0..1 Tracking/reporting short description of the test
    fhir:action ( [ # 0..* A test operation or assert to perform
      fhir:common [ See TestScript.setup.action.common ] ; # 0..1 Links or references to common collection(s) of actions
      fhir:operation [ See TestScript.setup.action.operation ] ; # 0..1 The setup operation to perform
      fhir:assert [ See TestScript.setup.action.assert ] ; # 0..1 The setup assertion to perform
    ] ... ) ;
  ] ... ) ;
  fhir:teardown [ # 0..1 A series of required clean up steps
    fhir:action ( [ # 1..* One or more teardown operations to perform
      fhir:common [ See TestScript.setup.action.common ] ; # 0..1 Links or references to common collection(s) of actions
      fhir:operation [ See TestScript.setup.action.operation ] ; # 1..1 The teardown operation to perform
    ] ... ) ;
  ] ;
  fhir:common ( [ # 0..* A common collection of actions in this script
    fhir:key [ id ] ; # 1..1 Key that identifies this common collection of actions
    fhir:name [ string ] ; # 0..1 Tracking/logging name of this common collection of actions
    fhir:description [ string ] ; # 0..1 Tracking/reporting short description of this common collection of actions
    fhir:parameter ( [ # 0..* Parameter(s) to convey input values to this common collection of actions in this script
      fhir:name [ string ] ; # 0..1 Tracking/logging name of this parameter to be used in this common collection of actions
      fhir:description [ string ] ; # 0..1 Tracking/reporting short description of this parameter to be used this common collection of actions
    ] ... ) ;
    fhir:action ( [ # 1..* A common operation or assert that can be re-used in this script
      fhir:operation [ See TestScript.setup.action.operation ] ; # 0..1 The common operation that can be re-used in this script
      fhir:assert [ See TestScript.setup.action.assert ] ; # 0..1 The common assertion to perform
    ] ... ) ;
  ] ... ) ;
]

Changes from both R4 and R4B

TestScript
TestScript.url
  • Min Cardinality changed from 1 to 0
TestScript.identifier
  • Max Cardinality changed from 1 to *
TestScript.versionAlgorithm[x]
  • Added Element
TestScript.copyrightLabel
  • Added Element
TestScript.origin.url
  • Added Element
TestScript.destination.url
  • Added Element
TestScript.scope
  • Added Element
TestScript.scope.artifact
  • Added Mandatory Element
TestScript.scope.conformance
  • Added Element
TestScript.scope.phase
  • Added Element
TestScript.profile
  • Type changed from Reference(Resource) to canonical(StructureDefinition)
TestScript.setup.action
  • Min Cardinality changed from 1 to 0
TestScript.setup.action.common
  • Added Element
TestScript.setup.action.common.testScript
  • Added Element
TestScript.setup.action.common.keyRef
  • Added Mandatory Element
TestScript.setup.action.common.parameter
  • Added Element
TestScript.setup.action.common.parameter.name
  • Added Mandatory Element
TestScript.setup.action.common.parameter.value
  • Added Mandatory Element
TestScript.setup.action.operation.type
  • Change code system for extensibly bound codes from "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" to "http://hl7.org/fhir/restful-interaction"
TestScript.setup.action.operation.resource
  • Type changed from code to uri
  • Change binding strength from required to extensible
  • Change value set from http://hl7.org/fhir/ValueSet/defined-types|4.0.0 to Concrete FHIR Types
TestScript.setup.action.assert.defaultManualCompletion
  • Added Element
TestScript.setup.action.assert.operator
  • Add code manualEval
TestScript.setup.action.assert.resource
  • Type changed from code to uri
  • Change binding strength from required to extensible
  • Change value set from http://hl7.org/fhir/ValueSet/defined-types|4.0.0 to Concrete FHIR Types
TestScript.setup.action.assert.response
  • Remove codes bad, unprocessable
  • Add codes continue, switchingProtocols, accepted, nonAuthoritativeInformation, resetContent, partialContent, multipleChoices, movedPermanently, found, seeOther, useProxy, temporaryRedirect, permanentRedirect, badRequest, unauthorized, paymentRequired, notAcceptable, proxyAuthenticationRequired, requestTimeout, lengthRequired, contentTooLarge, uriTooLong, unsupportedMediaType, rangeNotSatisfiable, expectationFailed, misdirectedRequest, unprocessableContent, upgradeRequired, internalServerError, notImplemented, badGateway, serviceUnavailable, gatewayTimeout, httpVersionNotSupported
TestScript.setup.action.assert.stopTestOnFail
  • Added Mandatory Element
TestScript.setup.action.assert.requirement
  • Added Element
TestScript.setup.action.assert.requirement.reference
  • Added Mandatory Element
TestScript.setup.action.assert.requirement.key
  • Added Mandatory Element
TestScript.test.action
  • Min Cardinality changed from 1 to 0
TestScript.test.action.common
  • Added Element
TestScript.teardown.action.common
  • Added Element
TestScript.common
  • Added Element
TestScript.common.key
  • Added Mandatory Element
TestScript.common.name
  • Added Element
TestScript.common.description
  • Added Element
TestScript.common.parameter
  • Added Element
TestScript.common.parameter.name
  • Added Element
TestScript.common.parameter.description
  • Added Element
TestScript.common.action
  • Added Mandatory Element
TestScript.common.action.operation
  • Added Element
TestScript.common.action.assert
  • Added Element

See the Full Difference for further information

This analysis is available for R4 as XML or JSON and for R4B as XML or JSON.

 

Additional definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) , the spreadsheet version & the dependency analysis

Path ValueSet Type Documentation
TestScript.versionAlgorithm[x] VersionAlgorithm Extensible

Indicates the mechanism used to compare versions to determine which is more current.

TestScript.status PublicationStatus Required

The lifecycle status of an artifact.

TestScript.jurisdiction JurisdictionValueSet Extensible

This value set defines a base set of codes for country, country subdivision and region for indicating where a resource is intended to be used.

Note: The codes for countries and country subdivisions are taken from ISO 3166 icon while the codes for "supra-national" regions are from UN Standard country or area codes for statistical use (M49) icon.

TestScript.origin.profile TestScriptProfileOriginType Extensible

This value set defines a set of codes that are used to indicate the profile type of a test system when acting as the origin within a TestScript.

TestScript.destination.profile TestScriptProfileDestinationType Extensible

This value set defines a set of codes that are used to indicate the profile type of a test system when acting as the destination within a TestScript.

TestScript.scope.conformance TestScriptScopeConformanceType Extensible

The expectation of whether the test must pass for the system to be considered conformant with the artifact.

TestScript.scope.phase TestScriptScopePhaseType Extensible

The phase of testing for this artifact.

TestScript.setup.action.operation.type TestScriptOperationCode (a valid code from FHIR Restful Interactions) Extensible

This value set defines a set of codes that are used to indicate the supported operations of a testing engine or tool.

TestScript.setup.action.operation.resource ConcreteFHIRTypes Extensible

List of all non-abstract types, data types and resources

TestScript.setup.action.operation.accept MimeTypes (a valid code from urn:ietf:bcp:13) Required

This value set includes all possible codes from BCP-13 (see http://tools.ietf.org/html/bcp13)

TestScript.setup.action.operation.contentType MimeTypes (a valid code from urn:ietf:bcp:13) Required

This value set includes all possible codes from BCP-13 (see http://tools.ietf.org/html/bcp13)

TestScript.setup.action.operation.method TestScriptRequestMethodCode Required

The allowable request method or HTTP operation codes.

TestScript.setup.action.assert.direction AssertionDirectionType Required

The type of direction to use for assertion.

TestScript.setup.action.assert.contentType MimeTypes (a valid code from urn:ietf:bcp:13) Required

This value set includes all possible codes from BCP-13 (see http://tools.ietf.org/html/bcp13)

TestScript.setup.action.assert.defaultManualCompletion AssertionManualCompletionType Required

The type of manual completion to use for assertion.

TestScript.setup.action.assert.operator AssertionOperatorType Required

The type of operator to use for assertion.

TestScript.setup.action.assert.requestMethod TestScriptRequestMethodCode Required

The allowable request method or HTTP operation codes.

TestScript.setup.action.assert.resource ConcreteFHIRTypes Extensible

List of all non-abstract types, data types and resources

TestScript.setup.action.assert.response AssertionResponseTypes Required

The type of response code to use for assertion.

UniqueKeyLevelLocationDescriptionExpression
img cnl-0Warning (base)Name should be usable as an identifier for the module by machine processing applications such as code generationname.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
img tst-1Rule TestScript.setup.actionSetup action SHALL contain only one of either a common or an operation or an assert.common.exists() xor operation.exists() xor assert.exists()
img cnl-1Warning TestScript.urlURL should not contain | or # - these characters make processing canonical references problematicexists() implies matches('^[^|# ]+$')
img tst-2Rule TestScript.test.actionTest action SHALL contain only one of either a common or an operation or an assert.common.exists() xor operation.exists() xor assert.exists()
img tst-3Rule TestScript.variableVariable can only contain one of expression, headerField or path.expression.empty() or headerField.empty() or path.empty()
img tst-4Rule TestScript.metadataTestScript metadata capability SHALL contain required or validated or both.capability.required.exists() or capability.validated.exists()
img tst-5Rule TestScript.setup.action.assertOnly a single assertion SHALL be present within setup action assert element.extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() <=1) or (((expression.count() + minimumId.count() <=2) or (expression.count() + validateProfileId.count() <=2)) and (expression.count() + path.count() <=1) and (minimumId.count() + validateProfileId.count() <=1)) or (((path.count() + minimumId.count() <=2) or (path.count() + validateProfileId.count() <=2)) and (expression.count() + path.count() <=1) and (minimumId.count() + validateProfileId.count() <=1))
img tst-6Rule TestScript.test.action.assertOnly a single assertion SHALL be present within test action assert element.extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() <=1) or (((expression.count() + minimumId.count() <=2) or (expression.count() + validateProfileId.count() <=2)) and (expression.count() + path.count() <=1) and (minimumId.count() + validateProfileId.count() <=1)) or (((path.count() + minimumId.count() <=2) or (path.count() + validateProfileId.count() <=2)) and (expression.count() + path.count() <=1) and (minimumId.count() + validateProfileId.count() <=1))
img tst-7Rule TestScript.setup.action.operationSetup operation SHALL contain either sourceId or targetId or params or url.sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' |'search' | 'transaction' | 'history'))
img tst-8Rule TestScript.test.action.operationTest operation SHALL contain either sourceId or targetId or params or url.sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))
img tst-9Rule TestScript.teardown.action.operationTeardown operation SHALL contain either sourceId or targetId or params or url.sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))
img tst-10Rule TestScript.setup.action.assertSetup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())
img tst-11Rule TestScript.test.action.assertTest action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())
img tst-12Rule TestScript.setup.action.assertSetup action assert response and responseCode SHALL be empty when direction equals request(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'
img tst-13Rule TestScript.test.action.assertTest action assert response and response and responseCode SHALL be empty when direction equals request(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'
img tst-14Rule TestScript.common.actionCommon action SHALL contain either an operation or assert but not both.operation.exists() xor assert.exists()
img tst-15Rule TestScript.common.action.operationCommon operation SHALL contain either sourceId or targetId or params or url.sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))
img tst-16Rule TestScript.common.action.assertCommon action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())
img tst-17Rule TestScript.common.action.assertCommon action assert response and response and responseCode SHALL be empty when direction equals request(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'
img tst-18Rule TestScript.common.action.assertOnly a single assertion SHALL be present within common action assert element.extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() <=1) or (((expression.count() + minimumId.count() <=2) or (expression.count() + validateProfileId.count() <=2)) and (expression.count() + path.count() <=1) and (minimumId.count() + validateProfileId.count() <=1)) or (((path.count() + minimumId.count() <=2) or (path.count() + validateProfileId.count() <=2)) and (expression.count() + path.count() <=1) and (minimumId.count() + validateProfileId.count() <=1))

Please refer to the Testing FHIR - How Tos for examples on working with this resource.

Search parameters for this resource. See also the full list of search parameters for this resource, and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

Name Type Description Expression In Common
artifact reference The artifact under test TestScript.scope.artifact
(Any)
conformance token The artifact conformance testing expectation TestScript.scope.conformance.ofType(CodeableConcept)
context token A use context assigned to the test script (TestScript.useContext.value.ofType(CodeableConcept)) 30 Resources
context-quantity quantity A quantity- or range-valued use context assigned to the test script (TestScript.useContext.value.ofType(Quantity)) | (TestScript.useContext.value.ofType(Range)) 30 Resources
context-type token A type of use context assigned to the test script TestScript.useContext.code 30 Resources
context-type-quantity composite A use context type and quantity- or range-based value assigned to the test script On TestScript.useContext:
  context-type: code
  context-quantity: value.ofType(Quantity) | value.ofType(Range)
30 Resources
context-type-value composite A use context type and value assigned to the test script On TestScript.useContext:
  context-type: code
  context: value.ofType(CodeableConcept)
30 Resources
date date The test script publication date TestScript.date 30 Resources
description string The description of the test script TestScript.description 28 Resources
identifier token External identifier for the test script TestScript.identifier 36 Resources
jurisdiction token Intended jurisdiction for the test script TestScript.jurisdiction 26 Resources
name string Computationally friendly name of the test script TestScript.name 27 Resources
phase token The artifact phase of testing TestScript.scope.phase.ofType(CodeableConcept)
publisher string Name of the publisher of the test script TestScript.publisher 30 Resources
scope-artifact-conformance composite The artifact under test and conformance testing expectation On TestScript.scope:
  artifact: artifact
  conformance: conformance.ofType(CodeableConcept)
scope-artifact-phase composite The artifact under test and phase of testing On TestScript.scope:
  artifact: artifact
  phase: phase.ofType(CodeableConcept)
status token The current status of the test script TestScript.status 36 Resources
testscript-capability string TestScript required and validated capability TestScript.metadata.capability.description
title string The human-friendly name of the test script TestScript.title 27 Resources
url uri The uri that identifies the test script TestScript.url 35 Resources
version token The business version of the test script TestScript.version 31 Resources