FHIR Tooling Extensions IG
0.6.0-cibuild - Release 0.2.0 International flag

FHIR Tooling Extensions IG, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.6.0-cibuild built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/FHIR/fhir-tools-ig/ and changes regularly. See the Directory of published versions

Logical Model: TestCases - Detailed Descriptions

Page standards status: Informative Maturity Level: 3

Definitions for the TestCases logical model.

Guidance on how to interpret the contents of this table can be found here

0. TestCases
Definition

A set of tests that are executed by some runner to test the functionality of a tool in the FHIR ecosystem


This is the base resource type for everything.

ShortTest Suite - set of tests executed by a runnerBase Resource
Control0..*
Is Modifierfalse
Must Supportfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
Summaryfalse
2. TestCases.id
Definition

The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.

ShortLogical id of this artifact
Comments

Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case.

Control0..1
Typeid
Is Modifierfalse
Must Supportfalse
Summarytrue
4. TestCases.meta
Definition

The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.

ShortMetadata about the resource
Control0..1
TypeMeta
Is Modifierfalse
Must Supportfalse
Summarytrue
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
6. TestCases.implicitRules
Definition

A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.

ShortA set of rules under which this content was created
Comments

Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of its narrative along with other profiles, value sets, etc.

Control0..1
Typeuri
Is Modifiertrue because This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies its meaning or interpretation
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Must Supportfalse
Summarytrue
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
8. TestCases.language
Definition

The base language in which the resource is written.

ShortLanguage of the resource content
Comments

Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).

Control0..1
BindingThe codes SHALL be taken from AllLanguageshttp://hl7.org/fhir/ValueSet/all-languages|5.0.0
(required to http://hl7.org/fhir/ValueSet/all-languages|5.0.0)

IETF language tag for a human language

Typecode
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Must Supportfalse
Summaryfalse
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
10. TestCases.url
Definition

An absolute URI that is used to identify test tests.

ShortCanonical identifier for these tests, represented as a URI (globally unique)
Control0..1
Typeuri
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summarytrue
Invariantscnl-1: URL should not contain | or # - these characters make processing canonical references problematic (exists() implies matches('^[^|# ]+$'))
12. TestCases.version
Definition

The identifier that is used to identify this version of these tests. Version must use SemVer

ShortBusiness version of the test set (semver)
NoteThis is a business version Id, not a resource version Id (see discussion)
Control0..1
Typestring
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summarytrue
14. TestCases.name
Definition

A natural language name identifying the tests. This name should be usable as an identifier for the module by machine processing applications such as code generation.

ShortName for these tests
Control0..1
Typestring
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summarytrue
16. TestCases.description
Definition

General description of these teats.

ShortGeneral Description of these tests
Control0..1
Typemarkdown
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summarytrue
18. TestCases.runner
Definition

URL of documentation that explains how a runner would read these tests, and use them to actually test out a tool.

ShortURL Documentation for a runner that executes these tests
Control1..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
20. TestCases.script[x]
Definition

A script in a format understood by the runner that provides additional details about the execution of the test cases. The script provided depends on the definition of the runner; some runners do not cater for scripts, while others need a script.

ShortA script that guides the execution of the test (for some runners)
Control1..1
TypeChoice of: Expression, canonical(Library)
[x] NoteSeeChoice of Data Typesfor further information about how to use [x]
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
22. TestCases.mode
Definition

A mode that can be passed to a runner running these these tests, that affects test content and influences how the tests are executed or evaulated (or even if they run)

ShortA mode that can be passed to runner - affects test content
Control0..*
TypeBase
24. TestCases.mode.code
Definition

The code by which the mode is identified when passed to runner

ShortThe code that identifies the mode
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
26. TestCases.mode.description
Definition

Description of what this mode does / why it was defined. This should explain to a tester when they should use the mode

ShortDescription of what this mode exists / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
28. TestCases.parameter
Definition

A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner

ShortParameter passed to the runner
Control0..*
TypeBase
30. TestCases.parameter.name
Definition

Name of parameter

ShortName of parameter
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
32. TestCases.parameter.value[x]
Definition

The value of the parameter. If the value is an Expression, the definition of the runner describes what kind of expressions are allowed and the features/capabilities that they can make use of

ShortValue of this parameter
Control1..1
TypeChoice of: string, boolean, integer, decimal, dateTime, uri, Coding, Quantity, Expression
[x] NoteSeeChoice of Data Typesfor further information about how to use [x]
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
34. TestCases.parameter.mode
Definition

If this mode is not passed to the runner, then this parameter will not be used

ShortA mode that must be true for this parameter to be used
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the parameter is always used, unless there is a parameter with the same name that is selected by mode
36. TestCases.scope
Definition

The scope indicates what kind of systems these test cases are intended to test

ShortThe scope - what these test cases are testing
Control0..*
TypeBase
38. TestCases.scope.reference
Definition

A reference to what is being tested

ShortA reference to what is being tested
Control0..1
Typecanonical(ActorDefinition, ImplementationGuide, StructureDefinition)
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
40. TestCases.scope.description
Definition

Description of what the scope is does / what is being tested

ShortDescription of what the scope is exists / what is being tested
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
42. TestCases.dependency
Definition

Another set of test cases that must be passed before these test cases are meaningful to execute. These test cases prove functionality that these tests require to execute

ShortTest cases that must be passed before these test cases are meaningful to execute
Control0..*
TypeBase
44. TestCases.dependency.reference
Definition

The test cases.

ShortThe Test Cases
Control1..1
Typecanonical(Test Cases)
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
46. TestCases.dependency.description
Definition

Description of what this mode does / why it was defined. This should explain to a tester why the

ShortDescription of what the dependency exists / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
48. TestCases.suite
Definition

A suite of tests that all share a common set up, and can be executed as a group

ShortA suite of tests that share a common set up
Control0..*
TypeBase
50. TestCases.suite.name
Definition

The name by which this suite is known by in the test system. The name must be unique in the amongst the suites

ShortThe name of this suite - unique in the TestCases resource
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
52. TestCases.suite.description
Definition

Description of what this suite does / why it was defined. This should explain to a tester what they should know when deciding which tests to run

ShortDescription of what this suite does / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
54. TestCases.suite.mode
Definition

If this mode is not passed to the runner, then this suite will not be run

Shortmode required to run this suite
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the suite is always executed
56. TestCases.suite.resource
Definition

The resources used in the tests in this suite. How exactly they are used depends on the definition of the runner

ShortResources used in the tests in this suite
Control0..*
TypeBase
Invariantsts-2: Either a file, or a resource, but not both (file xor resource)
58. TestCases.suite.resource.name
Definition

A name that identifies this resource. The runner definition defines whether there must be a name, and what names there are

ShortA name for this resource (per runner definition)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
60. TestCases.suite.resource.file
Definition

A file containing a resource used in the tests

ShortA file containing a resource used in the tests
Comments

Filename is relative to the folder/directory containing this TestCases

Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
62. TestCases.suite.resource.resource
Definition

An inline resource used in the tests. How exactly it is used depends on the definition of the runner.

ShortAn inline resource used in the tests
Control0..1
TypeResource
64. TestCases.suite.resource.mode
Definition

If this mode is not passed to the runner, then this resource will not be used

ShortA mode that must be true for this resource to be used
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the resource is always used, unless there is another entry with the same name that is selected by mode
66. TestCases.suite.parameter
Definition

A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner

ShortParameter passed to the runner
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter
68. TestCases.suite.test
Definition

An actual test in the test suite

ShortA test in the test suite
Control0..*
TypeBase
70. TestCases.suite.test.name
Definition

The name by which this test is known by in the test system. The name must be unique in the suite

ShortThe name of this test - unique in the suite
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
72. TestCases.suite.test.description
Definition

Description of what this test does / why it was defined. This should explain to a tester what they should know when looking at failing test results

ShortDescription of what this test does / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
74. TestCases.suite.test.operation
Definition

A code that identifies the operation executed for this test. One of the codes defined in the definition of the runner

ShortOperation that is executed during this test (per definition of runner)
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
76. TestCases.suite.test.mode
Definition

If this mode is not passed to the runner, then this test will not be run

Shortmode required to run this test
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the test is always executed
78. TestCases.suite.test.parameter
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter
80. TestCases.suite.test.input
Definition

The resources used when executing this test. How exactly they are used depends on the definition of the runner.

ShortResources used when executing this test (per runner definition)
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.resource
82. TestCases.suite.test.output
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner. How exactly it is used depends on the definition of the runner, but the expectation is that these are the expected output, to which the actual output is compared

ShortResources expected as output from this test (per runner definition, often Matchetypes)
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.resource
84. TestCases.suite.test.assertion
Definition

An assertion to run on the output of the test

ShortAssertion to run on the output
Control0..*
TypeBase
86. TestCases.suite.test.assertion.focus
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources

ShortWhich output the assertion is tested on (by name, if there is more than one)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
88. TestCases.suite.test.assertion.severity
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner

ShortError | Warning | Information; only errors are considered to cause a test to fail
Control0..1
BindingThe codes SHALL be taken from IssueSeverity
(required to http://hl7.org/fhir/ValueSet/issue-severity|5.0.0)

The severity of the assertion

Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
90. TestCases.suite.test.assertion.expression
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner

ShortTechnical Expression of the assertion
Control0..1
TypeExpression
92. TestCases.suite.test.assertion.human
Definition

A human readable description of the assertion.

ShortHuman readable description of the assertion
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
94. TestCases.suite.suite
Definition

A nested set of tests

ShortA nested suite of tests
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite

Guidance on how to interpret the contents of this table can be found here

0. TestCases
Definition

A set of tests that are executed by some runner to test the functionality of a tool in the FHIR ecosystem

ShortTest Suite - set of tests executed by a runner
Logical ModelInstances of this logical model are not marked to be the target of a Reference
2. TestCases.url
Definition

An absolute URI that is used to identify test tests.

ShortCanonical identifier for these tests, represented as a URI (globally unique)
Control0..1
Typeuri
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Invariantscnl-1: URL should not contain | or # - these characters make processing canonical references problematic (exists() implies matches('^[^|# ]+$'))
4. TestCases.version
Definition

The identifier that is used to identify this version of these tests. Version must use SemVer

ShortBusiness version of the test set (semver)
NoteThis is a business version Id, not a resource version Id (see discussion)
Control0..1
Typestring
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
6. TestCases.name
Definition

A natural language name identifying the tests. This name should be usable as an identifier for the module by machine processing applications such as code generation.

ShortName for these tests
Control0..1
Typestring
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
8. TestCases.description
Definition

General description of these teats.

ShortGeneral Description of these tests
Control0..1
Typemarkdown
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
10. TestCases.runner
Definition

URL of documentation that explains how a runner would read these tests, and use them to actually test out a tool.

ShortURL Documentation for a runner that executes these tests
Control1..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
12. TestCases.script[x]
Definition

A script in a format understood by the runner that provides additional details about the execution of the test cases. The script provided depends on the definition of the runner; some runners do not cater for scripts, while others need a script.

ShortA script that guides the execution of the test (for some runners)
Control1..1
TypeChoice of: Expression, canonical(Library)
[x] NoteSeeChoice of Data Typesfor further information about how to use [x]
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
14. TestCases.mode
Definition

A mode that can be passed to a runner running these these tests, that affects test content and influences how the tests are executed or evaulated (or even if they run)

ShortA mode that can be passed to runner - affects test content
Control0..*
TypeBase
16. TestCases.mode.code
Definition

The code by which the mode is identified when passed to runner

ShortThe code that identifies the mode
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
18. TestCases.mode.description
Definition

Description of what this mode does / why it was defined. This should explain to a tester when they should use the mode

ShortDescription of what this mode exists / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
20. TestCases.parameter
Definition

A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner

ShortParameter passed to the runner
Control0..*
TypeBase
22. TestCases.parameter.name
Definition

Name of parameter

ShortName of parameter
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
24. TestCases.parameter.value[x]
Definition

The value of the parameter. If the value is an Expression, the definition of the runner describes what kind of expressions are allowed and the features/capabilities that they can make use of

ShortValue of this parameter
Control1..1
TypeChoice of: string, boolean, integer, decimal, dateTime, uri, Coding, Quantity, Expression
[x] NoteSeeChoice of Data Typesfor further information about how to use [x]
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
26. TestCases.parameter.mode
Definition

If this mode is not passed to the runner, then this parameter will not be used

ShortA mode that must be true for this parameter to be used
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the parameter is always used, unless there is a parameter with the same name that is selected by mode
28. TestCases.scope
Definition

The scope indicates what kind of systems these test cases are intended to test

ShortThe scope - what these test cases are testing
Control0..*
TypeBase
30. TestCases.scope.reference
Definition

A reference to what is being tested

ShortA reference to what is being tested
Control0..1
Typecanonical(ActorDefinition, ImplementationGuide, StructureDefinition)
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
32. TestCases.scope.description
Definition

Description of what the scope is does / what is being tested

ShortDescription of what the scope is exists / what is being tested
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
34. TestCases.dependency
Definition

Another set of test cases that must be passed before these test cases are meaningful to execute. These test cases prove functionality that these tests require to execute

ShortTest cases that must be passed before these test cases are meaningful to execute
Control0..*
TypeBase
36. TestCases.dependency.reference
Definition

The test cases.

ShortThe Test Cases
Control1..1
Typecanonical(Test Cases)
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
38. TestCases.dependency.description
Definition

Description of what this mode does / why it was defined. This should explain to a tester why the

ShortDescription of what the dependency exists / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
40. TestCases.suite
Definition

A suite of tests that all share a common set up, and can be executed as a group

ShortA suite of tests that share a common set up
Control0..*
TypeBase
42. TestCases.suite.name
Definition

The name by which this suite is known by in the test system. The name must be unique in the amongst the suites

ShortThe name of this suite - unique in the TestCases resource
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
44. TestCases.suite.description
Definition

Description of what this suite does / why it was defined. This should explain to a tester what they should know when deciding which tests to run

ShortDescription of what this suite does / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
46. TestCases.suite.mode
Definition

If this mode is not passed to the runner, then this suite will not be run

Shortmode required to run this suite
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the suite is always executed
48. TestCases.suite.resource
Definition

The resources used in the tests in this suite. How exactly they are used depends on the definition of the runner

ShortResources used in the tests in this suite
Control0..*
TypeBase
Invariantsts-2: Either a file, or a resource, but not both (file xor resource)
50. TestCases.suite.resource.name
Definition

A name that identifies this resource. The runner definition defines whether there must be a name, and what names there are

ShortA name for this resource (per runner definition)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
52. TestCases.suite.resource.file
Definition

A file containing a resource used in the tests

ShortA file containing a resource used in the tests
Comments

Filename is relative to the folder/directory containing this TestCases

Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
54. TestCases.suite.resource.resource
Definition

An inline resource used in the tests. How exactly it is used depends on the definition of the runner.

ShortAn inline resource used in the tests
Control0..1
TypeResource
56. TestCases.suite.resource.mode
Definition

If this mode is not passed to the runner, then this resource will not be used

ShortA mode that must be true for this resource to be used
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the resource is always used, unless there is another entry with the same name that is selected by mode
58. TestCases.suite.parameter
Definition

A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner

ShortParameter passed to the runner
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter
60. TestCases.suite.test
Definition

An actual test in the test suite

ShortA test in the test suite
Control0..*
TypeBase
62. TestCases.suite.test.name
Definition

The name by which this test is known by in the test system. The name must be unique in the suite

ShortThe name of this test - unique in the suite
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
64. TestCases.suite.test.description
Definition

Description of what this test does / why it was defined. This should explain to a tester what they should know when looking at failing test results

ShortDescription of what this test does / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
66. TestCases.suite.test.operation
Definition

A code that identifies the operation executed for this test. One of the codes defined in the definition of the runner

ShortOperation that is executed during this test (per definition of runner)
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
68. TestCases.suite.test.mode
Definition

If this mode is not passed to the runner, then this test will not be run

Shortmode required to run this test
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the test is always executed
70. TestCases.suite.test.parameter
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter
72. TestCases.suite.test.input
Definition

The resources used when executing this test. How exactly they are used depends on the definition of the runner.

ShortResources used when executing this test (per runner definition)
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.resource
74. TestCases.suite.test.output
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner. How exactly it is used depends on the definition of the runner, but the expectation is that these are the expected output, to which the actual output is compared

ShortResources expected as output from this test (per runner definition, often Matchetypes)
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.resource
76. TestCases.suite.test.assertion
Definition

One or more assertions that can be executed against the output of the tests. These may be used with matchetypes to make rules about content the matchetypes leave open

ShortAssertions that can be executed against the output of the tests
Control0..*
TypeBase
78. TestCases.suite.test.assertion
Definition

An assertion to run on the output of the test

ShortAssertion to run on the output
Control0..*
TypeBase
80. TestCases.suite.test.assertion.focus
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources

ShortWhich output the assertion is tested on (by name, if there is more than one)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
82. TestCases.suite.test.assertion.severity
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner

ShortError | Warning | Information; only errors are considered to cause a test to fail
Control0..1
BindingThe codes SHALL be taken from IssueSeverity
(required to http://hl7.org/fhir/ValueSet/issue-severity|5.0.0)

The severity of the assertion

Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
84. TestCases.suite.test.assertion.expression
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner

ShortTechnical Expression of the assertion
Control0..1
TypeExpression
86. TestCases.suite.test.assertion.human
Definition

A human readable description of the assertion.

ShortHuman readable description of the assertion
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
88. TestCases.suite.suite
Definition

A nested set of tests

ShortA nested suite of tests
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite

Guidance on how to interpret the contents of this table can be found here

0. TestCases
Definition

A set of tests that are executed by some runner to test the functionality of a tool in the FHIR ecosystem

ShortTest Suite - set of tests executed by a runner
Control0..*
Is Modifierfalse
Must Supportfalse
Logical ModelInstances of this logical model are not marked to be the target of a Reference
Summaryfalse
2. TestCases.id
Definition

The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.

ShortLogical id of this artifact
Comments

Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case.

Control0..1
Typeid
Is Modifierfalse
Must Supportfalse
Summarytrue
4. TestCases.meta
Definition

The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.

ShortMetadata about the resource
Control0..1
TypeMeta
Is Modifierfalse
Must Supportfalse
Summarytrue
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
6. TestCases.implicitRules
Definition

A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.

ShortA set of rules under which this content was created
Comments

Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of its narrative along with other profiles, value sets, etc.

Control0..1
Typeuri
Is Modifiertrue because This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies its meaning or interpretation
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Must Supportfalse
Summarytrue
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
8. TestCases.language
Definition

The base language in which the resource is written.

ShortLanguage of the resource content
Comments

Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).

Control0..1
BindingThe codes SHALL be taken from AllLanguages
(required to http://hl7.org/fhir/ValueSet/all-languages|5.0.0)

IETF language tag for a human language

Typecode
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Must Supportfalse
Summaryfalse
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
10. TestCases.url
Definition

An absolute URI that is used to identify test tests.

ShortCanonical identifier for these tests, represented as a URI (globally unique)
Control0..1
Typeuri
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summarytrue
Invariantscnl-1: URL should not contain | or # - these characters make processing canonical references problematic (exists() implies matches('^[^|# ]+$'))
12. TestCases.version
Definition

The identifier that is used to identify this version of these tests. Version must use SemVer

ShortBusiness version of the test set (semver)
NoteThis is a business version Id, not a resource version Id (see discussion)
Control0..1
Typestring
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summarytrue
14. TestCases.name
Definition

A natural language name identifying the tests. This name should be usable as an identifier for the module by machine processing applications such as code generation.

ShortName for these tests
Control0..1
Typestring
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summarytrue
16. TestCases.description
Definition

General description of these teats.

ShortGeneral Description of these tests
Control0..1
Typemarkdown
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Summarytrue
18. TestCases.runner
Definition

URL of documentation that explains how a runner would read these tests, and use them to actually test out a tool.

ShortURL Documentation for a runner that executes these tests
Control1..1
Typeurl
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
20. TestCases.script[x]
Definition

A script in a format understood by the runner that provides additional details about the execution of the test cases. The script provided depends on the definition of the runner; some runners do not cater for scripts, while others need a script.

ShortA script that guides the execution of the test (for some runners)
Control1..1
TypeChoice of: Expression, canonical(Library)
[x] NoteSeeChoice of Data Typesfor further information about how to use [x]
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
22. TestCases.mode
Definition

A mode that can be passed to a runner running these these tests, that affects test content and influences how the tests are executed or evaulated (or even if they run)

ShortA mode that can be passed to runner - affects test content
Control0..*
TypeBase
24. TestCases.mode.code
Definition

The code by which the mode is identified when passed to runner

ShortThe code that identifies the mode
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
26. TestCases.mode.description
Definition

Description of what this mode does / why it was defined. This should explain to a tester when they should use the mode

ShortDescription of what this mode exists / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
28. TestCases.parameter
Definition

A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner

ShortParameter passed to the runner
Control0..*
TypeBase
30. TestCases.parameter.name
Definition

Name of parameter

ShortName of parameter
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
32. TestCases.parameter.value[x]
Definition

The value of the parameter. If the value is an Expression, the definition of the runner describes what kind of expressions are allowed and the features/capabilities that they can make use of

ShortValue of this parameter
Control1..1
TypeChoice of: string, boolean, integer, decimal, dateTime, uri, Coding, Quantity, Expression
[x] NoteSeeChoice of Data Typesfor further information about how to use [x]
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
34. TestCases.parameter.mode
Definition

If this mode is not passed to the runner, then this parameter will not be used

ShortA mode that must be true for this parameter to be used
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the parameter is always used, unless there is a parameter with the same name that is selected by mode
36. TestCases.scope
Definition

The scope indicates what kind of systems these test cases are intended to test

ShortThe scope - what these test cases are testing
Control0..*
TypeBase
38. TestCases.scope.reference
Definition

A reference to what is being tested

ShortA reference to what is being tested
Control0..1
Typecanonical(ActorDefinition, ImplementationGuide, StructureDefinition)
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
40. TestCases.scope.description
Definition

Description of what the scope is does / what is being tested

ShortDescription of what the scope is exists / what is being tested
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
42. TestCases.dependency
Definition

Another set of test cases that must be passed before these test cases are meaningful to execute. These test cases prove functionality that these tests require to execute

ShortTest cases that must be passed before these test cases are meaningful to execute
Control0..*
TypeBase
44. TestCases.dependency.reference
Definition

The test cases.

ShortThe Test Cases
Control1..1
Typecanonical(Test Cases)
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
46. TestCases.dependency.description
Definition

Description of what this mode does / why it was defined. This should explain to a tester why the

ShortDescription of what the dependency exists / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
48. TestCases.suite
Definition

A suite of tests that all share a common set up, and can be executed as a group

ShortA suite of tests that share a common set up
Control0..*
TypeBase
50. TestCases.suite.name
Definition

The name by which this suite is known by in the test system. The name must be unique in the amongst the suites

ShortThe name of this suite - unique in the TestCases resource
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
52. TestCases.suite.description
Definition

Description of what this suite does / why it was defined. This should explain to a tester what they should know when deciding which tests to run

ShortDescription of what this suite does / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
54. TestCases.suite.mode
Definition

If this mode is not passed to the runner, then this suite will not be run

Shortmode required to run this suite
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the suite is always executed
56. TestCases.suite.resource
Definition

The resources used in the tests in this suite. How exactly they are used depends on the definition of the runner

ShortResources used in the tests in this suite
Control0..*
TypeBase
Invariantsts-2: Either a file, or a resource, but not both (file xor resource)
58. TestCases.suite.resource.name
Definition

A name that identifies this resource. The runner definition defines whether there must be a name, and what names there are

ShortA name for this resource (per runner definition)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
60. TestCases.suite.resource.file
Definition

A file containing a resource used in the tests

ShortA file containing a resource used in the tests
Comments

Filename is relative to the folder/directory containing this TestCases

Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
62. TestCases.suite.resource.resource
Definition

An inline resource used in the tests. How exactly it is used depends on the definition of the runner.

ShortAn inline resource used in the tests
Control0..1
TypeResource
64. TestCases.suite.resource.mode
Definition

If this mode is not passed to the runner, then this resource will not be used

ShortA mode that must be true for this resource to be used
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the resource is always used, unless there is another entry with the same name that is selected by mode
66. TestCases.suite.parameter
Definition

A parameter passed to the runner when executing tests. Which parameters are valid, and how exactly the parameter is used are used depends on the definition of the runner

ShortParameter passed to the runner
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter
68. TestCases.suite.test
Definition

An actual test in the test suite

ShortA test in the test suite
Control0..*
TypeBase
70. TestCases.suite.test.name
Definition

The name by which this test is known by in the test system. The name must be unique in the suite

ShortThe name of this test - unique in the suite
Control1..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
72. TestCases.suite.test.description
Definition

Description of what this test does / why it was defined. This should explain to a tester what they should know when looking at failing test results

ShortDescription of what this test does / why it was defined
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
74. TestCases.suite.test.operation
Definition

A code that identifies the operation executed for this test. One of the codes defined in the definition of the runner

ShortOperation that is executed during this test (per definition of runner)
Control0..1
Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
76. TestCases.suite.test.mode
Definition

If this mode is not passed to the runner, then this test will not be run

Shortmode required to run this test
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Meaning if MissingIf no modes are listed, the test is always executed
78. TestCases.suite.test.parameter
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.parameter
80. TestCases.suite.test.input
Definition

The resources used when executing this test. How exactly they are used depends on the definition of the runner.

ShortResources used when executing this test (per runner definition)
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.resource
82. TestCases.suite.test.output
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner. How exactly it is used depends on the definition of the runner, but the expectation is that these are the expected output, to which the actual output is compared

ShortResources expected as output from this test (per runner definition, often Matchetypes)
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite.resource
84. TestCases.suite.test.assertion
Definition

An assertion to run on the output of the test

ShortAssertion to run on the output
Control0..*
TypeBase
86. TestCases.suite.test.assertion.focus
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources

ShortWhich output the assertion is tested on (by name, if there is more than one)
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
88. TestCases.suite.test.assertion.severity
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner

ShortError | Warning | Information; only errors are considered to cause a test to fail
Control0..1
BindingThe codes SHALL be taken from IssueSeverity
(required to http://hl7.org/fhir/ValueSet/issue-severity|5.0.0)

The severity of the assertion

Typecode
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
90. TestCases.suite.test.assertion.expression
Definition

Resources expected as output from this test. Often, but not always, these resources are Matchetype resources. How exactly it is used depends on the definition of the runner

ShortTechnical Expression of the assertion
Control0..1
TypeExpression
92. TestCases.suite.test.assertion.human
Definition

A human readable description of the assertion.

ShortHuman readable description of the assertion
Control0..1
Typestring
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
94. TestCases.suite.suite
Definition

A nested set of tests

ShortA nested suite of tests
Control0..*
TypeSeettp://hl7.org/fhir/tools/StructureDefinition/TestCases#TestCases.suite