This page is part of the HL7 Tools Extension IG (v0.8.0: Release - Informative) based on FHIR (HL7® FHIR® Standard) v5.0.0. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions
| Official URL: http://hl7.org/fhir/tools/StructureDefinition/TestCases | Version: 0.8.0 | |||
| Standards status: Informative | Maturity Level: 3 | Computable Name: TestCases | ||
| Other Identifiers: OID:2.16.840.1.113883.4.642.40.1.42.64 | ||||
A standard format for test cases used throughout the FHIR ecosystem
Usages:
You can also check for usages in the FHIR IG Statistics
Description of Profiles, Differentials, Snapshots and how the different presentations work.
| Name | Flags | Card. | Type | Description & Constraints    Filter:   | ||||
|---|---|---|---|---|---|---|---|---|
|   TestCases | 0..* | Resource | Elements defined in Ancestors:id, meta, implicitRules, language Test Suite - set of tests executed by a runner | |||||
|    id | Σ | 0..1 | id | Logical id of this artifact | ||||
|    meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
|    implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
|    language | 0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language 
 | |||||
|    url | ΣC | 0..1 | uri | Canonical identifier for these tests, represented as a URI (globally unique) Constraints: cnl-1 | ||||
|    version | Σ | 0..1 | string | Business version of the test set (semver) | ||||
|    name | Σ | 0..1 | string | Name for these tests | ||||
|    description | Σ | 0..1 | markdown | General Description of these tests | ||||
|    scope | 0..* | Base | The scope - what these test cases are testing | |||||
|     reference | 0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition) | A reference to what is being tested | |||||
|     description | 0..1 | string | Description of what the scope is exists / what is being tested | |||||
|    dependency | 0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |||||
|     reference | 1..1 | canonical(Test Cases) | The Test Cases | |||||
|     description | 0..1 | string | Description of what the dependency exists / why it was defined | |||||
|    runner | 1..1 | url | URL Documentation for a runner that executes these tests | |||||
|    mode | 0..* | Base | A mode that can be passed to runner - affects test content | |||||
|     code | 1..1 | string | The code that identifies the mode | |||||
|     description | 0..1 | string | Description of what this mode exists / why it was defined | |||||
|    parameter | 0..* | Base | Parameter passed to the runner | |||||
|     name | 1..1 | string | Name of parameter | |||||
|     value[x] | 1..1 | Value of this parameter | ||||||
|      valueString | string | |||||||
|      valueBoolean | boolean | |||||||
|      valueInteger | integer | |||||||
|      valueDecimal | decimal | |||||||
|      valueDateTime | dateTime | |||||||
|      valueUri | uri | |||||||
|      valueCoding | Coding | |||||||
|      valueQuantity | Quantity | |||||||
|      valueExpression | Expression | |||||||
|     mode | 0..1 | code | A mode that must be true for this parameter to be used | |||||
|    suite | 0..* | Base | A suite of tests that share a common set up | |||||
|     name | 1..1 | string | The name of this suite - unique in the TestCases resource | |||||
|     description | 0..1 | string | Description of what this suite does / why it was defined | |||||
|     mode | 0..1 | code | mode required to run this suite | |||||
|     data | C | 0..* | Base | Resources used in the tests in this suite Constraints: ts-2 | ||||
|      name | 0..1 | string | A name for this resource (per runner definition) | |||||
|      file | 0..1 | string | A file containing a resource used in the tests | |||||
|      resource | 0..1 | Resource | An inline resource used in the tests | |||||
|      mode | 0..1 | code | A mode that must be true for this resource to be used | |||||
|     parameter | 0..* | See parameter | Parameter passed to the runner | |||||
|     test | 0..* | Base | A test in the test suite | |||||
|      name | 1..1 | string | The name of this test - unique in the suite | |||||
|      description | 0..1 | string | Description of what this test does / why it was defined | |||||
|      operation | 0..1 | code | Operation that is executed during this test (per definition of runner) | |||||
|      mode | 0..1 | string | mode required to run this test | |||||
|      parameter | 0..* | See parameter | ||||||
|      input | 0..* | See data | Resources used when executing this test (per runner definition) | |||||
|      output | 0..* | See data | Resources expected as output from this test (per runner definition, often Matchetypes) | |||||
|      assertion | 0..* | Base | Assertions that can be executed against the output of the tests | |||||
|       focus | 0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |||||
|       severity | 0..1 | code | Error | Warning | Information; only errors are considered to cause a test to fail Binding: IssueSeverity (required): The severity of the assertion | |||||
|       expression | 0..1 | Expression | Technical Expression of the assertion | |||||
|       human | 0..1 | string | Human readable description of the assertion | |||||
|       mode | 0..1 | code | A mode that must be true for this assertion to apply | |||||
|     suite | 0..* | See suite | A nested suite of tests | |||||
|     cases | 0..* | Reference(Test Cases), canonical(Test Cases) | A nested set of test cases | |||||
|  Documentation for this format | ||||||||
| Path | Conformance | ValueSet | URI | 
| TestCases.language | required | AllLanguages http://hl7.org/fhir/ValueSet/all-languages|5.0.0From the FHIR Standard | |
| TestCases.suite.test.assertion.severity | required | IssueSeverity http://hl7.org/fhir/ValueSet/issue-severity|5.0.0From the FHIR Standard | 
| Id | Grade | Path(s) | Details | Requirements | 
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
| ts-2 | error | TestCases.suite.data | Either a file, or a resource, but not both : file xor resource | 
This structure is derived from Resource
| Name | Flags | Card. | Type | Description & Constraints    Filter:   | 
|---|---|---|---|---|
|   TestCases | 0..* | Resource | Elements defined in Ancestors:id, meta, implicitRules, language Test Suite - set of tests executed by a runner | |
|    url | ΣC | 0..1 | uri | Canonical identifier for these tests, represented as a URI (globally unique) Constraints: cnl-1 | 
|    version | Σ | 0..1 | string | Business version of the test set (semver) | 
|    name | Σ | 0..1 | string | Name for these tests | 
|    description | Σ | 0..1 | markdown | General Description of these tests | 
|    scope | 0..* | Base | The scope - what these test cases are testing | |
|     reference | 0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition) | A reference to what is being tested | |
|     description | 0..1 | string | Description of what the scope is exists / what is being tested | |
|    dependency | 0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |
|     reference | 1..1 | canonical(Test Cases) | The Test Cases | |
|     description | 0..1 | string | Description of what the dependency exists / why it was defined | |
|    runner | 1..1 | url | URL Documentation for a runner that executes these tests | |
|    mode | 0..* | Base | A mode that can be passed to runner - affects test content | |
|     code | 1..1 | string | The code that identifies the mode | |
|     description | 0..1 | string | Description of what this mode exists / why it was defined | |
|    parameter | 0..* | Base | Parameter passed to the runner | |
|     name | 1..1 | string | Name of parameter | |
|     value[x] | 1..1 | Value of this parameter | ||
|      valueString | string | |||
|      valueBoolean | boolean | |||
|      valueInteger | integer | |||
|      valueDecimal | decimal | |||
|      valueDateTime | dateTime | |||
|      valueUri | uri | |||
|      valueCoding | Coding | |||
|      valueQuantity | Quantity | |||
|      valueExpression | Expression | |||
|     mode | 0..1 | code | A mode that must be true for this parameter to be used | |
|    suite | 0..* | Base | A suite of tests that share a common set up | |
|     name | 1..1 | string | The name of this suite - unique in the TestCases resource | |
|     description | 0..1 | string | Description of what this suite does / why it was defined | |
|     mode | 0..1 | code | mode required to run this suite | |
|     data | C | 0..* | Base | Resources used in the tests in this suite Constraints: ts-2 | 
|      name | 0..1 | string | A name for this resource (per runner definition) | |
|      file | 0..1 | string | A file containing a resource used in the tests | |
|      resource | 0..1 | Resource | An inline resource used in the tests | |
|      mode | 0..1 | code | A mode that must be true for this resource to be used | |
|     parameter | 0..* | See parameter | Parameter passed to the runner | |
|     test | 0..* | Base | A test in the test suite | |
|      name | 1..1 | string | The name of this test - unique in the suite | |
|      description | 0..1 | string | Description of what this test does / why it was defined | |
|      operation | 0..1 | code | Operation that is executed during this test (per definition of runner) | |
|      mode | 0..1 | string | mode required to run this test | |
|      parameter | 0..* | See parameter | ||
|      input | 0..* | See data | Resources used when executing this test (per runner definition) | |
|      output | 0..* | See data | Resources expected as output from this test (per runner definition, often Matchetypes) | |
|      assertion | 0..* | Base | Assertions that can be executed against the output of the tests | |
|       focus | 0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |
|       severity | 0..1 | code | Error | Warning | Information; only errors are considered to cause a test to fail Binding: IssueSeverity (required): The severity of the assertion | |
|       expression | 0..1 | Expression | Technical Expression of the assertion | |
|       human | 0..1 | string | Human readable description of the assertion | |
|       mode | 0..1 | code | A mode that must be true for this assertion to apply | |
|     suite | 0..* | See suite | A nested suite of tests | |
|     cases | 0..* | Reference(Test Cases), canonical(Test Cases) | A nested set of test cases | |
|  Documentation for this format | ||||
| Path | Conformance | ValueSet | URI | 
| TestCases.suite.test.assertion.severity | required | IssueSeverity http://hl7.org/fhir/ValueSet/issue-severity|5.0.0From the FHIR Standard | 
| Id | Grade | Path(s) | Details | Requirements | 
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
| ts-2 | error | TestCases.suite.data | Either a file, or a resource, but not both : file xor resource | 
| Name | Flags | Card. | Type | Description & Constraints    Filter:   | ||||
|---|---|---|---|---|---|---|---|---|
|   TestCases | 0..* | Resource | Elements defined in Ancestors:id, meta, implicitRules, language Test Suite - set of tests executed by a runner | |||||
|    id | Σ | 0..1 | id | Logical id of this artifact | ||||
|    meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
|    implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
|    language | 0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language 
 | |||||
|    url | ΣC | 0..1 | uri | Canonical identifier for these tests, represented as a URI (globally unique) Constraints: cnl-1 | ||||
|    version | Σ | 0..1 | string | Business version of the test set (semver) | ||||
|    name | Σ | 0..1 | string | Name for these tests | ||||
|    description | Σ | 0..1 | markdown | General Description of these tests | ||||
|    scope | 0..* | Base | The scope - what these test cases are testing | |||||
|     reference | 0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition) | A reference to what is being tested | |||||
|     description | 0..1 | string | Description of what the scope is exists / what is being tested | |||||
|    dependency | 0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |||||
|     reference | 1..1 | canonical(Test Cases) | The Test Cases | |||||
|     description | 0..1 | string | Description of what the dependency exists / why it was defined | |||||
|    runner | 1..1 | url | URL Documentation for a runner that executes these tests | |||||
|    mode | 0..* | Base | A mode that can be passed to runner - affects test content | |||||
|     code | 1..1 | string | The code that identifies the mode | |||||
|     description | 0..1 | string | Description of what this mode exists / why it was defined | |||||
|    parameter | 0..* | Base | Parameter passed to the runner | |||||
|     name | 1..1 | string | Name of parameter | |||||
|     value[x] | 1..1 | Value of this parameter | ||||||
|      valueString | string | |||||||
|      valueBoolean | boolean | |||||||
|      valueInteger | integer | |||||||
|      valueDecimal | decimal | |||||||
|      valueDateTime | dateTime | |||||||
|      valueUri | uri | |||||||
|      valueCoding | Coding | |||||||
|      valueQuantity | Quantity | |||||||
|      valueExpression | Expression | |||||||
|     mode | 0..1 | code | A mode that must be true for this parameter to be used | |||||
|    suite | 0..* | Base | A suite of tests that share a common set up | |||||
|     name | 1..1 | string | The name of this suite - unique in the TestCases resource | |||||
|     description | 0..1 | string | Description of what this suite does / why it was defined | |||||
|     mode | 0..1 | code | mode required to run this suite | |||||
|     data | C | 0..* | Base | Resources used in the tests in this suite Constraints: ts-2 | ||||
|      name | 0..1 | string | A name for this resource (per runner definition) | |||||
|      file | 0..1 | string | A file containing a resource used in the tests | |||||
|      resource | 0..1 | Resource | An inline resource used in the tests | |||||
|      mode | 0..1 | code | A mode that must be true for this resource to be used | |||||
|     parameter | 0..* | See parameter | Parameter passed to the runner | |||||
|     test | 0..* | Base | A test in the test suite | |||||
|      name | 1..1 | string | The name of this test - unique in the suite | |||||
|      description | 0..1 | string | Description of what this test does / why it was defined | |||||
|      operation | 0..1 | code | Operation that is executed during this test (per definition of runner) | |||||
|      mode | 0..1 | string | mode required to run this test | |||||
|      parameter | 0..* | See parameter | ||||||
|      input | 0..* | See data | Resources used when executing this test (per runner definition) | |||||
|      output | 0..* | See data | Resources expected as output from this test (per runner definition, often Matchetypes) | |||||
|      assertion | 0..* | Base | Assertions that can be executed against the output of the tests | |||||
|       focus | 0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |||||
|       severity | 0..1 | code | Error | Warning | Information; only errors are considered to cause a test to fail Binding: IssueSeverity (required): The severity of the assertion | |||||
|       expression | 0..1 | Expression | Technical Expression of the assertion | |||||
|       human | 0..1 | string | Human readable description of the assertion | |||||
|       mode | 0..1 | code | A mode that must be true for this assertion to apply | |||||
|     suite | 0..* | See suite | A nested suite of tests | |||||
|     cases | 0..* | Reference(Test Cases), canonical(Test Cases) | A nested set of test cases | |||||
|  Documentation for this format | ||||||||
| Path | Conformance | ValueSet | URI | 
| TestCases.language | required | AllLanguages http://hl7.org/fhir/ValueSet/all-languages|5.0.0From the FHIR Standard | |
| TestCases.suite.test.assertion.severity | required | IssueSeverity http://hl7.org/fhir/ValueSet/issue-severity|5.0.0From the FHIR Standard | 
| Id | Grade | Path(s) | Details | Requirements | 
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
| ts-2 | error | TestCases.suite.data | Either a file, or a resource, but not both : file xor resource | 
Key Elements View
| Name | Flags | Card. | Type | Description & Constraints    Filter:   | ||||
|---|---|---|---|---|---|---|---|---|
|   TestCases | 0..* | Resource | Elements defined in Ancestors:id, meta, implicitRules, language Test Suite - set of tests executed by a runner | |||||
|    id | Σ | 0..1 | id | Logical id of this artifact | ||||
|    meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
|    implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
|    language | 0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language 
 | |||||
|    url | ΣC | 0..1 | uri | Canonical identifier for these tests, represented as a URI (globally unique) Constraints: cnl-1 | ||||
|    version | Σ | 0..1 | string | Business version of the test set (semver) | ||||
|    name | Σ | 0..1 | string | Name for these tests | ||||
|    description | Σ | 0..1 | markdown | General Description of these tests | ||||
|    scope | 0..* | Base | The scope - what these test cases are testing | |||||
|     reference | 0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition) | A reference to what is being tested | |||||
|     description | 0..1 | string | Description of what the scope is exists / what is being tested | |||||
|    dependency | 0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |||||
|     reference | 1..1 | canonical(Test Cases) | The Test Cases | |||||
|     description | 0..1 | string | Description of what the dependency exists / why it was defined | |||||
|    runner | 1..1 | url | URL Documentation for a runner that executes these tests | |||||
|    mode | 0..* | Base | A mode that can be passed to runner - affects test content | |||||
|     code | 1..1 | string | The code that identifies the mode | |||||
|     description | 0..1 | string | Description of what this mode exists / why it was defined | |||||
|    parameter | 0..* | Base | Parameter passed to the runner | |||||
|     name | 1..1 | string | Name of parameter | |||||
|     value[x] | 1..1 | Value of this parameter | ||||||
|      valueString | string | |||||||
|      valueBoolean | boolean | |||||||
|      valueInteger | integer | |||||||
|      valueDecimal | decimal | |||||||
|      valueDateTime | dateTime | |||||||
|      valueUri | uri | |||||||
|      valueCoding | Coding | |||||||
|      valueQuantity | Quantity | |||||||
|      valueExpression | Expression | |||||||
|     mode | 0..1 | code | A mode that must be true for this parameter to be used | |||||
|    suite | 0..* | Base | A suite of tests that share a common set up | |||||
|     name | 1..1 | string | The name of this suite - unique in the TestCases resource | |||||
|     description | 0..1 | string | Description of what this suite does / why it was defined | |||||
|     mode | 0..1 | code | mode required to run this suite | |||||
|     data | C | 0..* | Base | Resources used in the tests in this suite Constraints: ts-2 | ||||
|      name | 0..1 | string | A name for this resource (per runner definition) | |||||
|      file | 0..1 | string | A file containing a resource used in the tests | |||||
|      resource | 0..1 | Resource | An inline resource used in the tests | |||||
|      mode | 0..1 | code | A mode that must be true for this resource to be used | |||||
|     parameter | 0..* | See parameter | Parameter passed to the runner | |||||
|     test | 0..* | Base | A test in the test suite | |||||
|      name | 1..1 | string | The name of this test - unique in the suite | |||||
|      description | 0..1 | string | Description of what this test does / why it was defined | |||||
|      operation | 0..1 | code | Operation that is executed during this test (per definition of runner) | |||||
|      mode | 0..1 | string | mode required to run this test | |||||
|      parameter | 0..* | See parameter | ||||||
|      input | 0..* | See data | Resources used when executing this test (per runner definition) | |||||
|      output | 0..* | See data | Resources expected as output from this test (per runner definition, often Matchetypes) | |||||
|      assertion | 0..* | Base | Assertions that can be executed against the output of the tests | |||||
|       focus | 0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |||||
|       severity | 0..1 | code | Error | Warning | Information; only errors are considered to cause a test to fail Binding: IssueSeverity (required): The severity of the assertion | |||||
|       expression | 0..1 | Expression | Technical Expression of the assertion | |||||
|       human | 0..1 | string | Human readable description of the assertion | |||||
|       mode | 0..1 | code | A mode that must be true for this assertion to apply | |||||
|     suite | 0..* | See suite | A nested suite of tests | |||||
|     cases | 0..* | Reference(Test Cases), canonical(Test Cases) | A nested set of test cases | |||||
|  Documentation for this format | ||||||||
| Path | Conformance | ValueSet | URI | 
| TestCases.language | required | AllLanguages http://hl7.org/fhir/ValueSet/all-languages|5.0.0From the FHIR Standard | |
| TestCases.suite.test.assertion.severity | required | IssueSeverity http://hl7.org/fhir/ValueSet/issue-severity|5.0.0From the FHIR Standard | 
| Id | Grade | Path(s) | Details | Requirements | 
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
| ts-2 | error | TestCases.suite.data | Either a file, or a resource, but not both : file xor resource | 
Differential View
This structure is derived from Resource
| Name | Flags | Card. | Type | Description & Constraints    Filter:   | 
|---|---|---|---|---|
|   TestCases | 0..* | Resource | Elements defined in Ancestors:id, meta, implicitRules, language Test Suite - set of tests executed by a runner | |
|    url | ΣC | 0..1 | uri | Canonical identifier for these tests, represented as a URI (globally unique) Constraints: cnl-1 | 
|    version | Σ | 0..1 | string | Business version of the test set (semver) | 
|    name | Σ | 0..1 | string | Name for these tests | 
|    description | Σ | 0..1 | markdown | General Description of these tests | 
|    scope | 0..* | Base | The scope - what these test cases are testing | |
|     reference | 0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition) | A reference to what is being tested | |
|     description | 0..1 | string | Description of what the scope is exists / what is being tested | |
|    dependency | 0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |
|     reference | 1..1 | canonical(Test Cases) | The Test Cases | |
|     description | 0..1 | string | Description of what the dependency exists / why it was defined | |
|    runner | 1..1 | url | URL Documentation for a runner that executes these tests | |
|    mode | 0..* | Base | A mode that can be passed to runner - affects test content | |
|     code | 1..1 | string | The code that identifies the mode | |
|     description | 0..1 | string | Description of what this mode exists / why it was defined | |
|    parameter | 0..* | Base | Parameter passed to the runner | |
|     name | 1..1 | string | Name of parameter | |
|     value[x] | 1..1 | Value of this parameter | ||
|      valueString | string | |||
|      valueBoolean | boolean | |||
|      valueInteger | integer | |||
|      valueDecimal | decimal | |||
|      valueDateTime | dateTime | |||
|      valueUri | uri | |||
|      valueCoding | Coding | |||
|      valueQuantity | Quantity | |||
|      valueExpression | Expression | |||
|     mode | 0..1 | code | A mode that must be true for this parameter to be used | |
|    suite | 0..* | Base | A suite of tests that share a common set up | |
|     name | 1..1 | string | The name of this suite - unique in the TestCases resource | |
|     description | 0..1 | string | Description of what this suite does / why it was defined | |
|     mode | 0..1 | code | mode required to run this suite | |
|     data | C | 0..* | Base | Resources used in the tests in this suite Constraints: ts-2 | 
|      name | 0..1 | string | A name for this resource (per runner definition) | |
|      file | 0..1 | string | A file containing a resource used in the tests | |
|      resource | 0..1 | Resource | An inline resource used in the tests | |
|      mode | 0..1 | code | A mode that must be true for this resource to be used | |
|     parameter | 0..* | See parameter | Parameter passed to the runner | |
|     test | 0..* | Base | A test in the test suite | |
|      name | 1..1 | string | The name of this test - unique in the suite | |
|      description | 0..1 | string | Description of what this test does / why it was defined | |
|      operation | 0..1 | code | Operation that is executed during this test (per definition of runner) | |
|      mode | 0..1 | string | mode required to run this test | |
|      parameter | 0..* | See parameter | ||
|      input | 0..* | See data | Resources used when executing this test (per runner definition) | |
|      output | 0..* | See data | Resources expected as output from this test (per runner definition, often Matchetypes) | |
|      assertion | 0..* | Base | Assertions that can be executed against the output of the tests | |
|       focus | 0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |
|       severity | 0..1 | code | Error | Warning | Information; only errors are considered to cause a test to fail Binding: IssueSeverity (required): The severity of the assertion | |
|       expression | 0..1 | Expression | Technical Expression of the assertion | |
|       human | 0..1 | string | Human readable description of the assertion | |
|       mode | 0..1 | code | A mode that must be true for this assertion to apply | |
|     suite | 0..* | See suite | A nested suite of tests | |
|     cases | 0..* | Reference(Test Cases), canonical(Test Cases) | A nested set of test cases | |
|  Documentation for this format | ||||
| Path | Conformance | ValueSet | URI | 
| TestCases.suite.test.assertion.severity | required | IssueSeverity http://hl7.org/fhir/ValueSet/issue-severity|5.0.0From the FHIR Standard | 
| Id | Grade | Path(s) | Details | Requirements | 
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
| ts-2 | error | TestCases.suite.data | Either a file, or a resource, but not both : file xor resource | 
Snapshot View
| Name | Flags | Card. | Type | Description & Constraints    Filter:   | ||||
|---|---|---|---|---|---|---|---|---|
|   TestCases | 0..* | Resource | Elements defined in Ancestors:id, meta, implicitRules, language Test Suite - set of tests executed by a runner | |||||
|    id | Σ | 0..1 | id | Logical id of this artifact | ||||
|    meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
|    implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
|    language | 0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language 
 | |||||
|    url | ΣC | 0..1 | uri | Canonical identifier for these tests, represented as a URI (globally unique) Constraints: cnl-1 | ||||
|    version | Σ | 0..1 | string | Business version of the test set (semver) | ||||
|    name | Σ | 0..1 | string | Name for these tests | ||||
|    description | Σ | 0..1 | markdown | General Description of these tests | ||||
|    scope | 0..* | Base | The scope - what these test cases are testing | |||||
|     reference | 0..1 | canonical(ActorDefinition | ImplementationGuide | StructureDefinition) | A reference to what is being tested | |||||
|     description | 0..1 | string | Description of what the scope is exists / what is being tested | |||||
|    dependency | 0..* | Base | Test cases that must be passed before these test cases are meaningful to execute | |||||
|     reference | 1..1 | canonical(Test Cases) | The Test Cases | |||||
|     description | 0..1 | string | Description of what the dependency exists / why it was defined | |||||
|    runner | 1..1 | url | URL Documentation for a runner that executes these tests | |||||
|    mode | 0..* | Base | A mode that can be passed to runner - affects test content | |||||
|     code | 1..1 | string | The code that identifies the mode | |||||
|     description | 0..1 | string | Description of what this mode exists / why it was defined | |||||
|    parameter | 0..* | Base | Parameter passed to the runner | |||||
|     name | 1..1 | string | Name of parameter | |||||
|     value[x] | 1..1 | Value of this parameter | ||||||
|      valueString | string | |||||||
|      valueBoolean | boolean | |||||||
|      valueInteger | integer | |||||||
|      valueDecimal | decimal | |||||||
|      valueDateTime | dateTime | |||||||
|      valueUri | uri | |||||||
|      valueCoding | Coding | |||||||
|      valueQuantity | Quantity | |||||||
|      valueExpression | Expression | |||||||
|     mode | 0..1 | code | A mode that must be true for this parameter to be used | |||||
|    suite | 0..* | Base | A suite of tests that share a common set up | |||||
|     name | 1..1 | string | The name of this suite - unique in the TestCases resource | |||||
|     description | 0..1 | string | Description of what this suite does / why it was defined | |||||
|     mode | 0..1 | code | mode required to run this suite | |||||
|     data | C | 0..* | Base | Resources used in the tests in this suite Constraints: ts-2 | ||||
|      name | 0..1 | string | A name for this resource (per runner definition) | |||||
|      file | 0..1 | string | A file containing a resource used in the tests | |||||
|      resource | 0..1 | Resource | An inline resource used in the tests | |||||
|      mode | 0..1 | code | A mode that must be true for this resource to be used | |||||
|     parameter | 0..* | See parameter | Parameter passed to the runner | |||||
|     test | 0..* | Base | A test in the test suite | |||||
|      name | 1..1 | string | The name of this test - unique in the suite | |||||
|      description | 0..1 | string | Description of what this test does / why it was defined | |||||
|      operation | 0..1 | code | Operation that is executed during this test (per definition of runner) | |||||
|      mode | 0..1 | string | mode required to run this test | |||||
|      parameter | 0..* | See parameter | ||||||
|      input | 0..* | See data | Resources used when executing this test (per runner definition) | |||||
|      output | 0..* | See data | Resources expected as output from this test (per runner definition, often Matchetypes) | |||||
|      assertion | 0..* | Base | Assertions that can be executed against the output of the tests | |||||
|       focus | 0..1 | string | Which output the assertion is tested on (by name, if there is more than one) | |||||
|       severity | 0..1 | code | Error | Warning | Information; only errors are considered to cause a test to fail Binding: IssueSeverity (required): The severity of the assertion | |||||
|       expression | 0..1 | Expression | Technical Expression of the assertion | |||||
|       human | 0..1 | string | Human readable description of the assertion | |||||
|       mode | 0..1 | code | A mode that must be true for this assertion to apply | |||||
|     suite | 0..* | See suite | A nested suite of tests | |||||
|     cases | 0..* | Reference(Test Cases), canonical(Test Cases) | A nested set of test cases | |||||
|  Documentation for this format | ||||||||
| Path | Conformance | ValueSet | URI | 
| TestCases.language | required | AllLanguages http://hl7.org/fhir/ValueSet/all-languages|5.0.0From the FHIR Standard | |
| TestCases.suite.test.assertion.severity | required | IssueSeverity http://hl7.org/fhir/ValueSet/issue-severity|5.0.0From the FHIR Standard | 
| Id | Grade | Path(s) | Details | Requirements | 
| cnl-1 | warning | TestCases.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
| ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
| ts-2 | error | TestCases.suite.data | Either a file, or a resource, but not both : file xor resource |