Release 5 Ballot

This page is part of the FHIR Specification (v5.0.0-ballot: R5 Ballot - see ballot notes). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

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

The canonical 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+1000 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 indicates the differences between this profile and the base TestScript structure.

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

This provides the consolidated view (aka snapshot) of the profile after applying the changes in this profile to the base TestScript structure.

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript C icon1..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): IETF language tag

Additional BindingsPurpose
All LanguagesMax Binding
... 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 ΣC icon1..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
... versionAlgorithm[x] Σ0..1How to compare versions
Binding: Version Algorithm (extensible)
.... versionAlgorithmStringstring
.... versionAlgorithmCodingCoding
... name ΣC icon1..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/steward (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
... copyrightLabel 0..1stringCopyright holder and year(s)
... origin 0..*BackboneElementAn abstract server representing a client or sender in a message exchange
.... id 0..1stringUnique 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..1stringUnique 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 C icon0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
.... id 0..1stringUnique 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..1stringUnique 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..1stringUnique 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..1stringUnique 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..1stringUnique 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 C icon0..*BackboneElementPlaceholder for evaluated elements
.... id 0..1stringUnique 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..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action C icon1..*BackboneElementA setup operation or assert to perform
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon0..1BackboneElementThe setup operation to perform
...... id 0..1stringUnique 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: Concrete FHIR Types (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..1stringUnique 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 C icon0..1BackboneElementThe assertion to perform
...... id 0..1stringUnique 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..1uriResource type
Binding: Concrete FHIR Types (extensible): 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..1stringUnique 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 C icon1..*BackboneElementA test operation or assert to perform
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon0..1See operation (TestScript)The setup operation to perform
..... assert C icon0..1See assert (TestScript)The setup assertion to perform
... teardown 0..1BackboneElementA series of required clean up steps
.... id 0..1stringUnique 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..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon1..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><!-- I 0..1 Meta Metadata about the resource --></meta>
 <implicitRules value="[uri]"/><!-- I 0..1 A set of rules under which this content was created -->
 <language value="[code]"/><!-- I 0..1 Language of the resource content   -->
 <text><!-- I 0..1 Narrative 
     Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored  --></modifierExtension>
 <url value="[uri]"/><!-- I 1..1 Canonical identifier for this test script, represented as a URI (globally unique) -->
 <identifier><!-- I 0..* Identifier 
     Additional identifier for the test script --></identifier>
 <version value="[string]"/><!-- I 1..1 Business version of the test script -->
 <versionAlgorithm[x]><!-- I 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]"/><!-- I 0..1 Name for this test script (human friendly) -->
 <status value="[code]"/><!-- I 1..1 draft | active | retired | unknown   -->
 <experimental value="[boolean]"/><!-- I 1..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- I 0..1 Date last changed -->
 <publisher value="[string]"/><!-- I 1..1 Name of the publisher/steward (organization or individual) -->
 <contact><!-- I 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- I 1..1 Natural language description of the test script -->
 <useContext><!-- I 0..* UsageContext 
     The context that the content is intended to support --></useContext>
 <jurisdiction><!-- I 0..* CodeableConcept Intended jurisdiction for test script (if applicable)   --></jurisdiction>
 <purpose value="[markdown]"/><!-- I 0..1 Why this test script is defined -->
 <copyright value="[markdown]"/><!-- I 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- I 0..1 Copyright holder and year(s) -->
 <origin> I 0..* BackboneElement  <!-- I 0..* An abstract server representing a client or sender in a message exchange -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <index value="[integer]"/><!-- I 1..1 The index of the abstract origin server starting at 1 -->
  <profile><!-- I 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller   --></profile>
 </origin>
 <destination> I 0..* BackboneElement  <!-- I 0..* An abstract server representing a destination or receiver in a message exchange -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <index value="[integer]"/><!-- I 1..1 The index of the abstract destination server starting at 1 -->
  <profile><!-- I 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor   --></profile>
 </destination>
 <metadata> I 0..1 BackboneElement  <!-- I 0..1 Required capability that is assumed to function correctly on the FHIR server being tested -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <link> I 0..* BackboneElement  <!-- I 0..* Links to the FHIR specification -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <url value="[uri]"/><!-- I 1..1 URL to the specification -->
   <description value="[string]"/><!-- I 0..1 Short description -->
  </link>
  <capability> I 1..* BackboneElement  <!-- I 1..* Capabilities  that are assumed to function correctly on the FHIR server being tested -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <required value="[boolean]"/><!-- I 1..1 Are the capabilities required? -->
   <validated value="[boolean]"/><!-- I 1..1 Are the capabilities validated? -->
   <description value="[string]"/><!-- I 0..1 The expected capabilities of the server -->
   <origin value="[integer]"/><!-- I 0..* Which origin server these requirements apply to -->
   <destination value="[integer]"/><!-- I 0..1 Which server these requirements apply to -->
   <link value="[uri]"/><!-- I 0..* Links to the FHIR specification -->
   <capabilities value="[canonical]"/><!-- I 1..1 Required Capability Statement -->
  </capability>
 </metadata>
 <scope> I 0..* BackboneElement  <!-- I 0..* Indication of the artifact(s) that are tested by this test case -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <artifact value="[canonical]"/><!-- I 1..1 The specific conformance artifact being tested -->
  <conformance><!-- I 0..1 CodeableConcept required | optional | strict   --></conformance>
  <phase><!-- I 0..1 CodeableConcept unit | integration | production   --></phase>
 </scope>
 <fixture> I 0..* BackboneElement  <!-- I 0..* Fixture in the test script - by reference (uri) -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <autocreate value="[boolean]"/><!-- I 1..1 Whether or not to implicitly create the fixture during setup -->
  <autodelete value="[boolean]"/><!-- I 1..1 Whether or not to implicitly delete the fixture during teardown -->
  <resource><!-- I 0..1 Reference(Resource) 
      Reference of the resource --></resource>
 </fixture>
 <profile><!-- I 0..* Reference(Resource) Reference of the validation profile --></profile>
 <variable> I 0..* BackboneElement  <!-- I 0..* Placeholder for evaluated elements -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- I 1..1 Descriptive name for this variable -->
  <defaultValue value="[string]"/><!-- I 0..1 Default, hard-coded, or user-defined value for this variable -->
  <description value="[string]"/><!-- I 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]"/><!-- I 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]"/><!-- I 0..1 Fixture Id of source expression or headerField within this variable -->
 </variable>
 <setup> I 0..1 BackboneElement  <!-- I 0..1 A series of required setup operations before tests are executed -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> I 1..* BackboneElement  <!-- I 1..* A setup operation or assert to perform -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation> I 0..1 BackboneElement  <!-- I 0..1 The setup operation to perform -->
    <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <type><!-- I 0..1 Coding The operation code type that will be executed   --></type>
    <resource value="[uri]"/><!-- I 0..1 Resource type   -->
    <label value="[string]"/><!-- I 0..1 Tracking/logging operation label -->
    <description value="[string]"/><!-- I 0..1 Tracking/reporting operation description -->
    <accept value="[code]"/><!-- I 0..1 Mime type to accept in the payload of the response, with charset etc.   -->
    <contentType value="[code]"/><!-- I 0..1 Mime type of the request payload contents, with charset etc.   -->
    <destination value="[integer]"/><!-- I 0..1 Server responding to the request -->
    <encodeRequestUrl value="[boolean]"/><!-- I 1..1 
        Whether or not to send the request url in encoded format -->
    <method value="[code]"/><!-- I 0..1 delete | get | options | patch | post | put | head   -->
    <origin value="[integer]"/><!-- I 0..1 Server initiating the request -->
    <params value="[string]"/><!-- I 0..1 Explicitly defined path parameters -->
    <requestHeader> I 0..* BackboneElement  <!-- I 0..* Each operation can have one or more header elements -->
     <modifierExtension><!-- I 0..* 
       Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
     <field value="[string]"/><!-- I 1..1 HTTP header field name -->
     <value value="[string]"/><!-- I 1..1 HTTP headerfield value -->
    </requestHeader>
    <requestId value="[id]"/><!-- I 0..1 Fixture Id of mapped request -->
    <responseId value="[id]"/><!-- I 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 BackboneElement  <!-- I 0..1 The assertion to perform -->
    <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <label value="[string]"/><!-- I 0..1 Tracking/logging assertion label -->
    <description value="[string]"/><!-- I 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   -->
    <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]"/><!-- I 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval   -->
    <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]"/><!-- I 0..1 Request URL comparison value -->
    <resource value="[uri]"/><!-- I 0..1 Resource type   -->
    <response value="[code]"/><!-- I 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable   -->
    <responseCode value="[string]"/><!-- I 0..1 HTTP response code to test -->
    <sourceId value="[id]"/><!-- I 0..1 Fixture Id of source expression or headerField -->
    <stopTestOnFail value="[boolean]"/><!-- I 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]"/><!-- I 0..1 The value to compare to -->
    <warningOnly value="[boolean]"/><!-- I 1..1 Will this assert produce a warning only on error? -->
   </assert>
  </action>
 </setup>
 <test> I 0..* BackboneElement  <!-- I 0..* A test in this script -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- I 0..1 Tracking/logging name of this test -->
  <description value="[string]"/><!-- I 0..1 Tracking/reporting short description of the test -->
  <action> I 1..* BackboneElement  <!-- I 1..* A test operation or assert to perform -->
   <modifierExtension><!-- I 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> I 0..1 BackboneElement  <!-- I 0..1 A series of required clean up steps -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> I 1..* BackboneElement  <!-- I 1..* One or more teardown operations to perform -->
   <modifierExtension><!-- I 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 }, // IMetadata about the resource
    "implicitRules" : "<uri>", // IA set of rules under which this content was created
    "language" : "<code>", // ILanguage of the resource content
    "text" : { Narrative }, // IText summary of the resource, for human interpretation
    "contained" : [{ Resource }], //Contained, inline Resources
    "modifierExtension" : [{ Extension }], // IExtensions that cannot be ignored
    "url" : "<uri>", // I R! Canonical identifier for this test script, represented as a URI (globally unique)
    "identifier" : [{ Identifier }], // IAdditional identifier for the test script
    "version" : "<string>", // I R! Business version of the test script
  // value[x]: How to compare versions. One of these 2:
    "versionAlgorithmString" : "<string>", // IHow to compare versions
    "versionAlgorithmCoding" : { Coding }, // IHow to compare versions
    "name" : "<string>", // I R! Name for this test script (computer friendly)
    "title" : "<string>", // IName for this test script (human friendly)
    "status" : "<code>", // I R! draft | active | retired | unknown
    "experimental" : <boolean>, // I R! For testing purposes, not real usage
    "date" : "<dateTime>", // IDate last changed
    "publisher" : "<string>", // I R! Name of the publisher/steward (organization or individual)
    "contact" : [{ ContactDetail }], // IContact details for the publisher
    "description" : "<markdown>", // I R! Natural language description of the test script
    "useContext" : [{ UsageContext }], // IThe context that the content is intended to support
    "jurisdiction" : [{ CodeableConcept }], // IIntended jurisdiction for test script (if applicable)
    "purpose" : "<markdown>", // IWhy this test script is defined
    "copyright" : "<markdown>", // IUse and/or publishing restrictions
    "copyrightLabel" : "<string>", // ICopyright holder and year(s)
    "origin" : [{ BackboneElement }], // IAn abstract server representing a client or sender in a message exchange
    "destination" : [{ BackboneElement }], // IAn abstract server representing a destination or receiver in a message exchange
    "metadata" : { BackboneElement }, // IRequired capability that is assumed to function correctly on the FHIR server being tested
    "scope" : [{ BackboneElement }], // IIndication of the artifact(s) that are tested by this test case
    "fixture" : [{ BackboneElement }], // IFixture in the test script - by reference (uri)
    "profile" : [{ Reference(Resource) }], // IReference of the validation profile
    "variable" : [{ BackboneElement }], // IPlaceholder for evaluated elements
    "setup" : { BackboneElement }, // IA series of required setup operations before tests are executed
    "test" : [{ BackboneElement }], // IA test in this script
    "teardown" : { BackboneElement } // IA series of required clean up steps
  }

This structure is derived from TestScript.

Summary

Mandatory: 5 elements

Differential View

This indicates the differences between this profile and the base TestScript structure.

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

This provides the consolidated view (aka snapshot) of the profile after applying the changes in this profile to the base TestScript structure.

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript C icon1..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): IETF language tag

Additional BindingsPurpose
All LanguagesMax Binding
... 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 ΣC icon1..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
... versionAlgorithm[x] Σ0..1How to compare versions
Binding: Version Algorithm (extensible)
.... versionAlgorithmStringstring
.... versionAlgorithmCodingCoding
... name ΣC icon1..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/steward (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
... copyrightLabel 0..1stringCopyright holder and year(s)
... origin 0..*BackboneElementAn abstract server representing a client or sender in a message exchange
.... id 0..1stringUnique 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..1stringUnique 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 C icon0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
.... id 0..1stringUnique 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..1stringUnique 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..1stringUnique 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..1stringUnique 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..1stringUnique 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 C icon0..*BackboneElementPlaceholder for evaluated elements
.... id 0..1stringUnique 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..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... action C icon1..*BackboneElementA setup operation or assert to perform
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon0..1BackboneElementThe setup operation to perform
...... id 0..1stringUnique 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: Concrete FHIR Types (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..1stringUnique 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 C icon0..1BackboneElementThe assertion to perform
...... id 0..1stringUnique 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..1uriResource type
Binding: Concrete FHIR Types (extensible): 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..1stringUnique 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 C icon1..*BackboneElementA test operation or assert to perform
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon0..1See operation (TestScript)The setup operation to perform
..... assert C icon0..1See assert (TestScript)The setup assertion to perform
... teardown 0..1BackboneElementA series of required clean up steps
.... id 0..1stringUnique 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..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... operation C icon1..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><!-- I 0..1 Meta Metadata about the resource --></meta>
 <implicitRules value="[uri]"/><!-- I 0..1 A set of rules under which this content was created -->
 <language value="[code]"/><!-- I 0..1 Language of the resource content   -->
 <text><!-- I 0..1 Narrative 
     Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored  --></modifierExtension>
 <url value="[uri]"/><!-- I 1..1 Canonical identifier for this test script, represented as a URI (globally unique) -->
 <identifier><!-- I 0..* Identifier 
     Additional identifier for the test script --></identifier>
 <version value="[string]"/><!-- I 1..1 Business version of the test script -->
 <versionAlgorithm[x]><!-- I 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]"/><!-- I 0..1 Name for this test script (human friendly) -->
 <status value="[code]"/><!-- I 1..1 draft | active | retired | unknown   -->
 <experimental value="[boolean]"/><!-- I 1..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- I 0..1 Date last changed -->
 <publisher value="[string]"/><!-- I 1..1 Name of the publisher/steward (organization or individual) -->
 <contact><!-- I 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- I 1..1 Natural language description of the test script -->
 <useContext><!-- I 0..* UsageContext 
     The context that the content is intended to support --></useContext>
 <jurisdiction><!-- I 0..* CodeableConcept Intended jurisdiction for test script (if applicable)   --></jurisdiction>
 <purpose value="[markdown]"/><!-- I 0..1 Why this test script is defined -->
 <copyright value="[markdown]"/><!-- I 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- I 0..1 Copyright holder and year(s) -->
 <origin> I 0..* BackboneElement  <!-- I 0..* An abstract server representing a client or sender in a message exchange -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <index value="[integer]"/><!-- I 1..1 The index of the abstract origin server starting at 1 -->
  <profile><!-- I 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller   --></profile>
 </origin>
 <destination> I 0..* BackboneElement  <!-- I 0..* An abstract server representing a destination or receiver in a message exchange -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <index value="[integer]"/><!-- I 1..1 The index of the abstract destination server starting at 1 -->
  <profile><!-- I 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor   --></profile>
 </destination>
 <metadata> I 0..1 BackboneElement  <!-- I 0..1 Required capability that is assumed to function correctly on the FHIR server being tested -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <link> I 0..* BackboneElement  <!-- I 0..* Links to the FHIR specification -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <url value="[uri]"/><!-- I 1..1 URL to the specification -->
   <description value="[string]"/><!-- I 0..1 Short description -->
  </link>
  <capability> I 1..* BackboneElement  <!-- I 1..* Capabilities  that are assumed to function correctly on the FHIR server being tested -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <required value="[boolean]"/><!-- I 1..1 Are the capabilities required? -->
   <validated value="[boolean]"/><!-- I 1..1 Are the capabilities validated? -->
   <description value="[string]"/><!-- I 0..1 The expected capabilities of the server -->
   <origin value="[integer]"/><!-- I 0..* Which origin server these requirements apply to -->
   <destination value="[integer]"/><!-- I 0..1 Which server these requirements apply to -->
   <link value="[uri]"/><!-- I 0..* Links to the FHIR specification -->
   <capabilities value="[canonical]"/><!-- I 1..1 Required Capability Statement -->
  </capability>
 </metadata>
 <scope> I 0..* BackboneElement  <!-- I 0..* Indication of the artifact(s) that are tested by this test case -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <artifact value="[canonical]"/><!-- I 1..1 The specific conformance artifact being tested -->
  <conformance><!-- I 0..1 CodeableConcept required | optional | strict   --></conformance>
  <phase><!-- I 0..1 CodeableConcept unit | integration | production   --></phase>
 </scope>
 <fixture> I 0..* BackboneElement  <!-- I 0..* Fixture in the test script - by reference (uri) -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <autocreate value="[boolean]"/><!-- I 1..1 Whether or not to implicitly create the fixture during setup -->
  <autodelete value="[boolean]"/><!-- I 1..1 Whether or not to implicitly delete the fixture during teardown -->
  <resource><!-- I 0..1 Reference(Resource) 
      Reference of the resource --></resource>
 </fixture>
 <profile><!-- I 0..* Reference(Resource) Reference of the validation profile --></profile>
 <variable> I 0..* BackboneElement  <!-- I 0..* Placeholder for evaluated elements -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- I 1..1 Descriptive name for this variable -->
  <defaultValue value="[string]"/><!-- I 0..1 Default, hard-coded, or user-defined value for this variable -->
  <description value="[string]"/><!-- I 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]"/><!-- I 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]"/><!-- I 0..1 Fixture Id of source expression or headerField within this variable -->
 </variable>
 <setup> I 0..1 BackboneElement  <!-- I 0..1 A series of required setup operations before tests are executed -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> I 1..* BackboneElement  <!-- I 1..* A setup operation or assert to perform -->
   <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <operation> I 0..1 BackboneElement  <!-- I 0..1 The setup operation to perform -->
    <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <type><!-- I 0..1 Coding The operation code type that will be executed   --></type>
    <resource value="[uri]"/><!-- I 0..1 Resource type   -->
    <label value="[string]"/><!-- I 0..1 Tracking/logging operation label -->
    <description value="[string]"/><!-- I 0..1 Tracking/reporting operation description -->
    <accept value="[code]"/><!-- I 0..1 Mime type to accept in the payload of the response, with charset etc.   -->
    <contentType value="[code]"/><!-- I 0..1 Mime type of the request payload contents, with charset etc.   -->
    <destination value="[integer]"/><!-- I 0..1 Server responding to the request -->
    <encodeRequestUrl value="[boolean]"/><!-- I 1..1 
        Whether or not to send the request url in encoded format -->
    <method value="[code]"/><!-- I 0..1 delete | get | options | patch | post | put | head   -->
    <origin value="[integer]"/><!-- I 0..1 Server initiating the request -->
    <params value="[string]"/><!-- I 0..1 Explicitly defined path parameters -->
    <requestHeader> I 0..* BackboneElement  <!-- I 0..* Each operation can have one or more header elements -->
     <modifierExtension><!-- I 0..* 
       Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
     <field value="[string]"/><!-- I 1..1 HTTP header field name -->
     <value value="[string]"/><!-- I 1..1 HTTP headerfield value -->
    </requestHeader>
    <requestId value="[id]"/><!-- I 0..1 Fixture Id of mapped request -->
    <responseId value="[id]"/><!-- I 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 BackboneElement  <!-- I 0..1 The assertion to perform -->
    <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
    <label value="[string]"/><!-- I 0..1 Tracking/logging assertion label -->
    <description value="[string]"/><!-- I 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   -->
    <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]"/><!-- I 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval   -->
    <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]"/><!-- I 0..1 Request URL comparison value -->
    <resource value="[uri]"/><!-- I 0..1 Resource type   -->
    <response value="[code]"/><!-- I 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable   -->
    <responseCode value="[string]"/><!-- I 0..1 HTTP response code to test -->
    <sourceId value="[id]"/><!-- I 0..1 Fixture Id of source expression or headerField -->
    <stopTestOnFail value="[boolean]"/><!-- I 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]"/><!-- I 0..1 The value to compare to -->
    <warningOnly value="[boolean]"/><!-- I 1..1 Will this assert produce a warning only on error? -->
   </assert>
  </action>
 </setup>
 <test> I 0..* BackboneElement  <!-- I 0..* A test in this script -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <name value="[string]"/><!-- I 0..1 Tracking/logging name of this test -->
  <description value="[string]"/><!-- I 0..1 Tracking/reporting short description of the test -->
  <action> I 1..* BackboneElement  <!-- I 1..* A test operation or assert to perform -->
   <modifierExtension><!-- I 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> I 0..1 BackboneElement  <!-- I 0..1 A series of required clean up steps -->
  <modifierExtension><!-- I 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <action> I 1..* BackboneElement  <!-- I 1..* One or more teardown operations to perform -->
   <modifierExtension><!-- I 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 }, // IMetadata about the resource
    "implicitRules" : "<uri>", // IA set of rules under which this content was created
    "language" : "<code>", // ILanguage of the resource content
    "text" : { Narrative }, // IText summary of the resource, for human interpretation
    "contained" : [{ Resource }], //Contained, inline Resources
    "modifierExtension" : [{ Extension }], // IExtensions that cannot be ignored
    "url" : "<uri>", // I R! Canonical identifier for this test script, represented as a URI (globally unique)
    "identifier" : [{ Identifier }], // IAdditional identifier for the test script
    "version" : "<string>", // I R! Business version of the test script
  // value[x]: How to compare versions. One of these 2:
    "versionAlgorithmString" : "<string>", // IHow to compare versions
    "versionAlgorithmCoding" : { Coding }, // IHow to compare versions
    "name" : "<string>", // I R! Name for this test script (computer friendly)
    "title" : "<string>", // IName for this test script (human friendly)
    "status" : "<code>", // I R! draft | active | retired | unknown
    "experimental" : <boolean>, // I R! For testing purposes, not real usage
    "date" : "<dateTime>", // IDate last changed
    "publisher" : "<string>", // I R! Name of the publisher/steward (organization or individual)
    "contact" : [{ ContactDetail }], // IContact details for the publisher
    "description" : "<markdown>", // I R! Natural language description of the test script
    "useContext" : [{ UsageContext }], // IThe context that the content is intended to support
    "jurisdiction" : [{ CodeableConcept }], // IIntended jurisdiction for test script (if applicable)
    "purpose" : "<markdown>", // IWhy this test script is defined
    "copyright" : "<markdown>", // IUse and/or publishing restrictions
    "copyrightLabel" : "<string>", // ICopyright holder and year(s)
    "origin" : [{ BackboneElement }], // IAn abstract server representing a client or sender in a message exchange
    "destination" : [{ BackboneElement }], // IAn abstract server representing a destination or receiver in a message exchange
    "metadata" : { BackboneElement }, // IRequired capability that is assumed to function correctly on the FHIR server being tested
    "scope" : [{ BackboneElement }], // IIndication of the artifact(s) that are tested by this test case
    "fixture" : [{ BackboneElement }], // IFixture in the test script - by reference (uri)
    "profile" : [{ Reference(Resource) }], // IReference of the validation profile
    "variable" : [{ BackboneElement }], // IPlaceholder for evaluated elements
    "setup" : { BackboneElement }, // IA series of required setup operations before tests are executed
    "test" : [{ BackboneElement }], // IA test in this script
    "teardown" : { BackboneElement } // IA series of required clean up steps
  }

 

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

PathNameConformanceValueSet
TestScript.languageCommon LanguagespreferredCommon Languages
TestScript.versionAlgorithm[x]Version AlgorithmextensibleVersion Algorithm
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.resourceConcrete FHIR TypesextensibleConcrete FHIR Types
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.resourceConcrete FHIR TypesextensibleConcrete FHIR Types
TestScript.setup.action.assert.responseAssertionResponseTypesrequiredAssertionResponseTypes
.