This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
FHIR Infrastructure Work Group | Maturity Level: 0 | Draft | Security Category: Business | Compartments: No defined compartments |
A plan for executing testing on an artifact or specifications.
The TestPlan is a canonical resource that defines how an system or specifications (which can be represented by FHIR artifacts or by narrative) are to be tested. It contains the business- and planning-language aspects of test planning, around the TestScript, which handles part of the test execution.
A TestPlan describes the purpose, the dependencies, scope, test environment, test framework, test output, etc. It contains test cases which can describe narrative test enter/exit criteria, test data, etc. (enter criteria are a common name for preconditions, exit criteria are the criteria for the tests to finish - successfully or unsuccessfully e.g. "Unable to Test".
The TestPlan supports traditional testing as well as agile testing (TDD, BDD). It contains pointers to the data itself, or the information for the test data to be obtained, e.g. the instructions for synthetic data generation.
TestPlans can depend or extend other test plans - TestPlan is a canonical resource to allow reuse - one example of this would be a national FHIR specification (as an IG or a Requirement) that decribes that a System has to be conformant to IHE profiles, WHO datasets, ISO IDMP models, OpenHIE specifications, and national terminologies, in one of the national languages. If any of these specifications have a TestPlan resource, such TestPlans can be reused, combined, and extended downstream.
The TestPlan is related to, but not overlapping, the TestScript resource, as the TestPlan is intended to contain the planning and non-technical part of the testing, which is necessary to describe "what to test". The TestScript describes "how to test". The TestPlan is necessary to be maintained from a Business perspective, - test criteria can be expected to be defined or validated by business-oriented authors, while testscripts can be defined by technical test teams.
A TestPlan resource can be associated with any canonical resource. This includes, but is not limited to, the ImplementationGuide resource - a TestPlan can be defined for an entire Implementation Guide, or for some of the artifacts in the Implementation Guide, like an AcrotDefinition, Requirements, etc.
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
TestPlan | D | DomainResource | Description of intented testing + Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension Interfaces Implemented: CanonicalResource | |
url | ΣC | 0..1 | uri | Canonical identifier for this test plan, represented as a URI (globally unique) + Warning: URL should not contain | or # - these characters make processing canonical references problematic |
identifier | Σ | 0..* | Identifier | Business identifier identifier for the test plan |
version | Σ | 0..1 | string | Business version of the test plan |
versionAlgorithm[x] | Σ | 0..1 | How to compare versions Binding: Version Algorithm (Extensible) | |
versionAlgorithmString | string | |||
versionAlgorithmCoding | Coding | |||
name | ΣC | 0..1 | string | Name for this test plan (computer friendly) |
title | T | 0..1 | string | Name for this test plan (human friendly) |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (Required) |
experimental | Σ | 0..1 | boolean | For testing purposes, not real usage |
date | Σ | 0..1 | dateTime | Date last changed |
publisher | ΣT | 0..1 | string | Name of the publisher/steward (organization or individual) |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | T | 0..1 | markdown | Natural language description of the test plan |
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support |
jurisdiction | ΣXD | 0..* | CodeableConcept | Intended jurisdiction where the test plan applies (if applicable) Binding: Jurisdiction ValueSet (Extensible) |
purpose | T | 0..1 | markdown | Why this test plan is defined |
copyright | T | 0..1 | markdown | Use and/or publishing restrictions |
copyrightLabel | T | 0..1 | string | Copyright holder and year(s) |
category | 0..* | CodeableConcept | The category of the Test Plan - can be acceptance, unit, performance Binding: Test Script Scope Phase Type (Example) | |
scope | 0..* | Reference(Any) | What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference | |
testTools | 0..1 | markdown | A description of test tools to be used in the test plan - narrative for now | |
dependency | 0..* | BackboneElement | The required criteria to execute the test plan - e.g. preconditions, previous tests | |
description | 0..1 | markdown | Description of the dependency criterium | |
predecessor | 0..1 | Reference(TestPlan) | Link to predecessor test plans | |
exitCriteria | 0..1 | markdown | The threshold or criteria for the test plan to be considered successfully executed - narrative | |
testCase | 0..* | BackboneElement | The test cases that constitute this plan | |
key | 1..1 | id | Key that identifies this test case | |
description | 0..1 | markdown | Narrative description explaining the purpose of this test case | |
sequence | 0..1 | integer | Sequence of test case in the test plan | |
scope | 0..* | Reference(Any) | The scope or artifact covered by the case | |
requirement | 0..* | BackboneElement | Links or references to the testing requirements | |
reference | 1..1 | canonical(Requirements) | Canonical reference to the Requirements instance | |
key | 1..1 | id | Requirements statement key identifier | |
dependency | 0..* | BackboneElement | Required criteria to execute the test case | |
description | 0..1 | markdown | Description of the criteria | |
reference | 0..1 | canonical(TestPlan) | Canonical reference to the TestPlan dependency instance | |
key | 0..1 | id | TestPlan dependency instance testCase key identifier | |
testRun | 0..* | BackboneElement | The actual test to be executed | |
narrative | 0..1 | markdown | The narrative description of the tests | |
script | 0..1 | BackboneElement | The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript | |
language | 0..1 | CodeableConcept | The language for the test cases e.g. 'gherkin', 'testscript' | |
source[x] | 0..1 | The actual content of the cases - references to TestScripts or externally defined content | ||
sourceString | string | |||
sourceReference | Reference(Any) | |||
testData | 0..* | BackboneElement | The test data used in the test case | |
type | 1..1 | Coding | The type of test data description, e.g. 'synthea' | |
content | 0..1 | Reference(Any) | The actual test resources when they exist | |
source[x] | 0..1 | Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc | ||
sourceString | string | |||
sourceReference | Reference(Any) | |||
assertion | 0..* | BackboneElement | Test assertions or expectations | |
type | 0..* | CodeableConcept | Assertion type - for example 'informative' or 'required' | |
object | 0..* | CodeableReference() | The focus or object of the assertion | |
result | 0..* | CodeableReference() | The actual result assertion | |
Documentation for this format |
See the Extensions for this resource
UML Diagram (Legend)
XML Template
<TestPlan xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 0..1 Canonical identifier for this test plan, represented as a URI (globally unique) --> <identifier><!-- 0..* Identifier Business identifier identifier for the test plan --></identifier> <version value="[string]"/><!-- 0..1 Business version of the test plan --> <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]> <name value="[string]"/><!-- I 0..1 Name for this test plan (computer friendly) --> <title value="[string]"/><!-- 0..1 Name for this test plan (human friendly) --> <status value="[code]"/><!-- 1..1 draft | active | retired | unknown --> <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage --> <date value="[dateTime]"/><!-- 0..1 Date last changed --> <publisher value="[string]"/><!-- 0..1 Name of the publisher/steward (organization or individual) --> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the test plan --> <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction where the test plan applies (if applicable) --></jurisdiction> <purpose value="[markdown]"/><!-- 0..1 Why this test plan is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) --> <category><!-- 0..* CodeableConcept The category of the Test Plan - can be acceptance, unit, performance --></category> <scope><!-- 0..* Reference(Any) What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference --></scope> <testTools value="[markdown]"/><!-- 0..1 A description of test tools to be used in the test plan - narrative for now --> <dependency> <!-- 0..* The required criteria to execute the test plan - e.g. preconditions, previous tests --> <description value="[markdown]"/><!-- 0..1 Description of the dependency criterium --> <predecessor><!-- 0..1 Reference(TestPlan) Link to predecessor test plans --></predecessor> </dependency> <exitCriteria value="[markdown]"/><!-- 0..1 The threshold or criteria for the test plan to be considered successfully executed - narrative --> <testCase> <!-- 0..* The test cases that constitute this plan --> <key value="[id]"/><!-- 1..1 Key that identifies this test case --> <description value="[markdown]"/><!-- 0..1 Narrative description explaining the purpose of this test case --> <sequence value="[integer]"/><!-- 0..1 Sequence of test case in the test plan --> <scope><!-- 0..* Reference(Any) The scope or artifact covered by the case --></scope> <requirement> <!-- 0..* Links or references to the testing requirements --> <reference><!-- 1..1 canonical(Requirements) Canonical reference to the Requirements instance --></reference> <key value="[id]"/><!-- 1..1 Requirements statement key identifier --> </requirement> <dependency> <!-- 0..* Required criteria to execute the test case --> <description value="[markdown]"/><!-- 0..1 Description of the criteria --> <reference><!-- 0..1 canonical(TestPlan) Canonical reference to the TestPlan dependency instance --></reference> <key value="[id]"/><!-- 0..1 TestPlan dependency instance testCase key identifier --> </dependency> <testRun> <!-- 0..* The actual test to be executed --> <narrative value="[markdown]"/><!-- 0..1 The narrative description of the tests --> <script> <!-- 0..1 The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript --> <language><!-- 0..1 CodeableConcept The language for the test cases e.g. 'gherkin', 'testscript' --></language> <source[x]><!-- 0..1 string|Reference(Any) The actual content of the cases - references to TestScripts or externally defined content --></source[x]> </script> </testRun> <testData> <!-- 0..* The test data used in the test case --> <type><!-- 1..1 Coding The type of test data description, e.g. 'synthea' --></type> <content><!-- 0..1 Reference(Any) The actual test resources when they exist --></content> <source[x]><!-- 0..1 string|Reference(Any) Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc --></source[x]> </testData> <assertion> <!-- 0..* Test assertions or expectations --> <type><!-- 0..* CodeableConcept Assertion type - for example 'informative' or 'required' --></type> <object><!-- 0..* CodeableReference The focus or object of the assertion --></object> <result><!-- 0..* CodeableReference The actual result assertion --></result> </assertion> </testCase> </TestPlan>
JSON Template
{ "resourceType" : "TestPlan", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "url" : "<uri>", // Canonical identifier for this test plan, represented as a URI (globally unique) "identifier" : [{ Identifier }], // Business identifier identifier for the test plan "version" : "<string>", // Business version of the test plan // versionAlgorithm[x]: How to compare versions. One of these 2: "versionAlgorithmString" : "<string>", "versionAlgorithmCoding" : { Coding }, "name" : "<string>", // I Name for this test plan (computer friendly) "title" : "<string>", // Name for this test plan (human friendly) "status" : "<code>", // R! draft | active | retired | unknown "experimental" : <boolean>, // For testing purposes, not real usage "date" : "<dateTime>", // Date last changed "publisher" : "<string>", // Name of the publisher/steward (organization or individual) "contact" : [{ ContactDetail }], // Contact details for the publisher "description" : "<markdown>", // Natural language description of the test plan "useContext" : [{ UsageContext }], // The context that the content is intended to support "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction where the test plan applies (if applicable) "purpose" : "<markdown>", // Why this test plan is defined "copyright" : "<markdown>", // Use and/or publishing restrictions "copyrightLabel" : "<string>", // Copyright holder and year(s) "category" : [{ CodeableConcept }], // The category of the Test Plan - can be acceptance, unit, performance "scope" : [{ Reference(Any) }], // What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference "testTools" : "<markdown>", // A description of test tools to be used in the test plan - narrative for now "dependency" : [{ // The required criteria to execute the test plan - e.g. preconditions, previous tests "description" : "<markdown>", // Description of the dependency criterium "predecessor" : { Reference(TestPlan) } // Link to predecessor test plans }], "exitCriteria" : "<markdown>", // The threshold or criteria for the test plan to be considered successfully executed - narrative "testCase" : [{ // The test cases that constitute this plan "key" : "<id>", // R! Key that identifies this test case "description" : "<markdown>", // Narrative description explaining the purpose of this test case "sequence" : <integer>, // Sequence of test case in the test plan "scope" : [{ Reference(Any) }], // The scope or artifact covered by the case "requirement" : [{ // Links or references to the testing requirements "reference" : "<canonical(Requirements)>", // R! Canonical reference to the Requirements instance "key" : "<id>" // R! Requirements statement key identifier }], "dependency" : [{ // Required criteria to execute the test case "description" : "<markdown>", // Description of the criteria "reference" : "<canonical(TestPlan)>", // Canonical reference to the TestPlan dependency instance "key" : "<id>" // TestPlan dependency instance testCase key identifier }], "testRun" : [{ // The actual test to be executed "narrative" : "<markdown>", // The narrative description of the tests "script" : { // The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript "language" : { CodeableConcept }, // The language for the test cases e.g. 'gherkin', 'testscript' // source[x]: The actual content of the cases - references to TestScripts or externally defined content. One of these 2: "sourceString" : "<string>", "sourceReference" : { Reference(Any) } } }], "testData" : [{ // The test data used in the test case "type" : { Coding }, // R! The type of test data description, e.g. 'synthea' "content" : { Reference(Any) }, // The actual test resources when they exist // source[x]: Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc. One of these 2: "sourceString" : "<string>", "sourceReference" : { Reference(Any) } }], "assertion" : [{ // Test assertions or expectations "type" : [{ CodeableConcept }], // Assertion type - for example 'informative' or 'required' "object" : [{ CodeableReference }], // The focus or object of the assertion "result" : [{ CodeableReference }] // The actual result assertion }] }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:TestPlan; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:url [ uri ] ; # 0..1 Canonical identifier for this test plan, represented as a URI (globally unique) fhir:identifier ( [ Identifier ] ... ) ; # 0..* Business identifier identifier for the test plan fhir:version [ string ] ; # 0..1 Business version of the test plan # versionAlgorithm[x] : 0..1 How to compare versions. One of these 2 fhir:versionAlgorithm [ a fhir:string ; string ] fhir:versionAlgorithm [ a fhir:Coding ; Coding ] fhir:name [ string ] ; # 0..1 I Name for this test plan (computer friendly) fhir:title [ string ] ; # 0..1 Name for this test plan (human friendly) fhir:status [ code ] ; # 1..1 draft | active | retired | unknown fhir:experimental [ boolean ] ; # 0..1 For testing purposes, not real usage fhir:date [ dateTime ] ; # 0..1 Date last changed fhir:publisher [ string ] ; # 0..1 Name of the publisher/steward (organization or individual) fhir:contact ( [ ContactDetail ] ... ) ; # 0..* Contact details for the publisher fhir:description [ markdown ] ; # 0..1 Natural language description of the test plan fhir:useContext ( [ UsageContext ] ... ) ; # 0..* The context that the content is intended to support fhir:jurisdiction ( [ CodeableConcept ] ... ) ; # 0..* Intended jurisdiction where the test plan applies (if applicable) fhir:purpose [ markdown ] ; # 0..1 Why this test plan is defined fhir:copyright [ markdown ] ; # 0..1 Use and/or publishing restrictions fhir:copyrightLabel [ string ] ; # 0..1 Copyright holder and year(s) fhir:category ( [ CodeableConcept ] ... ) ; # 0..* The category of the Test Plan - can be acceptance, unit, performance fhir:scope ( [ Reference(Any) ] ... ) ; # 0..* What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference fhir:testTools [ markdown ] ; # 0..1 A description of test tools to be used in the test plan - narrative for now fhir:dependency ( [ # 0..* The required criteria to execute the test plan - e.g. preconditions, previous tests fhir:description [ markdown ] ; # 0..1 Description of the dependency criterium fhir:predecessor [ Reference(TestPlan) ] ; # 0..1 Link to predecessor test plans ] ... ) ; fhir:exitCriteria [ markdown ] ; # 0..1 The threshold or criteria for the test plan to be considered successfully executed - narrative fhir:testCase ( [ # 0..* The test cases that constitute this plan fhir:key [ id ] ; # 1..1 Key that identifies this test case fhir:description [ markdown ] ; # 0..1 Narrative description explaining the purpose of this test case fhir:sequence [ integer ] ; # 0..1 Sequence of test case in the test plan fhir:scope ( [ Reference(Any) ] ... ) ; # 0..* The scope or artifact covered by the case fhir:requirement ( [ # 0..* Links or references to the testing requirements fhir:reference [ canonical(Requirements) ] ; # 1..1 Canonical reference to the Requirements instance fhir:key [ id ] ; # 1..1 Requirements statement key identifier ] ... ) ; fhir:dependency ( [ # 0..* Required criteria to execute the test case fhir:description [ markdown ] ; # 0..1 Description of the criteria fhir:reference [ canonical(TestPlan) ] ; # 0..1 Canonical reference to the TestPlan dependency instance fhir:key [ id ] ; # 0..1 TestPlan dependency instance testCase key identifier ] ... ) ; fhir:testRun ( [ # 0..* The actual test to be executed fhir:narrative [ markdown ] ; # 0..1 The narrative description of the tests fhir:script [ # 0..1 The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript fhir:language [ CodeableConcept ] ; # 0..1 The language for the test cases e.g. 'gherkin', 'testscript' # source[x] : 0..1 The actual content of the cases - references to TestScripts or externally defined content. One of these 2 fhir:source [ a fhir:string ; string ] fhir:source [ a fhir:Reference ; Reference(Any) ] ] ; ] ... ) ; fhir:testData ( [ # 0..* The test data used in the test case fhir:type [ Coding ] ; # 1..1 The type of test data description, e.g. 'synthea' fhir:content [ Reference(Any) ] ; # 0..1 The actual test resources when they exist # source[x] : 0..1 Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc. One of these 2 fhir:source [ a fhir:string ; string ] fhir:source [ a fhir:Reference ; Reference(Any) ] ] ... ) ; fhir:assertion ( [ # 0..* Test assertions or expectations fhir:type ( [ CodeableConcept ] ... ) ; # 0..* Assertion type - for example 'informative' or 'required' fhir:object ( [ CodeableReference ] ... ) ; # 0..* The focus or object of the assertion fhir:result ( [ CodeableReference ] ... ) ; # 0..* The actual result assertion ] ... ) ; ] ... ) ; ]
Changes from both R4 and R4B
This resource did not exist in Release R4
See the Full Difference for further information
This analysis is available for R4 as XML or JSON and for R4B as XML or JSON.
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
TestPlan | D | DomainResource | Description of intented testing + Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension Interfaces Implemented: CanonicalResource | |
url | ΣC | 0..1 | uri | Canonical identifier for this test plan, represented as a URI (globally unique) + Warning: URL should not contain | or # - these characters make processing canonical references problematic |
identifier | Σ | 0..* | Identifier | Business identifier identifier for the test plan |
version | Σ | 0..1 | string | Business version of the test plan |
versionAlgorithm[x] | Σ | 0..1 | How to compare versions Binding: Version Algorithm (Extensible) | |
versionAlgorithmString | string | |||
versionAlgorithmCoding | Coding | |||
name | ΣC | 0..1 | string | Name for this test plan (computer friendly) |
title | T | 0..1 | string | Name for this test plan (human friendly) |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (Required) |
experimental | Σ | 0..1 | boolean | For testing purposes, not real usage |
date | Σ | 0..1 | dateTime | Date last changed |
publisher | ΣT | 0..1 | string | Name of the publisher/steward (organization or individual) |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | T | 0..1 | markdown | Natural language description of the test plan |
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support |
jurisdiction | ΣXD | 0..* | CodeableConcept | Intended jurisdiction where the test plan applies (if applicable) Binding: Jurisdiction ValueSet (Extensible) |
purpose | T | 0..1 | markdown | Why this test plan is defined |
copyright | T | 0..1 | markdown | Use and/or publishing restrictions |
copyrightLabel | T | 0..1 | string | Copyright holder and year(s) |
category | 0..* | CodeableConcept | The category of the Test Plan - can be acceptance, unit, performance Binding: Test Script Scope Phase Type (Example) | |
scope | 0..* | Reference(Any) | What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference | |
testTools | 0..1 | markdown | A description of test tools to be used in the test plan - narrative for now | |
dependency | 0..* | BackboneElement | The required criteria to execute the test plan - e.g. preconditions, previous tests | |
description | 0..1 | markdown | Description of the dependency criterium | |
predecessor | 0..1 | Reference(TestPlan) | Link to predecessor test plans | |
exitCriteria | 0..1 | markdown | The threshold or criteria for the test plan to be considered successfully executed - narrative | |
testCase | 0..* | BackboneElement | The test cases that constitute this plan | |
key | 1..1 | id | Key that identifies this test case | |
description | 0..1 | markdown | Narrative description explaining the purpose of this test case | |
sequence | 0..1 | integer | Sequence of test case in the test plan | |
scope | 0..* | Reference(Any) | The scope or artifact covered by the case | |
requirement | 0..* | BackboneElement | Links or references to the testing requirements | |
reference | 1..1 | canonical(Requirements) | Canonical reference to the Requirements instance | |
key | 1..1 | id | Requirements statement key identifier | |
dependency | 0..* | BackboneElement | Required criteria to execute the test case | |
description | 0..1 | markdown | Description of the criteria | |
reference | 0..1 | canonical(TestPlan) | Canonical reference to the TestPlan dependency instance | |
key | 0..1 | id | TestPlan dependency instance testCase key identifier | |
testRun | 0..* | BackboneElement | The actual test to be executed | |
narrative | 0..1 | markdown | The narrative description of the tests | |
script | 0..1 | BackboneElement | The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript | |
language | 0..1 | CodeableConcept | The language for the test cases e.g. 'gherkin', 'testscript' | |
source[x] | 0..1 | The actual content of the cases - references to TestScripts or externally defined content | ||
sourceString | string | |||
sourceReference | Reference(Any) | |||
testData | 0..* | BackboneElement | The test data used in the test case | |
type | 1..1 | Coding | The type of test data description, e.g. 'synthea' | |
content | 0..1 | Reference(Any) | The actual test resources when they exist | |
source[x] | 0..1 | Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc | ||
sourceString | string | |||
sourceReference | Reference(Any) | |||
assertion | 0..* | BackboneElement | Test assertions or expectations | |
type | 0..* | CodeableConcept | Assertion type - for example 'informative' or 'required' | |
object | 0..* | CodeableReference() | The focus or object of the assertion | |
result | 0..* | CodeableReference() | The actual result assertion | |
Documentation for this format |
See the Extensions for this resource
XML Template
<TestPlan xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 0..1 Canonical identifier for this test plan, represented as a URI (globally unique) --> <identifier><!-- 0..* Identifier Business identifier identifier for the test plan --></identifier> <version value="[string]"/><!-- 0..1 Business version of the test plan --> <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]> <name value="[string]"/><!-- I 0..1 Name for this test plan (computer friendly) --> <title value="[string]"/><!-- 0..1 Name for this test plan (human friendly) --> <status value="[code]"/><!-- 1..1 draft | active | retired | unknown --> <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage --> <date value="[dateTime]"/><!-- 0..1 Date last changed --> <publisher value="[string]"/><!-- 0..1 Name of the publisher/steward (organization or individual) --> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the test plan --> <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction where the test plan applies (if applicable) --></jurisdiction> <purpose value="[markdown]"/><!-- 0..1 Why this test plan is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) --> <category><!-- 0..* CodeableConcept The category of the Test Plan - can be acceptance, unit, performance --></category> <scope><!-- 0..* Reference(Any) What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference --></scope> <testTools value="[markdown]"/><!-- 0..1 A description of test tools to be used in the test plan - narrative for now --> <dependency> <!-- 0..* The required criteria to execute the test plan - e.g. preconditions, previous tests --> <description value="[markdown]"/><!-- 0..1 Description of the dependency criterium --> <predecessor><!-- 0..1 Reference(TestPlan) Link to predecessor test plans --></predecessor> </dependency> <exitCriteria value="[markdown]"/><!-- 0..1 The threshold or criteria for the test plan to be considered successfully executed - narrative --> <testCase> <!-- 0..* The test cases that constitute this plan --> <key value="[id]"/><!-- 1..1 Key that identifies this test case --> <description value="[markdown]"/><!-- 0..1 Narrative description explaining the purpose of this test case --> <sequence value="[integer]"/><!-- 0..1 Sequence of test case in the test plan --> <scope><!-- 0..* Reference(Any) The scope or artifact covered by the case --></scope> <requirement> <!-- 0..* Links or references to the testing requirements --> <reference><!-- 1..1 canonical(Requirements) Canonical reference to the Requirements instance --></reference> <key value="[id]"/><!-- 1..1 Requirements statement key identifier --> </requirement> <dependency> <!-- 0..* Required criteria to execute the test case --> <description value="[markdown]"/><!-- 0..1 Description of the criteria --> <reference><!-- 0..1 canonical(TestPlan) Canonical reference to the TestPlan dependency instance --></reference> <key value="[id]"/><!-- 0..1 TestPlan dependency instance testCase key identifier --> </dependency> <testRun> <!-- 0..* The actual test to be executed --> <narrative value="[markdown]"/><!-- 0..1 The narrative description of the tests --> <script> <!-- 0..1 The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript --> <language><!-- 0..1 CodeableConcept The language for the test cases e.g. 'gherkin', 'testscript' --></language> <source[x]><!-- 0..1 string|Reference(Any) The actual content of the cases - references to TestScripts or externally defined content --></source[x]> </script> </testRun> <testData> <!-- 0..* The test data used in the test case --> <type><!-- 1..1 Coding The type of test data description, e.g. 'synthea' --></type> <content><!-- 0..1 Reference(Any) The actual test resources when they exist --></content> <source[x]><!-- 0..1 string|Reference(Any) Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc --></source[x]> </testData> <assertion> <!-- 0..* Test assertions or expectations --> <type><!-- 0..* CodeableConcept Assertion type - for example 'informative' or 'required' --></type> <object><!-- 0..* CodeableReference The focus or object of the assertion --></object> <result><!-- 0..* CodeableReference The actual result assertion --></result> </assertion> </testCase> </TestPlan>
JSON Template
{ "resourceType" : "TestPlan", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "url" : "<uri>", // Canonical identifier for this test plan, represented as a URI (globally unique) "identifier" : [{ Identifier }], // Business identifier identifier for the test plan "version" : "<string>", // Business version of the test plan // versionAlgorithm[x]: How to compare versions. One of these 2: "versionAlgorithmString" : "<string>", "versionAlgorithmCoding" : { Coding }, "name" : "<string>", // I Name for this test plan (computer friendly) "title" : "<string>", // Name for this test plan (human friendly) "status" : "<code>", // R! draft | active | retired | unknown "experimental" : <boolean>, // For testing purposes, not real usage "date" : "<dateTime>", // Date last changed "publisher" : "<string>", // Name of the publisher/steward (organization or individual) "contact" : [{ ContactDetail }], // Contact details for the publisher "description" : "<markdown>", // Natural language description of the test plan "useContext" : [{ UsageContext }], // The context that the content is intended to support "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction where the test plan applies (if applicable) "purpose" : "<markdown>", // Why this test plan is defined "copyright" : "<markdown>", // Use and/or publishing restrictions "copyrightLabel" : "<string>", // Copyright holder and year(s) "category" : [{ CodeableConcept }], // The category of the Test Plan - can be acceptance, unit, performance "scope" : [{ Reference(Any) }], // What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference "testTools" : "<markdown>", // A description of test tools to be used in the test plan - narrative for now "dependency" : [{ // The required criteria to execute the test plan - e.g. preconditions, previous tests "description" : "<markdown>", // Description of the dependency criterium "predecessor" : { Reference(TestPlan) } // Link to predecessor test plans }], "exitCriteria" : "<markdown>", // The threshold or criteria for the test plan to be considered successfully executed - narrative "testCase" : [{ // The test cases that constitute this plan "key" : "<id>", // R! Key that identifies this test case "description" : "<markdown>", // Narrative description explaining the purpose of this test case "sequence" : <integer>, // Sequence of test case in the test plan "scope" : [{ Reference(Any) }], // The scope or artifact covered by the case "requirement" : [{ // Links or references to the testing requirements "reference" : "<canonical(Requirements)>", // R! Canonical reference to the Requirements instance "key" : "<id>" // R! Requirements statement key identifier }], "dependency" : [{ // Required criteria to execute the test case "description" : "<markdown>", // Description of the criteria "reference" : "<canonical(TestPlan)>", // Canonical reference to the TestPlan dependency instance "key" : "<id>" // TestPlan dependency instance testCase key identifier }], "testRun" : [{ // The actual test to be executed "narrative" : "<markdown>", // The narrative description of the tests "script" : { // The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript "language" : { CodeableConcept }, // The language for the test cases e.g. 'gherkin', 'testscript' // source[x]: The actual content of the cases - references to TestScripts or externally defined content. One of these 2: "sourceString" : "<string>", "sourceReference" : { Reference(Any) } } }], "testData" : [{ // The test data used in the test case "type" : { Coding }, // R! The type of test data description, e.g. 'synthea' "content" : { Reference(Any) }, // The actual test resources when they exist // source[x]: Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc. One of these 2: "sourceString" : "<string>", "sourceReference" : { Reference(Any) } }], "assertion" : [{ // Test assertions or expectations "type" : [{ CodeableConcept }], // Assertion type - for example 'informative' or 'required' "object" : [{ CodeableReference }], // The focus or object of the assertion "result" : [{ CodeableReference }] // The actual result assertion }] }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:TestPlan; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:url [ uri ] ; # 0..1 Canonical identifier for this test plan, represented as a URI (globally unique) fhir:identifier ( [ Identifier ] ... ) ; # 0..* Business identifier identifier for the test plan fhir:version [ string ] ; # 0..1 Business version of the test plan # versionAlgorithm[x] : 0..1 How to compare versions. One of these 2 fhir:versionAlgorithm [ a fhir:string ; string ] fhir:versionAlgorithm [ a fhir:Coding ; Coding ] fhir:name [ string ] ; # 0..1 I Name for this test plan (computer friendly) fhir:title [ string ] ; # 0..1 Name for this test plan (human friendly) fhir:status [ code ] ; # 1..1 draft | active | retired | unknown fhir:experimental [ boolean ] ; # 0..1 For testing purposes, not real usage fhir:date [ dateTime ] ; # 0..1 Date last changed fhir:publisher [ string ] ; # 0..1 Name of the publisher/steward (organization or individual) fhir:contact ( [ ContactDetail ] ... ) ; # 0..* Contact details for the publisher fhir:description [ markdown ] ; # 0..1 Natural language description of the test plan fhir:useContext ( [ UsageContext ] ... ) ; # 0..* The context that the content is intended to support fhir:jurisdiction ( [ CodeableConcept ] ... ) ; # 0..* Intended jurisdiction where the test plan applies (if applicable) fhir:purpose [ markdown ] ; # 0..1 Why this test plan is defined fhir:copyright [ markdown ] ; # 0..1 Use and/or publishing restrictions fhir:copyrightLabel [ string ] ; # 0..1 Copyright holder and year(s) fhir:category ( [ CodeableConcept ] ... ) ; # 0..* The category of the Test Plan - can be acceptance, unit, performance fhir:scope ( [ Reference(Any) ] ... ) ; # 0..* What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference fhir:testTools [ markdown ] ; # 0..1 A description of test tools to be used in the test plan - narrative for now fhir:dependency ( [ # 0..* The required criteria to execute the test plan - e.g. preconditions, previous tests fhir:description [ markdown ] ; # 0..1 Description of the dependency criterium fhir:predecessor [ Reference(TestPlan) ] ; # 0..1 Link to predecessor test plans ] ... ) ; fhir:exitCriteria [ markdown ] ; # 0..1 The threshold or criteria for the test plan to be considered successfully executed - narrative fhir:testCase ( [ # 0..* The test cases that constitute this plan fhir:key [ id ] ; # 1..1 Key that identifies this test case fhir:description [ markdown ] ; # 0..1 Narrative description explaining the purpose of this test case fhir:sequence [ integer ] ; # 0..1 Sequence of test case in the test plan fhir:scope ( [ Reference(Any) ] ... ) ; # 0..* The scope or artifact covered by the case fhir:requirement ( [ # 0..* Links or references to the testing requirements fhir:reference [ canonical(Requirements) ] ; # 1..1 Canonical reference to the Requirements instance fhir:key [ id ] ; # 1..1 Requirements statement key identifier ] ... ) ; fhir:dependency ( [ # 0..* Required criteria to execute the test case fhir:description [ markdown ] ; # 0..1 Description of the criteria fhir:reference [ canonical(TestPlan) ] ; # 0..1 Canonical reference to the TestPlan dependency instance fhir:key [ id ] ; # 0..1 TestPlan dependency instance testCase key identifier ] ... ) ; fhir:testRun ( [ # 0..* The actual test to be executed fhir:narrative [ markdown ] ; # 0..1 The narrative description of the tests fhir:script [ # 0..1 The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript fhir:language [ CodeableConcept ] ; # 0..1 The language for the test cases e.g. 'gherkin', 'testscript' # source[x] : 0..1 The actual content of the cases - references to TestScripts or externally defined content. One of these 2 fhir:source [ a fhir:string ; string ] fhir:source [ a fhir:Reference ; Reference(Any) ] ] ; ] ... ) ; fhir:testData ( [ # 0..* The test data used in the test case fhir:type [ Coding ] ; # 1..1 The type of test data description, e.g. 'synthea' fhir:content [ Reference(Any) ] ; # 0..1 The actual test resources when they exist # source[x] : 0..1 Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc. One of these 2 fhir:source [ a fhir:string ; string ] fhir:source [ a fhir:Reference ; Reference(Any) ] ] ... ) ; fhir:assertion ( [ # 0..* Test assertions or expectations fhir:type ( [ CodeableConcept ] ... ) ; # 0..* Assertion type - for example 'informative' or 'required' fhir:object ( [ CodeableReference ] ... ) ; # 0..* The focus or object of the assertion fhir:result ( [ CodeableReference ] ... ) ; # 0..* The actual result assertion ] ... ) ; ] ... ) ; ]
Changes from both R4 and R4B
This resource did not exist in Release R4
See the Full Difference for further information
This analysis is available for R4 as XML or JSON and for R4B as XML or JSON.
Additional definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) , the spreadsheet version & the dependency analysis
Path | ValueSet | Type | Documentation |
---|---|---|---|
TestPlan.versionAlgorithm[x] | VersionAlgorithm | Extensible | Indicates the mechanism used to compare versions to determine which is more current. |
TestPlan.status | PublicationStatus | Required | The lifecycle status of an artifact. |
TestPlan.jurisdiction | JurisdictionValueSet | Extensible | This value set defines a base set of codes for country, country subdivision and region for indicating where a resource is intended to be used. Note: The codes for countries and country subdivisions are taken from ISO 3166 while the codes for "supra-national" regions are from UN Standard country or area codes for statistical use (M49) . |
TestPlan.category | TestScriptScopePhaseType | Example | The phase of testing for this artifact. |
UniqueKey | Level | Location | Description | Expression |
cnl-0 | Warning | (base) | Name should be usable as an identifier for the module by machine processing applications such as code generation | name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$') |
cnl-1 | Warning | TestPlan.url | URL should not contain | or # - these characters make processing canonical references problematic | exists() implies matches('^[^|# ]+$') |
Note to Implementers: TestPlan is a draft resource. Implementation is needed to assess its viability and implementer feedback is welcome. If no implementation feedback is available, the resource may be removed in future releases of FHIR.
Feedback is welcome here .
Search parameters for this resource. See also the full list of search parameters for this resource, and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Expression | In Common |
identifier | token | An identifier for the test plan | TestPlan.identifier | 36 Resources |
scope | reference | The scope that is to be tested with this test plan | TestPlan.scope (Any) |
|
status | token | The current status of the test plan | TestPlan.status | 36 Resources |
url N | uri | The uri that identifies the test plan | TestPlan.url | 35 Resources |