0.0.1 - ci-build

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

Extension: AssertSubtestEach

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

Execute a TestScript instance as a subtest for each of a set of inputs.

Context of Use

This extension may be used on the following element(s):

  • Element ID TestScript.setup.action.assert

Execution Semantics

This complex extension is used within a TestScript assert action. It tells the engine to determine whether the assertion passed based on the execution of a specified TestScript for each of a set of inputs. The assert must also include a value in the expression element indicating a FHIRPath expression that will drive how many executions of the subtest will occur. For each entry in the result collection, which must be a string value, the specified TestScript will be executed with the entry value bound to a specified variable in the invoked TestScript. A boolean flag in the extension, allMustPass, tells the engine whether all iterations of the subtest execution must succeed in order for the assertion to pass, or just one. The extension also optionally includes variable bindings, tying the value of additional specific variables in the TestScript making the invocation to variables in the target TestScript. Once execution of all iterations of the invoked TestScript completes, TestReport instances are generated for each iteration, each with an extension flagging that it was a subtest and another extension indicating whether it needed to pass based on the allMustPass value, and the engine continues with execution of the invoking TestScript.

Usage info

Usage:

Formal Views of Extension Content

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

This structure is derived from Extension

Summary

Mandatory: 2 elements (2 nested mandatory elements)
Fixed Value: 7 elements
Prohibited: 7 elements

This structure is derived from Extension

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension 0..*ExtensionExtension
... extension 2..*ExtensionExtension
... extension:testName 1..1ExtensionName of the TestScript to execute
.... extension 0..0
.... url 1..1uri"testName"
.... value[x] 0..1stringValue of extension
... extension:bindEachTarget 1..1ExtensionVariable name in the executed test that the input value will be bound to
.... extension 0..0
.... url 1..1uri"bindEachTarget"
.... value[x] 0..1stringValue of extension
.... extension 0..0
.... url 1..1uri"allMustPass"
.... value[x] 0..1booleanValue of extension
... extension:bindVariable 0..*ExtensionBinding of a source TestScript variable to a target TestScript variable
.... extension 2..*ExtensionExtension
.... extension:bindSource 1..1ExtensionExecuting TestScript variable name that provides the value
..... extension 0..0
..... url 1..1uri"bindSource"
..... value[x] 0..1stringValue of extension
.... extension:bindTarget 1..1ExtensionExecuted TestScript variable name that receives the value
..... extension 0..0
..... url 1..1uri"bindTarget"
..... value[x] 0..1stringValue of extension
.... url 1..1uri"bindVariable"
.... value[x] 0..0
... url 1..1uri"https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/assert-subtest-each"
... value[x] 0..0

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension 0..*ExtensionExtension
... id 0..1stringUnique id for inter-element referencing
... Slices for extension 2..*ExtensionExtension
Slice: Unordered, Open by value:url
... extension:testName 1..1ExtensionName of the TestScript to execute
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"testName"
.... value[x] 0..1stringValue of extension
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"bindEachTarget"
.... value[x] 0..1stringValue of extension
... extension:allMustPass 0..1ExtensionDetermines whether all runs of the executed subtest must pass for this assertion to succeed
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"allMustPass"
.... value[x] 0..1booleanValue of extension
... extension:bindVariable 0..*ExtensionBinding of a source TestScript variable to a target TestScript variable
.... id 0..1stringUnique id for inter-element referencing
.... Slices for extension 2..*ExtensionExtension
Slice: Unordered, Open by value:url
.... extension:bindSource 1..1ExtensionExecuting TestScript variable name that provides the value
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..0
..... url 1..1uri"bindSource"
..... value[x] 0..1stringValue of extension
.... extension:bindTarget 1..1ExtensionExecuted TestScript variable name that receives the value
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..0
..... url 1..1uri"bindTarget"
..... value[x] 0..1stringValue of extension
.... url 1..1uri"bindVariable"
... url 1..1uri"https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/assert-subtest-each"

doco Documentation for this format

This structure is derived from Extension

Summary

Mandatory: 2 elements (2 nested mandatory elements)
Fixed Value: 7 elements
Prohibited: 7 elements

Differential View

This structure is derived from Extension

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension 0..*ExtensionExtension
... extension 2..*ExtensionExtension
... extension:testName 1..1ExtensionName of the TestScript to execute
.... extension 0..0
.... url 1..1uri"testName"
.... value[x] 0..1stringValue of extension
... extension:bindEachTarget 1..1ExtensionVariable name in the executed test that the input value will be bound to
.... extension 0..0
.... url 1..1uri"bindEachTarget"
.... value[x] 0..1stringValue of extension
.... extension 0..0
.... url 1..1uri"allMustPass"
.... value[x] 0..1booleanValue of extension
... extension:bindVariable 0..*ExtensionBinding of a source TestScript variable to a target TestScript variable
.... extension 2..*ExtensionExtension
.... extension:bindSource 1..1ExtensionExecuting TestScript variable name that provides the value
..... extension 0..0
..... url 1..1uri"bindSource"
..... value[x] 0..1stringValue of extension
.... extension:bindTarget 1..1ExtensionExecuted TestScript variable name that receives the value
..... extension 0..0
..... url 1..1uri"bindTarget"
..... value[x] 0..1stringValue of extension
.... url 1..1uri"bindVariable"
.... value[x] 0..0
... url 1..1uri"https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/assert-subtest-each"
... value[x] 0..0

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. Extension 0..*ExtensionExtension
... id 0..1stringUnique id for inter-element referencing
... Slices for extension 2..*ExtensionExtension
Slice: Unordered, Open by value:url
... extension:testName 1..1ExtensionName of the TestScript to execute
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"testName"
.... value[x] 0..1stringValue of extension
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"bindEachTarget"
.... value[x] 0..1stringValue of extension
... extension:allMustPass 0..1ExtensionDetermines whether all runs of the executed subtest must pass for this assertion to succeed
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"allMustPass"
.... value[x] 0..1booleanValue of extension
... extension:bindVariable 0..*ExtensionBinding of a source TestScript variable to a target TestScript variable
.... id 0..1stringUnique id for inter-element referencing
.... Slices for extension 2..*ExtensionExtension
Slice: Unordered, Open by value:url
.... extension:bindSource 1..1ExtensionExecuting TestScript variable name that provides the value
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..0
..... url 1..1uri"bindSource"
..... value[x] 0..1stringValue of extension
.... extension:bindTarget 1..1ExtensionExecuted TestScript variable name that receives the value
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..0
..... url 1..1uri"bindTarget"
..... value[x] 0..1stringValue of extension
.... url 1..1uri"bindVariable"
... url 1..1uri"https://fhir-crucible.github.io/testscript-engine-ig/StructureDefinition/assert-subtest-each"

doco Documentation for this format

 

Other representations of profile: CSV, Excel, Schematron

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()