0.0.1 - ci-build

TestScriptEngineIG - Local Development build (v0.0.1). See the Directory of published versions

Resource Profile: TestScript Engine TestScript

Official URL: https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/testscript-engine-testscript Version: 0.0.1
Active as of 2022-12-29 Computable Name: TestScriptEngineScript

TestScript with extensions specific to the MITRE FHIR Foundry testscript-engine and testscript-generator

Execution Examples

Use of this TestScript profile and the assert-subtest and assert-subtest-each extensions can be seen using the testscript-engine. Two specific examples of commands to use one the engine is installed:

Usage:

Formal Views of Profile Content

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

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript C0..*TestScriptDescribes a set of tests
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... url Σ1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.


doco Documentation for this format

Terminology Bindings

PathConformanceValueSet
TestScript.statusrequiredPublicationStatus

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorTestScriptIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorTestScriptIf the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
: contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorTestScriptIf a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5errorTestScriptIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceTestScriptA resource should have narrative for robust management
: text.`div`.exists()
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tst-0warningTestScriptName should be usable as an identifier for the module by machine processing applications such as code generation
: name.matches('[A-Z]([A-Za-z0-9_]){0,254}')
NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript C0..*TestScriptDescribes 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: CommonLanguages (preferred): A human language.

Additional BindingsPurpose
AllLanguagesMax 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 Σ1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... identifier Σ0..1IdentifierAdditional identifier for the test script
... version Σ0..1stringBusiness version of the test script
... name ΣC1..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 Σ0..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 0..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 ValueSet (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..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 C0..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
... 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 C0..*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 C1..*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 C0..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): The allowable operation code types.

...... 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.

...... 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: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.


Example General: application/fhir+xml
...... contentType 0..1codeMime type of the request payload contents, with charset etc.
Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.


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 C0..1BackboneElementThe assertion to perform
...... id 0..1stringUnique id for inter-element referencing
...... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
...... AssertSubtest 0..1(Complex)Extension
URL: https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/assert-subtest
...... AssertSubtestEach 0..1(Complex)Extension
URL: https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/assert-subtest-each
...... 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 type of direction to use for assertion.

...... 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: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.


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 assertion.

...... 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 type of response code to use for assertion.

...... responseCode 0..1stringHTTP response code to test
...... sourceId 0..1idFixture Id of source expression or headerField
...... 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 C1..*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 C0..1See operation (TestScript)The setup operation to perform
..... assert C0..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 C1..1See operation (TestScript)The teardown operation to perform

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet
TestScript.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
TestScript.statusrequiredPublicationStatus
TestScript.jurisdictionextensibleJurisdiction ValueSet
TestScript.origin.profileextensibleTestScriptProfileOriginType
TestScript.destination.profileextensibleTestScriptProfileDestinationType
TestScript.setup.action.operation.typeextensibleTestScriptOperationCode
TestScript.setup.action.operation.resourcerequiredFHIRDefinedType
TestScript.setup.action.operation.acceptrequiredMime Types (a valid code from urn:ietf:bcp:13)
TestScript.setup.action.operation.contentTyperequiredMime Types (a valid code from urn:ietf:bcp:13)
TestScript.setup.action.operation.methodrequiredTestScriptRequestMethodCode
TestScript.setup.action.assert.directionrequiredAssertionDirectionType
TestScript.setup.action.assert.contentTyperequiredMime Types (a valid code from urn:ietf:bcp:13)
TestScript.setup.action.assert.operatorrequiredAssertionOperatorType
TestScript.setup.action.assert.requestMethodrequiredTestScriptRequestMethodCode
TestScript.setup.action.assert.resourcerequiredFHIRDefinedType
TestScript.setup.action.assert.responserequiredAssertionResponseTypes

Constraints

IdGradePath(s)DetailsRequirements
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tst-1errorTestScript.setup.actionSetup action SHALL contain either an operation or assert but not both.
: operation.exists() xor assert.exists()
tst-2errorTestScript.test.actionTest action SHALL contain either an operation or assert but not both.
: operation.exists() xor assert.exists()
tst-3errorTestScript.variableVariable can only contain one of expression, headerField or path.
: expression.empty() or headerField.empty() or path.empty()
tst-4errorTestScript.metadataTestScript metadata capability SHALL contain required or validated or both.
: capability.required.exists() or capability.validated.exists()
tst-5errorTestScript.setup.action.assertOnly a single assertion SHALL be present within setup action assert element.
: extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() <=1)
tst-6errorTestScript.test.action.assertOnly a single assertion SHALL be present within test action assert element.
: extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() <=1)
tst-7errorTestScript.setup.action.operationSetup operation SHALL contain either sourceId or targetId or params or url.
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' |'search' | 'transaction' | 'history'))
tst-8errorTestScript.test.action.operationTest operation SHALL contain either sourceId or targetId or params or url.
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))
tst-9errorTestScript.teardown.action.operationTeardown operation SHALL contain either sourceId or targetId or params or url.
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))
tst-10errorTestScript.setup.action.assertSetup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
: compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())
tst-11errorTestScript.test.action.assertTest action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
: compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())
tst-12errorTestScript.setup.action.assertSetup action assert response and responseCode SHALL be empty when direction equals request
: (response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'
tst-13errorTestScript.test.action.assertTest action assert response and response and responseCode SHALL be empty when direction equals request
: (response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'

Key Elements View

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript C0..*TestScriptDescribes a set of tests
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... url Σ1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.


doco Documentation for this format

Terminology Bindings

PathConformanceValueSet
TestScript.statusrequiredPublicationStatus

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorTestScriptIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorTestScriptIf the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
: contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorTestScriptIf a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5errorTestScriptIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceTestScriptA resource should have narrative for robust management
: text.`div`.exists()
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tst-0warningTestScriptName should be usable as an identifier for the module by machine processing applications such as code generation
: name.matches('[A-Z]([A-Za-z0-9_]){0,254}')

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestScript C0..*TestScriptDescribes 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: CommonLanguages (preferred): A human language.

Additional BindingsPurpose
AllLanguagesMax 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 Σ1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
... identifier Σ0..1IdentifierAdditional identifier for the test script
... version Σ0..1stringBusiness version of the test script
... name ΣC1..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 Σ0..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 0..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 ValueSet (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..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 C0..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
... 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 C0..*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 C1..*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 C0..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): The allowable operation code types.

...... 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.

...... 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: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.


Example General: application/fhir+xml
...... contentType 0..1codeMime type of the request payload contents, with charset etc.
Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.


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 C0..1BackboneElementThe assertion to perform
...... id 0..1stringUnique id for inter-element referencing
...... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
...... AssertSubtest 0..1(Complex)Extension
URL: https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/assert-subtest
...... AssertSubtestEach 0..1(Complex)Extension
URL: https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/assert-subtest-each
...... 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 type of direction to use for assertion.

...... 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: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.


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 assertion.

...... 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 type of response code to use for assertion.

...... responseCode 0..1stringHTTP response code to test
...... sourceId 0..1idFixture Id of source expression or headerField
...... 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 C1..*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 C0..1See operation (TestScript)The setup operation to perform
..... assert C0..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 C1..1See operation (TestScript)The teardown operation to perform

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet
TestScript.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
TestScript.statusrequiredPublicationStatus
TestScript.jurisdictionextensibleJurisdiction ValueSet
TestScript.origin.profileextensibleTestScriptProfileOriginType
TestScript.destination.profileextensibleTestScriptProfileDestinationType
TestScript.setup.action.operation.typeextensibleTestScriptOperationCode
TestScript.setup.action.operation.resourcerequiredFHIRDefinedType
TestScript.setup.action.operation.acceptrequiredMime Types (a valid code from urn:ietf:bcp:13)
TestScript.setup.action.operation.contentTyperequiredMime Types (a valid code from urn:ietf:bcp:13)
TestScript.setup.action.operation.methodrequiredTestScriptRequestMethodCode
TestScript.setup.action.assert.directionrequiredAssertionDirectionType
TestScript.setup.action.assert.contentTyperequiredMime Types (a valid code from urn:ietf:bcp:13)
TestScript.setup.action.assert.operatorrequiredAssertionOperatorType
TestScript.setup.action.assert.requestMethodrequiredTestScriptRequestMethodCode
TestScript.setup.action.assert.resourcerequiredFHIRDefinedType
TestScript.setup.action.assert.responserequiredAssertionResponseTypes

Constraints

IdGradePath(s)DetailsRequirements
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
tst-1errorTestScript.setup.actionSetup action SHALL contain either an operation or assert but not both.
: operation.exists() xor assert.exists()
tst-2errorTestScript.test.actionTest action SHALL contain either an operation or assert but not both.
: operation.exists() xor assert.exists()
tst-3errorTestScript.variableVariable can only contain one of expression, headerField or path.
: expression.empty() or headerField.empty() or path.empty()
tst-4errorTestScript.metadataTestScript metadata capability SHALL contain required or validated or both.
: capability.required.exists() or capability.validated.exists()
tst-5errorTestScript.setup.action.assertOnly a single assertion SHALL be present within setup action assert element.
: extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() <=1)
tst-6errorTestScript.test.action.assertOnly a single assertion SHALL be present within test action assert element.
: extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() <=1)
tst-7errorTestScript.setup.action.operationSetup operation SHALL contain either sourceId or targetId or params or url.
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' |'search' | 'transaction' | 'history'))
tst-8errorTestScript.test.action.operationTest operation SHALL contain either sourceId or targetId or params or url.
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))
tst-9errorTestScript.teardown.action.operationTeardown operation SHALL contain either sourceId or targetId or params or url.
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))
tst-10errorTestScript.setup.action.assertSetup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
: compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())
tst-11errorTestScript.test.action.assertTest action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.
: compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())
tst-12errorTestScript.setup.action.assertSetup action assert response and responseCode SHALL be empty when direction equals request
: (response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'
tst-13errorTestScript.test.action.assertTest action assert response and response and responseCode SHALL be empty when direction equals request
: (response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'

 

Other representations of profile: CSV, Excel, Schematron