Release 5 Draft Ballot

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

FHIR Infrastructure Work Group Maturity Level: 0Trial Use Use Context: Any

The official URL for this profile is:

http://hl7.org/fhir/StructureDefinition/shareabletestscript

Enforces the minimum information set for the test script metadata required by HL7 and other organizations that share and publish test scripts

This profile was published on Thu, Jan 1, 1970 00:00+0000 as a draft by HL7.

Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.

This structure is derived from TestScript.

Summary

Mandatory: 5 elements

This structure is derived from TestScript.

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript 1..1TestScriptDescribes a set of tests
... url 1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... version 1..1stringBusiness version of the test script
... experimental 1..1booleanFor testing purposes, not real usage
... description 1..1markdownNatural language description of the test script

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript I1..1TestScriptDescribes a set of tests
... id Σ0..1idLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: Common Languages (preferred)
Max Binding: All Languages: IETF language tag

... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... url Σ1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... identifier Σ0..*IdentifierAdditional identifier for the test script
... version Σ1..1stringBusiness version of the test script
... name ΣI1..1stringName for this test script (computer friendly)
... title Σ0..1stringName for this test script (human friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.

... experimental Σ1..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ1..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 1..1markdownNatural language description of the test script
... useContext Σ0..*UsageContextThe context that the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for test script (if applicable)
Binding: Jurisdiction (extensible): Countries and regions within which this artifact is targeted for use.


... purpose 0..1markdownWhy this test script is defined
... copyright 0..1markdownUse and/or publishing restrictions
... origin 0..*BackboneElementAn abstract server representing a client or sender in a message exchange
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... index 1..1integerThe index of the abstract origin server starting at 1
.... profile 1..1CodingFHIR-Client | FHIR-SDC-FormFiller
Binding: TestScriptProfileOriginType (extensible): The type of origin profile the test system supports.

... destination 0..*BackboneElementAn abstract server representing a destination or receiver in a message exchange
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... index 1..1integerThe index of the abstract destination server starting at 1
.... profile 1..1CodingFHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
Binding: TestScriptProfileDestinationType (extensible): The type of destination profile the test system supports.

... metadata I0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... link 0..*BackboneElementLinks to the FHIR specification
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... url 1..1uriURL to the specification
..... description 0..1stringShort description
.... capability 1..*BackboneElementCapabilities that are assumed to function correctly on the FHIR server being tested
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... required 1..1booleanAre the capabilities required?
..... validated 1..1booleanAre the capabilities validated?
..... description 0..1stringThe expected capabilities of the server
..... origin 0..*integerWhich origin server these requirements apply to
..... destination 0..1integerWhich server these requirements apply to
..... link 0..*uriLinks to the FHIR specification
..... capabilities 1..1canonical(CapabilityStatement)Required Capability Statement
... scope 0..*BackboneElementIndication of the artifact(s) that are tested by this test case
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... artifact 1..1canonical(Resource)The specific conformance artifact being tested
.... conformance 0..1CodeableConceptrequired | optional | strict
Binding: TestScriptScopeConformanceType (extensible): The expectation of whether the test must pass for the system to be considered conformant with the artifact.

.... phase 0..1CodeableConceptunit | integration | production
Binding: TestScriptScopePhaseType (extensible): The phase of testing for this artifact.

... fixture 0..*BackboneElementFixture in the test script - by reference (uri)
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... autocreate 1..1booleanWhether or not to implicitly create the fixture during setup
.... autodelete 1..1booleanWhether or not to implicitly delete the fixture during teardown
.... resource 0..1Reference(Resource)Reference of the resource
... profile 0..*Reference(Resource)Reference of the validation profile
... variable I0..*BackboneElementPlaceholder for evaluated elements
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... name 1..1stringDescriptive name for this variable
.... defaultValue 0..1stringDefault, hard-coded, or user-defined value for this variable
.... description 0..1stringNatural language description of the variable
.... expression 0..1stringThe FHIRPath expression against the fixture body
.... headerField 0..1stringHTTP header field name for source
.... hint 0..1stringHint help text for default value to enter
.... path 0..1stringXPath or JSONPath against the fixture body
.... sourceId 0..1idFixture Id of source expression or headerField within this variable
... setup 0..1BackboneElementA series of required setup operations before tests are executed
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action I1..*BackboneElementA setup operation or assert to perform
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation I0..1BackboneElementThe setup operation to perform
...... id 0..1idUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
...... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
...... type 0..1CodingThe operation code type that will be executed
Binding: TestScriptOperationCode (extensible): FHIR Operation Code Types

...... resource 0..1uriResource type
Binding: FHIRDefinedType (extensible): A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.

...... label 0..1stringTracking/logging operation label
...... description 0..1stringTracking/reporting operation description
...... accept 0..1codeMime type to accept in the payload of the response, with charset etc.
Binding: MimeType (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... contentType 0..1codeMime type of the request payload contents, with charset etc.
Binding: MimeType (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... destination 0..1integerServer responding to the request
...... encodeRequestUrl 1..1booleanWhether or not to send the request url in encoded format
...... method 0..1codedelete | get | options | patch | post | put | head
Binding: TestScriptRequestMethodCode (required): The allowable request method or HTTP operation codes.

...... origin 0..1integerServer initiating the request
...... params 0..1stringExplicitly defined path parameters
...... requestHeader 0..*BackboneElementEach operation can have one or more header elements
....... id 0..1idUnique id for inter-element referencing
....... extension 0..*ExtensionAdditional content defined by implementations
....... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
....... field 1..1stringHTTP header field name
....... value 1..1stringHTTP headerfield value
...... requestId 0..1idFixture Id of mapped request
...... responseId 0..1idFixture Id of mapped response
...... sourceId 0..1idFixture Id of body for PUT and POST requests
...... targetId 0..1idId of fixture used for extracting the [id], [type], and [vid] for GET requests
...... url 0..1stringRequest URL
..... assert I0..1BackboneElementThe assertion to perform
...... id 0..1idUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
...... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
...... label 0..1stringTracking/logging assertion label
...... description 0..1stringTracking/reporting assertion description
...... direction 0..1coderesponse | request
Binding: AssertionDirectionType (required): The direction to use for assertions.

...... compareToSourceId 0..1stringId of the source fixture to be evaluated
...... compareToSourceExpression 0..1stringThe FHIRPath expression to evaluate against the source fixture
...... compareToSourcePath 0..1stringXPath or JSONPath expression to evaluate against the source fixture
...... contentType 0..1codeMime type to compare against the 'Content-Type' header
Binding: MimeType (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... expression 0..1stringThe FHIRPath expression to be evaluated
...... headerField 0..1stringHTTP header field name
...... minimumId 0..1stringFixture Id of minimum content resource
...... navigationLinks 0..1booleanPerform validation on navigation links?
...... operator 0..1codeequals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval
Binding: AssertionOperatorType (required): The type of operator to use for assertions.

...... path 0..1stringXPath or JSONPath expression
...... requestMethod 0..1codedelete | get | options | patch | post | put | head
Binding: TestScriptRequestMethodCode (required): The allowable request method or HTTP operation codes.

...... requestURL 0..1stringRequest URL comparison value
...... resource 0..1codeResource type
Binding: FHIRDefinedType (required): A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.

...... response 0..1codeokay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable
Binding: AssertionResponseTypes (required): The response code to expect in the response.

...... responseCode 0..1stringHTTP response code to test
...... sourceId 0..1idFixture Id of source expression or headerField
...... stopTestOnFail 1..1booleanIf this assert fails, will the current test execution stop?
...... validateProfileId 0..1idProfile Id of validation profile reference
...... value 0..1stringThe value to compare to
...... warningOnly 1..1booleanWill this assert produce a warning only on error?
... test 0..*BackboneElementA test in this script
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... name 0..1stringTracking/logging name of this test
.... description 0..1stringTracking/reporting short description of the test
.... action I1..*BackboneElementA test operation or assert to perform
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation I0..1See operation (TestScript)The setup operation to perform
..... assert I0..1See assert (TestScript)The setup assertion to perform
... teardown 0..1BackboneElementA series of required clean up steps
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action 1..*BackboneElementOne or more teardown operations to perform
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation I1..1See operation (TestScript)The teardown operation to perform

doco Documentation for this format
<!-- Shareable TestScript -->doco

<TestScript xmlns="http://hl7.org/fhir"
>
  <!-- from Element: extension -->
 <id value="[id]"/><!-- 0..1 Logical id of this artifact -->
 <meta><!-- ?? 0..1 Meta Metadata about the resource --></meta>
 <implicitRules value="[uri]"/><!-- ?? 0..1 A set of rules under which this content was created -->
 <language value="[code]"/><!-- ?? 0..1 Language of the resource content   -->
 <text><!-- ?? 0..1 Narrative 
     Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored  --></modifierExtension>
 <url value="[uri]"/><!-- ?? 1..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]"/><!-- ?? 1..1 Business version of the test script -->
 <name value="[string]"/><!-- ?? 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]"/><!-- ?? 1..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- ?? 0..1 Date last changed -->
 <publisher value="[string]"/><!-- ?? 1..1 Name of the publisher (organization or individual) -->
 <contact><!-- ?? 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- ?? 1..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 -->
 <origin> ?? 0..* BackboneElement  <!-- ?? 0..* An abstract server representing a client or sender in a message exchange -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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>
 </origin>
 <destination> ?? 0..* BackboneElement  <!-- ?? 0..* An abstract server representing a destination or receiver in a message exchange -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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>
 </destination>
 <metadata> ?? 0..1 BackboneElement  <!-- ?? 0..1 Required capability that is assumed to function correctly on the FHIR server being tested -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <link> ?? 0..* BackboneElement  <!-- ?? 0..* Links to the FHIR specification -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <url value="[uri]"/><!-- ?? 1..1 URL to the specification -->
   <description value="[string]"/><!-- ?? 0..1 Short description -->
  </link>
  <capability> ?? 1..* BackboneElement  <!-- ?? 1..* Capabilities  that are assumed to function correctly on the FHIR server being tested -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <required value="[boolean]"/><!-- ?? 1..1 Are the capabilities required? -->
   <validated value="[boolean]"/><!-- ?? 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 value="[canonical]"/><!-- ?? 1..1 Required Capability Statement -->
  </capability>
 </metadata>
 <scope> ?? 0..* BackboneElement  <!-- ?? 0..* Indication of the artifact(s) that are tested by this test case -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <artifact value="[canonical]"/><!-- ?? 1..1 The specific conformance artifact being tested -->
  <conformance><!-- ?? 0..1 CodeableConcept required | optional | strict   --></conformance>
  <phase><!-- ?? 0..1 CodeableConcept unit | integration | production   --></phase>
 </scope>
 <fixture> ?? 0..* BackboneElement  <!-- ?? 0..* Fixture in the test script - by reference (uri) -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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(Resource) 
      Reference of the resource --></resource>
 </fixture>
 <profile><!-- ?? 0..* Reference(Resource) Reference of the validation profile --></profile>
 <variable> ?? 0..* BackboneElement  <!-- ?? 0..* Placeholder for evaluated elements -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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]"/><!-- ?? 0..1 The FHIRPath expression against the fixture body -->
  <headerField value="[string]"/><!-- ?? 0..1 HTTP header field name for source -->
  <hint value="[string]"/><!-- ?? 0..1 Hint help text for default value to enter -->
  <path value="[string]"/><!-- ?? 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 BackboneElement  <!-- ?? 0..1 A series of required setup operations before tests are executed -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> ?? 1..* BackboneElement  <!-- ?? 1..* A setup operation or assert to perform -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation> ?? 0..1 BackboneElement  <!-- ?? 0..1 The setup operation to perform -->
    <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <type><!-- ?? 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]"/><!-- ?? 0..1 Explicitly defined path parameters -->
    <requestHeader> ?? 0..* BackboneElement  <!-- ?? 0..* Each operation can have one or more header elements -->
     <modifierExtension><!-- ?? 0..* 
       Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
     <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]"/><!-- ?? 0..1 Fixture Id of body for PUT and POST requests -->
    <targetId value="[id]"/><!-- ?? 0..1 
        Id of fixture used for extracting the [id],  [type], and [vid] for GET requests -->
    <url value="[string]"/><!-- ?? 0..1 Request URL -->
   </operation>
   <assert> ?? 0..1 BackboneElement  <!-- ?? 0..1 The assertion to perform -->
    <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <label value="[string]"/><!-- ?? 0..1 Tracking/logging assertion label -->
    <description value="[string]"/><!-- ?? 0..1 Tracking/reporting assertion description -->
    <direction value="[code]"/><!-- ?? 0..1 response | request   -->
    <compareToSourceId value="[string]"/><!-- ?? 0..1 Id of the source fixture to be evaluated -->
    <compareToSourceExpression value="[string]"/><!-- ?? 0..1 
        The FHIRPath expression to evaluate against the source fixture -->
    <compareToSourcePath value="[string]"/><!-- ?? 0..1 
        XPath or JSONPath expression to evaluate against the source fixture -->
    <contentType value="[code]"/><!-- ?? 0..1 Mime type to compare against the 'Content-Type' header   -->
    <expression value="[string]"/><!-- ?? 0..1 The FHIRPath expression to be evaluated -->
    <headerField value="[string]"/><!-- ?? 0..1 HTTP header field name -->
    <minimumId value="[string]"/><!-- ?? 0..1 Fixture Id of minimum content resource -->
    <navigationLinks value="[boolean]"/><!-- ?? 0..1 Perform validation on navigation links? -->
    <operator value="[code]"/><!-- ?? 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval   -->
    <path value="[string]"/><!-- ?? 0..1 XPath or JSONPath expression -->
    <requestMethod value="[code]"/><!-- ?? 0..1 delete | get | options | patch | post | put | head   -->
    <requestURL value="[string]"/><!-- ?? 0..1 Request URL comparison value -->
    <resource value="[code]"/><!-- ?? 0..1 Resource type   -->
    <response value="[code]"/><!-- ?? 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable   -->
    <responseCode value="[string]"/><!-- ?? 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]"/><!-- ?? 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? -->
   </assert>
  </action>
 </setup>
 <test> ?? 0..* BackboneElement  <!-- ?? 0..* A test in this script -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- ?? 0..1 Tracking/logging name of this test -->
  <description value="[string]"/><!-- ?? 0..1 Tracking/reporting short description of the test -->
  <action> ?? 1..* BackboneElement  <!-- ?? 1..* A test operation or assert to perform -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation  The setup operation to perform --></operation>
   <assert><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.assert  The setup assertion to perform --></assert>
  </action>
 </test>
 <teardown> ?? 0..1 BackboneElement  <!-- ?? 0..1 A series of required clean up steps -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> ?? 1..* BackboneElement  <!-- ?? 1..* One or more teardown operations to perform -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation  The teardown operation to perform --></operation>
  </action>
 </teardown>
</TestScript>
{ // Shareable TestScript
  // from Element: extension
    "meta" : { Meta }, // C?Metadata about the resource
    "implicitRules" : "<uri>", // C?A set of rules under which this content was created
    "language" : "<code>", // C?Language of the resource content
    "text" : { Narrative }, // C?Text summary of the resource, for human interpretation
    "contained" : [{ Resource }], //Contained, inline Resources
    "modifierExtension" : [{ Extension }], // C?Extensions that cannot be ignored
    "url" : "<uri>", // C? R! Canonical identifier for this test script, represented as a URI (globally unique)
    "identifier" : [{ Identifier }], // C?Additional identifier for the test script
    "version" : "<string>", // C? R! Business version of the test script
    "name" : "<string>", // C? R! Name for this test script (computer friendly)
    "title" : "<string>", // C?Name for this test script (human friendly)
    "status" : "<code>", // C? R! draft | active | retired | unknown
    "experimental" : <boolean>, // C? R! For testing purposes, not real usage
    "date" : "<dateTime>", // C?Date last changed
    "publisher" : "<string>", // C? R! Name of the publisher (organization or individual)
    "contact" : [{ ContactDetail }], // C?Contact details for the publisher
    "description" : "<markdown>", // C? R! Natural language description of the test script
    "useContext" : [{ UsageContext }], // C?The context that the content is intended to support
    "jurisdiction" : [{ CodeableConcept }], // C?Intended jurisdiction for test script (if applicable)
    "purpose" : "<markdown>", // C?Why this test script is defined
    "copyright" : "<markdown>", // C?Use and/or publishing restrictions
    "origin" : [{ BackboneElement }], // C?An abstract server representing a client or sender in a message exchange
    "destination" : [{ BackboneElement }], // C?An abstract server representing a destination or receiver in a message exchange
    "metadata" : { BackboneElement }, // C?Required capability that is assumed to function correctly on the FHIR server being tested
    "scope" : [{ BackboneElement }], // C?Indication of the artifact(s) that are tested by this test case
    "fixture" : [{ BackboneElement }], // C?Fixture in the test script - by reference (uri)
    "profile" : [{ Reference(Resource) }], // C?Reference of the validation profile
    "variable" : [{ BackboneElement }], // C?Placeholder for evaluated elements
    "setup" : { BackboneElement }, // C?A series of required setup operations before tests are executed
    "test" : [{ BackboneElement }], // C?A test in this script
    "teardown" : { BackboneElement } // C?A series of required clean up steps
  }

This structure is derived from TestScript.

Summary

Mandatory: 5 elements

Differential View

This structure is derived from TestScript.

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript 1..1TestScriptDescribes a set of tests
... url 1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... version 1..1stringBusiness version of the test script
... experimental 1..1booleanFor testing purposes, not real usage
... description 1..1markdownNatural language description of the test script

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript I1..1TestScriptDescribes a set of tests
... id Σ0..1idLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: Common Languages (preferred)
Max Binding: All Languages: IETF language tag

... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... url Σ1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... identifier Σ0..*IdentifierAdditional identifier for the test script
... version Σ1..1stringBusiness version of the test script
... name ΣI1..1stringName for this test script (computer friendly)
... title Σ0..1stringName for this test script (human friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.

... experimental Σ1..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ1..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 1..1markdownNatural language description of the test script
... useContext Σ0..*UsageContextThe context that the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for test script (if applicable)
Binding: Jurisdiction (extensible): Countries and regions within which this artifact is targeted for use.


... purpose 0..1markdownWhy this test script is defined
... copyright 0..1markdownUse and/or publishing restrictions
... origin 0..*BackboneElementAn abstract server representing a client or sender in a message exchange
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... index 1..1integerThe index of the abstract origin server starting at 1
.... profile 1..1CodingFHIR-Client | FHIR-SDC-FormFiller
Binding: TestScriptProfileOriginType (extensible): The type of origin profile the test system supports.

... destination 0..*BackboneElementAn abstract server representing a destination or receiver in a message exchange
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... index 1..1integerThe index of the abstract destination server starting at 1
.... profile 1..1CodingFHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
Binding: TestScriptProfileDestinationType (extensible): The type of destination profile the test system supports.

... metadata I0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... link 0..*BackboneElementLinks to the FHIR specification
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... url 1..1uriURL to the specification
..... description 0..1stringShort description
.... capability 1..*BackboneElementCapabilities that are assumed to function correctly on the FHIR server being tested
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... required 1..1booleanAre the capabilities required?
..... validated 1..1booleanAre the capabilities validated?
..... description 0..1stringThe expected capabilities of the server
..... origin 0..*integerWhich origin server these requirements apply to
..... destination 0..1integerWhich server these requirements apply to
..... link 0..*uriLinks to the FHIR specification
..... capabilities 1..1canonical(CapabilityStatement)Required Capability Statement
... scope 0..*BackboneElementIndication of the artifact(s) that are tested by this test case
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... artifact 1..1canonical(Resource)The specific conformance artifact being tested
.... conformance 0..1CodeableConceptrequired | optional | strict
Binding: TestScriptScopeConformanceType (extensible): The expectation of whether the test must pass for the system to be considered conformant with the artifact.

.... phase 0..1CodeableConceptunit | integration | production
Binding: TestScriptScopePhaseType (extensible): The phase of testing for this artifact.

... fixture 0..*BackboneElementFixture in the test script - by reference (uri)
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... autocreate 1..1booleanWhether or not to implicitly create the fixture during setup
.... autodelete 1..1booleanWhether or not to implicitly delete the fixture during teardown
.... resource 0..1Reference(Resource)Reference of the resource
... profile 0..*Reference(Resource)Reference of the validation profile
... variable I0..*BackboneElementPlaceholder for evaluated elements
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... name 1..1stringDescriptive name for this variable
.... defaultValue 0..1stringDefault, hard-coded, or user-defined value for this variable
.... description 0..1stringNatural language description of the variable
.... expression 0..1stringThe FHIRPath expression against the fixture body
.... headerField 0..1stringHTTP header field name for source
.... hint 0..1stringHint help text for default value to enter
.... path 0..1stringXPath or JSONPath against the fixture body
.... sourceId 0..1idFixture Id of source expression or headerField within this variable
... setup 0..1BackboneElementA series of required setup operations before tests are executed
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action I1..*BackboneElementA setup operation or assert to perform
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation I0..1BackboneElementThe setup operation to perform
...... id 0..1idUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
...... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
...... type 0..1CodingThe operation code type that will be executed
Binding: TestScriptOperationCode (extensible): FHIR Operation Code Types

...... resource 0..1uriResource type
Binding: FHIRDefinedType (extensible): A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.

...... label 0..1stringTracking/logging operation label
...... description 0..1stringTracking/reporting operation description
...... accept 0..1codeMime type to accept in the payload of the response, with charset etc.
Binding: MimeType (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... contentType 0..1codeMime type of the request payload contents, with charset etc.
Binding: MimeType (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... destination 0..1integerServer responding to the request
...... encodeRequestUrl 1..1booleanWhether or not to send the request url in encoded format
...... method 0..1codedelete | get | options | patch | post | put | head
Binding: TestScriptRequestMethodCode (required): The allowable request method or HTTP operation codes.

...... origin 0..1integerServer initiating the request
...... params 0..1stringExplicitly defined path parameters
...... requestHeader 0..*BackboneElementEach operation can have one or more header elements
....... id 0..1idUnique id for inter-element referencing
....... extension 0..*ExtensionAdditional content defined by implementations
....... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
....... field 1..1stringHTTP header field name
....... value 1..1stringHTTP headerfield value
...... requestId 0..1idFixture Id of mapped request
...... responseId 0..1idFixture Id of mapped response
...... sourceId 0..1idFixture Id of body for PUT and POST requests
...... targetId 0..1idId of fixture used for extracting the [id], [type], and [vid] for GET requests
...... url 0..1stringRequest URL
..... assert I0..1BackboneElementThe assertion to perform
...... id 0..1idUnique id for inter-element referencing
...... extension 0..*ExtensionAdditional content defined by implementations
...... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
...... label 0..1stringTracking/logging assertion label
...... description 0..1stringTracking/reporting assertion description
...... direction 0..1coderesponse | request
Binding: AssertionDirectionType (required): The direction to use for assertions.

...... compareToSourceId 0..1stringId of the source fixture to be evaluated
...... compareToSourceExpression 0..1stringThe FHIRPath expression to evaluate against the source fixture
...... compareToSourcePath 0..1stringXPath or JSONPath expression to evaluate against the source fixture
...... contentType 0..1codeMime type to compare against the 'Content-Type' header
Binding: MimeType (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)


Example General: application/fhir+xml
...... expression 0..1stringThe FHIRPath expression to be evaluated
...... headerField 0..1stringHTTP header field name
...... minimumId 0..1stringFixture Id of minimum content resource
...... navigationLinks 0..1booleanPerform validation on navigation links?
...... operator 0..1codeequals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval
Binding: AssertionOperatorType (required): The type of operator to use for assertions.

...... path 0..1stringXPath or JSONPath expression
...... requestMethod 0..1codedelete | get | options | patch | post | put | head
Binding: TestScriptRequestMethodCode (required): The allowable request method or HTTP operation codes.

...... requestURL 0..1stringRequest URL comparison value
...... resource 0..1codeResource type
Binding: FHIRDefinedType (required): A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.

...... response 0..1codeokay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable
Binding: AssertionResponseTypes (required): The response code to expect in the response.

...... responseCode 0..1stringHTTP response code to test
...... sourceId 0..1idFixture Id of source expression or headerField
...... stopTestOnFail 1..1booleanIf this assert fails, will the current test execution stop?
...... validateProfileId 0..1idProfile Id of validation profile reference
...... value 0..1stringThe value to compare to
...... warningOnly 1..1booleanWill this assert produce a warning only on error?
... test 0..*BackboneElementA test in this script
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... name 0..1stringTracking/logging name of this test
.... description 0..1stringTracking/reporting short description of the test
.... action I1..*BackboneElementA test operation or assert to perform
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation I0..1See operation (TestScript)The setup operation to perform
..... assert I0..1See assert (TestScript)The setup assertion to perform
... teardown 0..1BackboneElementA series of required clean up steps
.... id 0..1idUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action 1..*BackboneElementOne or more teardown operations to perform
..... id 0..1idUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation I1..1See operation (TestScript)The teardown operation to perform

doco Documentation for this format

XML Template

<!-- Shareable TestScript -->doco

<TestScript xmlns="http://hl7.org/fhir"
>
  <!-- from Element: extension -->
 <id value="[id]"/><!-- 0..1 Logical id of this artifact -->
 <meta><!-- ?? 0..1 Meta Metadata about the resource --></meta>
 <implicitRules value="[uri]"/><!-- ?? 0..1 A set of rules under which this content was created -->
 <language value="[code]"/><!-- ?? 0..1 Language of the resource content   -->
 <text><!-- ?? 0..1 Narrative 
     Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored  --></modifierExtension>
 <url value="[uri]"/><!-- ?? 1..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]"/><!-- ?? 1..1 Business version of the test script -->
 <name value="[string]"/><!-- ?? 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]"/><!-- ?? 1..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- ?? 0..1 Date last changed -->
 <publisher value="[string]"/><!-- ?? 1..1 Name of the publisher (organization or individual) -->
 <contact><!-- ?? 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- ?? 1..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 -->
 <origin> ?? 0..* BackboneElement  <!-- ?? 0..* An abstract server representing a client or sender in a message exchange -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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>
 </origin>
 <destination> ?? 0..* BackboneElement  <!-- ?? 0..* An abstract server representing a destination or receiver in a message exchange -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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>
 </destination>
 <metadata> ?? 0..1 BackboneElement  <!-- ?? 0..1 Required capability that is assumed to function correctly on the FHIR server being tested -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <link> ?? 0..* BackboneElement  <!-- ?? 0..* Links to the FHIR specification -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <url value="[uri]"/><!-- ?? 1..1 URL to the specification -->
   <description value="[string]"/><!-- ?? 0..1 Short description -->
  </link>
  <capability> ?? 1..* BackboneElement  <!-- ?? 1..* Capabilities  that are assumed to function correctly on the FHIR server being tested -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <required value="[boolean]"/><!-- ?? 1..1 Are the capabilities required? -->
   <validated value="[boolean]"/><!-- ?? 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 value="[canonical]"/><!-- ?? 1..1 Required Capability Statement -->
  </capability>
 </metadata>
 <scope> ?? 0..* BackboneElement  <!-- ?? 0..* Indication of the artifact(s) that are tested by this test case -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <artifact value="[canonical]"/><!-- ?? 1..1 The specific conformance artifact being tested -->
  <conformance><!-- ?? 0..1 CodeableConcept required | optional | strict   --></conformance>
  <phase><!-- ?? 0..1 CodeableConcept unit | integration | production   --></phase>
 </scope>
 <fixture> ?? 0..* BackboneElement  <!-- ?? 0..* Fixture in the test script - by reference (uri) -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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(Resource) 
      Reference of the resource --></resource>
 </fixture>
 <profile><!-- ?? 0..* Reference(Resource) Reference of the validation profile --></profile>
 <variable> ?? 0..* BackboneElement  <!-- ?? 0..* Placeholder for evaluated elements -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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]"/><!-- ?? 0..1 The FHIRPath expression against the fixture body -->
  <headerField value="[string]"/><!-- ?? 0..1 HTTP header field name for source -->
  <hint value="[string]"/><!-- ?? 0..1 Hint help text for default value to enter -->
  <path value="[string]"/><!-- ?? 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 BackboneElement  <!-- ?? 0..1 A series of required setup operations before tests are executed -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> ?? 1..* BackboneElement  <!-- ?? 1..* A setup operation or assert to perform -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation> ?? 0..1 BackboneElement  <!-- ?? 0..1 The setup operation to perform -->
    <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <type><!-- ?? 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]"/><!-- ?? 0..1 Explicitly defined path parameters -->
    <requestHeader> ?? 0..* BackboneElement  <!-- ?? 0..* Each operation can have one or more header elements -->
     <modifierExtension><!-- ?? 0..* 
       Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
     <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]"/><!-- ?? 0..1 Fixture Id of body for PUT and POST requests -->
    <targetId value="[id]"/><!-- ?? 0..1 
        Id of fixture used for extracting the [id],  [type], and [vid] for GET requests -->
    <url value="[string]"/><!-- ?? 0..1 Request URL -->
   </operation>
   <assert> ?? 0..1 BackboneElement  <!-- ?? 0..1 The assertion to perform -->
    <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <label value="[string]"/><!-- ?? 0..1 Tracking/logging assertion label -->
    <description value="[string]"/><!-- ?? 0..1 Tracking/reporting assertion description -->
    <direction value="[code]"/><!-- ?? 0..1 response | request   -->
    <compareToSourceId value="[string]"/><!-- ?? 0..1 Id of the source fixture to be evaluated -->
    <compareToSourceExpression value="[string]"/><!-- ?? 0..1 
        The FHIRPath expression to evaluate against the source fixture -->
    <compareToSourcePath value="[string]"/><!-- ?? 0..1 
        XPath or JSONPath expression to evaluate against the source fixture -->
    <contentType value="[code]"/><!-- ?? 0..1 Mime type to compare against the 'Content-Type' header   -->
    <expression value="[string]"/><!-- ?? 0..1 The FHIRPath expression to be evaluated -->
    <headerField value="[string]"/><!-- ?? 0..1 HTTP header field name -->
    <minimumId value="[string]"/><!-- ?? 0..1 Fixture Id of minimum content resource -->
    <navigationLinks value="[boolean]"/><!-- ?? 0..1 Perform validation on navigation links? -->
    <operator value="[code]"/><!-- ?? 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval   -->
    <path value="[string]"/><!-- ?? 0..1 XPath or JSONPath expression -->
    <requestMethod value="[code]"/><!-- ?? 0..1 delete | get | options | patch | post | put | head   -->
    <requestURL value="[string]"/><!-- ?? 0..1 Request URL comparison value -->
    <resource value="[code]"/><!-- ?? 0..1 Resource type   -->
    <response value="[code]"/><!-- ?? 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable   -->
    <responseCode value="[string]"/><!-- ?? 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]"/><!-- ?? 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? -->
   </assert>
  </action>
 </setup>
 <test> ?? 0..* BackboneElement  <!-- ?? 0..* A test in this script -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- ?? 0..1 Tracking/logging name of this test -->
  <description value="[string]"/><!-- ?? 0..1 Tracking/reporting short description of the test -->
  <action> ?? 1..* BackboneElement  <!-- ?? 1..* A test operation or assert to perform -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation  The setup operation to perform --></operation>
   <assert><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.assert  The setup assertion to perform --></assert>
  </action>
 </test>
 <teardown> ?? 0..1 BackboneElement  <!-- ?? 0..1 A series of required clean up steps -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> ?? 1..* BackboneElement  <!-- ?? 1..* One or more teardown operations to perform -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation><!-- See http://hl7.org/fhir/StructureDefinition/TestScript#TestScript.setup.action.operation  The teardown operation to perform --></operation>
  </action>
 </teardown>
</TestScript>

JSON Template

{ // Shareable TestScript
  // from Element: extension
    "meta" : { Meta }, // C?Metadata about the resource
    "implicitRules" : "<uri>", // C?A set of rules under which this content was created
    "language" : "<code>", // C?Language of the resource content
    "text" : { Narrative }, // C?Text summary of the resource, for human interpretation
    "contained" : [{ Resource }], //Contained, inline Resources
    "modifierExtension" : [{ Extension }], // C?Extensions that cannot be ignored
    "url" : "<uri>", // C? R! Canonical identifier for this test script, represented as a URI (globally unique)
    "identifier" : [{ Identifier }], // C?Additional identifier for the test script
    "version" : "<string>", // C? R! Business version of the test script
    "name" : "<string>", // C? R! Name for this test script (computer friendly)
    "title" : "<string>", // C?Name for this test script (human friendly)
    "status" : "<code>", // C? R! draft | active | retired | unknown
    "experimental" : <boolean>, // C? R! For testing purposes, not real usage
    "date" : "<dateTime>", // C?Date last changed
    "publisher" : "<string>", // C? R! Name of the publisher (organization or individual)
    "contact" : [{ ContactDetail }], // C?Contact details for the publisher
    "description" : "<markdown>", // C? R! Natural language description of the test script
    "useContext" : [{ UsageContext }], // C?The context that the content is intended to support
    "jurisdiction" : [{ CodeableConcept }], // C?Intended jurisdiction for test script (if applicable)
    "purpose" : "<markdown>", // C?Why this test script is defined
    "copyright" : "<markdown>", // C?Use and/or publishing restrictions
    "origin" : [{ BackboneElement }], // C?An abstract server representing a client or sender in a message exchange
    "destination" : [{ BackboneElement }], // C?An abstract server representing a destination or receiver in a message exchange
    "metadata" : { BackboneElement }, // C?Required capability that is assumed to function correctly on the FHIR server being tested
    "scope" : [{ BackboneElement }], // C?Indication of the artifact(s) that are tested by this test case
    "fixture" : [{ BackboneElement }], // C?Fixture in the test script - by reference (uri)
    "profile" : [{ Reference(Resource) }], // C?Reference of the validation profile
    "variable" : [{ BackboneElement }], // C?Placeholder for evaluated elements
    "setup" : { BackboneElement }, // C?A series of required setup operations before tests are executed
    "test" : [{ BackboneElement }], // C?A test in this script
    "teardown" : { BackboneElement } // C?A series of required clean up steps
  }

 

Alternate definitions: Master Definition (XML, JSON), Schematron

PathNameConformanceValueSet
TestScript.languageCommon LanguagespreferredCommon Languages
TestScript.statusPublicationStatusrequiredPublicationStatus
TestScript.jurisdictionJurisdictionextensibleJurisdiction
TestScript.origin.profileTestScriptProfileOriginTypeextensibleTestScriptProfileOriginType
TestScript.destination.profileTestScriptProfileDestinationTypeextensibleTestScriptProfileDestinationType
TestScript.scope.conformanceTestScriptScopeConformanceTypeextensibleTestScriptScopeConformanceType
TestScript.scope.phaseTestScriptScopePhaseTypeextensibleTestScriptScopePhaseType
TestScript.setup.action.operation.typeTestScriptOperationCodeextensibleTestScriptOperationCode
TestScript.setup.action.operation.resourceFHIRDefinedTypeextensibleFHIRDefinedType
TestScript.setup.action.operation.acceptMimeTyperequiredMimeType
TestScript.setup.action.operation.contentTypeMimeTyperequiredMimeType
TestScript.setup.action.operation.methodTestScriptRequestMethodCoderequiredTestScriptRequestMethodCode
TestScript.setup.action.assert.directionAssertionDirectionTyperequiredAssertionDirectionType
TestScript.setup.action.assert.contentTypeMimeTyperequiredMimeType
TestScript.setup.action.assert.operatorAssertionOperatorTyperequiredAssertionOperatorType
TestScript.setup.action.assert.requestMethodTestScriptRequestMethodCoderequiredTestScriptRequestMethodCode
TestScript.setup.action.assert.resourceFHIRDefinedTyperequiredFHIRDefinedType
TestScript.setup.action.assert.responseAssertionResponseTypesrequiredAssertionResponseTypes
.