R5 Final QA

This page is part of the FHIR Specification (v5.0.0-draft-final: Final QA Preview for R5 - see ballot notes). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

7.3 Resource TestPlan - Content

FHIR Infrastructure icon Work GroupMaturity Level: 0 DraftSecurity Category: Business Compartments: Not linked to any 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.

No references for this Resource.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestPlan ΣDDomainResourceA plan for executing testing on an artifact or specifications

Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ0..1uriCanonical identifier URL
... identifier Σ0..*IdentifierBusiness identifier

... version Σ0..*stringVersion

... title Σ0..*stringHuman-readable title

... status Σ0..*codedraft | active | retired | unknown
Binding: PublicationStatus (Required)

... date Σ0..*dateTimeDate

... publisher Σ0..*stringPublisher

... contact Σ0..*ContactDetailContact

... description Σ0..1markdownDescription
... jurisdiction Σ0..*CodeableConceptJurisdiction

... purpose Σ0..1markdownPurpose
... copyright Σ0..1markdownCopyright
... category Σ0..*CodeableConceptThe category of the Test Plan - can be acceptance, unit, performance

... scope Σ0..*Reference()What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference

... testTools Σ0..1markdownA description of test tools to be used in the test plan - narrative for now
... dependencies Σ0..*BackboneElementThe required criteria to execute the test plan - e.g. preconditions, previous tests

.... description Σ0..1markdownDescription of the criteria
.... predecessor Σ0..1Reference()Link to predecessor test plans
... exitCriteria Σ0..1markdownThe threshold or criteria for the test plan to be considered successfully executed - narrative
... testCase Σ0..*BackboneElementThe test cases that are part of this plan

.... sequence Σ0..1integerSequence of testing
.... scope Σ0..*Reference()Specific test scope for one test case

.... dependencies Σ0..*BackboneElementThe required criteria to execute the test case - e.g. preconditions, previous tests

..... description Σ0..1markdownDescription of the criteria
..... predecessor Σ0..1Reference()Link to predecessor test plans
.... testRun Σ0..*BackboneElementThe actual test to be executed

..... narrative Σ0..1markdownThe narrative description of the tests
..... script Σ0..1BackboneElementThe test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript
...... language Σ0..1CodeableConceptThe language for the test cases e.g. 'gherkin', 'testscript'
...... source[x] Σ0..1The actual content of the cases - references to TestScripts or externally defined content
....... sourceStringstring
....... sourceReferenceReference()
.... testData Σ0..*BackboneElementThe test data used in the test case

..... type Σ1..1CodingThe type of test data description, e.g. 'synthea'
..... content Σ0..1Reference()The actual test resources when they exist
..... source[x] Σ0..1Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc
...... sourceStringstring
...... sourceReferenceReference()
.... assertions Σ0..*BackboneElementThe test assertions

..... type Σ0..*CodeableConceptThe test assertion type

..... object Σ0..*CodeableReference()The focus or object of the assertion

..... result Σ0..*CodeableReference()The test assertions


doco Documentation for this format icon

See the Extensions for this resource

UML Diagram (Legend)

TestPlan (DomainResource)Canonical identifier URLurl : uri [0..1]Business identifier for the Test Planidentifier : Identifier [0..*]Version of the test planversion : string [0..*]Namename : string [0..*]Human-readable titletitle : string [0..*]Statusstatus : code [0..*] « null (Strength=Required)PublicationStatus! »Datedate : dateTime [0..*]Publisherpublisher : string [0..*]Contactcontact : ContactDetail [0..*]Description of the test plandescription : markdown [0..1]Jurisdictionjurisdiction : CodeableConcept [0..*]Purposepurpose : markdown [0..1]Copyrightcopyright : markdown [0..1]The category of the Test Plan - can be acceptance, unit, performance, etccategory : CodeableConcept [0..*]What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference..scope : Reference [0..*] « »A description of test tools to be used in the test plantestTools : markdown [0..1]The threshold or criteria for the test plan to be considered successfully executed - narrativeexitCriteria : markdown [0..1]DependenciesDescription of the criteriadescription : markdown [0..1]Link to predecessor test planspredecessor : Reference [0..1] « »TestCaseSequence of testingsequence : integer [0..1]Specific test scope for one test casescope : Reference [0..*] « »DependenciesDescription of the criteriadescription : markdown [0..1]Link to predecessor test planspredecessor : Reference [0..1] « »TestRunThe narrative description of the testsnarrative : markdown [0..1]ScriptThe language for the test cases e.g. 'gherkin', 'testscript'language : CodeableConcept [0..1]The actual content of the cases - references to TestScripts or externally defined contentsource[x] : DataType [0..1] « string|Reference »TestDataThe type of test data description, e.g. 'synthea'type : Coding [1..1]The actual test resources when they existcontent : Reference [0..1] « »Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etcsource[x] : DataType [0..1] « string|Reference »AssertionsThe test assertion typetype : CodeableConcept [0..*]The focus or object of the assertionobject : CodeableReference [0..*] « »The test assertionsresult : CodeableReference [0..*] « »The required criteria to execute the test plan - e.g. preconditions, previous tests..dependencies[0..*]The required criteria to execute the test case - e.g. preconditions, previous testsdependencies[0..*]The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScriptscript[0..1]The actual test to be executedtestRun[0..*]The test data used in the test casetestData[0..*]The test assertionsassertions[0..*]The test cases that are part of this plantestCase[0..*]

XML Template

<TestPlan xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 Canonical identifier URL -->
 <identifier><!-- 0..* Identifier Business identifier --></identifier>
 <version value="[string]"/><!-- 0..* Version -->
 <name value="[string]"/><!-- 0..* Name -->
 <title value="[string]"/><!-- 0..* Human-readable title -->
 <status value="[code]"/><!-- 0..* draft | active | retired | unknown -->
 <date value="[dateTime]"/><!-- 0..* Date -->
 <publisher value="[string]"/><!-- 0..* Publisher -->
 <contact><!-- 0..* ContactDetail Contact --></contact>
 <description value="[markdown]"/><!-- 0..1 Description -->
 <jurisdiction><!-- 0..* CodeableConcept Jurisdiction --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Purpose -->
 <copyright value="[markdown]"/><!-- 0..1 Copyright -->
 <category><!-- 0..* CodeableConcept The category of the Test Plan - can be acceptance, unit, performance --></category>
 <scope><!-- 0..* Reference 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 -->
 <dependencies>  <!-- 0..* The required criteria to execute the test plan - e.g. preconditions, previous tests -->
  <description value="[markdown]"/><!-- 0..1 Description of the criteria -->
  <predecessor><!-- 0..1 Reference Link to predecessor test plans --></predecessor>
 </dependencies>
 <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 are part of this plan -->
  <sequence value="[integer]"/><!-- 0..1 Sequence of testing -->
  <scope><!-- 0..* Reference Specific test scope for one test case --></scope>
  <dependencies>  <!-- 0..* The required criteria to execute the test case - e.g. preconditions, previous tests -->
   <description value="[markdown]"/><!-- 0..1 Description of the criteria -->
   <predecessor><!-- 0..1 Reference Link to predecessor test plans --></predecessor>
  </dependencies>
  <testRun> 0..* Reference  <!-- 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 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 The actual test resources when they exist --></content>
   <source[x]><!-- 0..1 string|Reference Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc --></source[x]>
  </testData>
  <assertions>  <!-- 0..* The test assertions -->
   <type><!-- 0..* CodeableConcept The test assertion type --></type>
   <object><!-- 0..* CodeableReference The focus or object of the assertion --></object>
   <result><!-- 0..* CodeableReference The test assertions --></result>
  </assertions>
 </testCase>
</TestPlan>

JSON Template

{doco
  "resourceType" : "TestPlan",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // Canonical identifier URL
  "identifier" : [{ Identifier }], // Business identifier
  "version" : ["<string>"], // Version
  "name" : ["<string>"], // Name
  "title" : ["<string>"], // Human-readable title
  "status" : ["<code>"], // draft | active | retired | unknown
  "date" : ["<dateTime>"], // Date
  "publisher" : ["<string>"], // Publisher
  "contact" : [{ ContactDetail }], // Contact
  "description" : "<markdown>", // Description
  "jurisdiction" : [{ CodeableConcept }], // Jurisdiction
  "purpose" : "<markdown>", // Purpose
  "copyright" : "<markdown>", // Copyright
  "category" : [{ CodeableConcept }], // The category of the Test Plan - can be acceptance, unit, performance
  "scope" : [{ Reference }], // 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
  "dependencies" : [{ // The required criteria to execute the test plan - e.g. preconditions, previous tests
    "description" : "<markdown>", // Description of the criteria
    "predecessor" : { Reference } // 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 are part of this plan
    "sequence" : <integer>, // Sequence of testing
    "scope" : [{ Reference }], // Specific test scope for one test case
    "dependencies" : [{ // The required criteria to execute the test case - e.g. preconditions, previous tests
      "description" : "<markdown>", // Description of the criteria
      "predecessor" : { Reference } // Link to predecessor test plans
    }],
    "testRun" : [{ Reference }], // 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 }
      }
    }
    "testData" : [{ // The test data used in the test case
      "type" : { Coding }, // R!  The type of test data description, e.g. 'synthea'
      "content" : { Reference }, // 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 }
    }],
    "assertions" : [{ // The test assertions
      "type" : [{ CodeableConcept }], // The test assertion type
      "object" : [{ CodeableReference }], // The focus or object of the assertion
      "result" : [{ CodeableReference }] // The test assertions
    }]
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ 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 URL
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Business identifier
  fhir:version  ( [ string ] ... ) ; # 0..* Version
  fhir:name  ( [ string ] ... ) ; # 0..* Name
  fhir:title  ( [ string ] ... ) ; # 0..* Human-readable title
  fhir:status  ( [ code ] ... ) ; # 0..* draft | active | retired | unknown
  fhir:date  ( [ dateTime ] ... ) ; # 0..* Date
  fhir:publisher  ( [ string ] ... ) ; # 0..* Publisher
  fhir:contact  ( [ ContactDetail ] ... ) ; # 0..* Contact
  fhir:description [ markdown ] ; # 0..1 Description
  fhir:jurisdiction  ( [ CodeableConcept ] ... ) ; # 0..* Jurisdiction
  fhir:purpose [ markdown ] ; # 0..1 Purpose
  fhir:copyright [ markdown ] ; # 0..1 Copyright
  fhir:category  ( [ CodeableConcept ] ... ) ; # 0..* The category of the Test Plan - can be acceptance, unit, performance
  fhir:scope  ( [ Reference ] ... ) ; # 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:dependencies ( [ # 0..* The required criteria to execute the test plan - e.g. preconditions, previous tests
    fhir:description [ markdown ] ; # 0..1 Description of the criteria
    fhir:predecessor [ Reference ] ; # 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 are part of this plan
    fhir:sequence [ integer ] ; # 0..1 Sequence of testing
    fhir:scope  ( [ Reference ] ... ) ; # 0..* Specific test scope for one test case
    fhir:dependencies ( [ # 0..* The required criteria to execute the test case - e.g. preconditions, previous tests
      fhir:description [ markdown ] ; # 0..1 Description of the criteria
      fhir:predecessor [ Reference ] ; # 0..1 Link to predecessor test plans
    ] ... ) ;
    fhir:testRun  ( [ Reference ] ... ) ; # 0..* The actual test to be executed
    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 ] ; # 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 ]
    ] ... ) ;
    fhir:assertions ( [ # 0..* The test assertions
      fhir:type  ( [ CodeableConcept ] ... ) ; # 0..* The test assertion type
      fhir:object  ( [ CodeableReference ] ... ) ; # 0..* The focus or object of the assertion
      fhir:result  ( [ CodeableReference ] ... ) ; # 0..* The test assertions
    ] ... ) ;
  ] ... ) ;
]

Changes since R4

This resource did not exist in Release 3

This analysis is available as XML or JSON.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. TestPlan ΣDDomainResourceA plan for executing testing on an artifact or specifications

Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ0..1uriCanonical identifier URL
... identifier Σ0..*IdentifierBusiness identifier

... version Σ0..*stringVersion

... title Σ0..*stringHuman-readable title

... status Σ0..*codedraft | active | retired | unknown
Binding: PublicationStatus (Required)

... date Σ0..*dateTimeDate

... publisher Σ0..*stringPublisher

... contact Σ0..*ContactDetailContact

... description Σ0..1markdownDescription
... jurisdiction Σ0..*CodeableConceptJurisdiction

... purpose Σ0..1markdownPurpose
... copyright Σ0..1markdownCopyright
... category Σ0..*CodeableConceptThe category of the Test Plan - can be acceptance, unit, performance

... scope Σ0..*Reference()What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference

... testTools Σ0..1markdownA description of test tools to be used in the test plan - narrative for now
... dependencies Σ0..*BackboneElementThe required criteria to execute the test plan - e.g. preconditions, previous tests

.... description Σ0..1markdownDescription of the criteria
.... predecessor Σ0..1Reference()Link to predecessor test plans
... exitCriteria Σ0..1markdownThe threshold or criteria for the test plan to be considered successfully executed - narrative
... testCase Σ0..*BackboneElementThe test cases that are part of this plan

.... sequence Σ0..1integerSequence of testing
.... scope Σ0..*Reference()Specific test scope for one test case

.... dependencies Σ0..*BackboneElementThe required criteria to execute the test case - e.g. preconditions, previous tests

..... description Σ0..1markdownDescription of the criteria
..... predecessor Σ0..1Reference()Link to predecessor test plans
.... testRun Σ0..*BackboneElementThe actual test to be executed

..... narrative Σ0..1markdownThe narrative description of the tests
..... script Σ0..1BackboneElementThe test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript
...... language Σ0..1CodeableConceptThe language for the test cases e.g. 'gherkin', 'testscript'
...... source[x] Σ0..1The actual content of the cases - references to TestScripts or externally defined content
....... sourceStringstring
....... sourceReferenceReference()
.... testData Σ0..*BackboneElementThe test data used in the test case

..... type Σ1..1CodingThe type of test data description, e.g. 'synthea'
..... content Σ0..1Reference()The actual test resources when they exist
..... source[x] Σ0..1Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc
...... sourceStringstring
...... sourceReferenceReference()
.... assertions Σ0..*BackboneElementThe test assertions

..... type Σ0..*CodeableConceptThe test assertion type

..... object Σ0..*CodeableReference()The focus or object of the assertion

..... result Σ0..*CodeableReference()The test assertions


doco Documentation for this format icon

See the Extensions for this resource

UML Diagram (Legend)

TestPlan (DomainResource)Canonical identifier URLurl : uri [0..1]Business identifier for the Test Planidentifier : Identifier [0..*]Version of the test planversion : string [0..*]Namename : string [0..*]Human-readable titletitle : string [0..*]Statusstatus : code [0..*] « null (Strength=Required)PublicationStatus! »Datedate : dateTime [0..*]Publisherpublisher : string [0..*]Contactcontact : ContactDetail [0..*]Description of the test plandescription : markdown [0..1]Jurisdictionjurisdiction : CodeableConcept [0..*]Purposepurpose : markdown [0..1]Copyrightcopyright : markdown [0..1]The category of the Test Plan - can be acceptance, unit, performance, etccategory : CodeableConcept [0..*]What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference..scope : Reference [0..*] « »A description of test tools to be used in the test plantestTools : markdown [0..1]The threshold or criteria for the test plan to be considered successfully executed - narrativeexitCriteria : markdown [0..1]DependenciesDescription of the criteriadescription : markdown [0..1]Link to predecessor test planspredecessor : Reference [0..1] « »TestCaseSequence of testingsequence : integer [0..1]Specific test scope for one test casescope : Reference [0..*] « »DependenciesDescription of the criteriadescription : markdown [0..1]Link to predecessor test planspredecessor : Reference [0..1] « »TestRunThe narrative description of the testsnarrative : markdown [0..1]ScriptThe language for the test cases e.g. 'gherkin', 'testscript'language : CodeableConcept [0..1]The actual content of the cases - references to TestScripts or externally defined contentsource[x] : DataType [0..1] « string|Reference »TestDataThe type of test data description, e.g. 'synthea'type : Coding [1..1]The actual test resources when they existcontent : Reference [0..1] « »Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etcsource[x] : DataType [0..1] « string|Reference »AssertionsThe test assertion typetype : CodeableConcept [0..*]The focus or object of the assertionobject : CodeableReference [0..*] « »The test assertionsresult : CodeableReference [0..*] « »The required criteria to execute the test plan - e.g. preconditions, previous tests..dependencies[0..*]The required criteria to execute the test case - e.g. preconditions, previous testsdependencies[0..*]The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScriptscript[0..1]The actual test to be executedtestRun[0..*]The test data used in the test casetestData[0..*]The test assertionsassertions[0..*]The test cases that are part of this plantestCase[0..*]

XML Template

<TestPlan xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 Canonical identifier URL -->
 <identifier><!-- 0..* Identifier Business identifier --></identifier>
 <version value="[string]"/><!-- 0..* Version -->
 <name value="[string]"/><!-- 0..* Name -->
 <title value="[string]"/><!-- 0..* Human-readable title -->
 <status value="[code]"/><!-- 0..* draft | active | retired | unknown -->
 <date value="[dateTime]"/><!-- 0..* Date -->
 <publisher value="[string]"/><!-- 0..* Publisher -->
 <contact><!-- 0..* ContactDetail Contact --></contact>
 <description value="[markdown]"/><!-- 0..1 Description -->
 <jurisdiction><!-- 0..* CodeableConcept Jurisdiction --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Purpose -->
 <copyright value="[markdown]"/><!-- 0..1 Copyright -->
 <category><!-- 0..* CodeableConcept The category of the Test Plan - can be acceptance, unit, performance --></category>
 <scope><!-- 0..* Reference 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 -->
 <dependencies>  <!-- 0..* The required criteria to execute the test plan - e.g. preconditions, previous tests -->
  <description value="[markdown]"/><!-- 0..1 Description of the criteria -->
  <predecessor><!-- 0..1 Reference Link to predecessor test plans --></predecessor>
 </dependencies>
 <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 are part of this plan -->
  <sequence value="[integer]"/><!-- 0..1 Sequence of testing -->
  <scope><!-- 0..* Reference Specific test scope for one test case --></scope>
  <dependencies>  <!-- 0..* The required criteria to execute the test case - e.g. preconditions, previous tests -->
   <description value="[markdown]"/><!-- 0..1 Description of the criteria -->
   <predecessor><!-- 0..1 Reference Link to predecessor test plans --></predecessor>
  </dependencies>
  <testRun> 0..* Reference  <!-- 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 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 The actual test resources when they exist --></content>
   <source[x]><!-- 0..1 string|Reference Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc --></source[x]>
  </testData>
  <assertions>  <!-- 0..* The test assertions -->
   <type><!-- 0..* CodeableConcept The test assertion type --></type>
   <object><!-- 0..* CodeableReference The focus or object of the assertion --></object>
   <result><!-- 0..* CodeableReference The test assertions --></result>
  </assertions>
 </testCase>
</TestPlan>

JSON Template

{doco
  "resourceType" : "TestPlan",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // Canonical identifier URL
  "identifier" : [{ Identifier }], // Business identifier
  "version" : ["<string>"], // Version
  "name" : ["<string>"], // Name
  "title" : ["<string>"], // Human-readable title
  "status" : ["<code>"], // draft | active | retired | unknown
  "date" : ["<dateTime>"], // Date
  "publisher" : ["<string>"], // Publisher
  "contact" : [{ ContactDetail }], // Contact
  "description" : "<markdown>", // Description
  "jurisdiction" : [{ CodeableConcept }], // Jurisdiction
  "purpose" : "<markdown>", // Purpose
  "copyright" : "<markdown>", // Copyright
  "category" : [{ CodeableConcept }], // The category of the Test Plan - can be acceptance, unit, performance
  "scope" : [{ Reference }], // 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
  "dependencies" : [{ // The required criteria to execute the test plan - e.g. preconditions, previous tests
    "description" : "<markdown>", // Description of the criteria
    "predecessor" : { Reference } // 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 are part of this plan
    "sequence" : <integer>, // Sequence of testing
    "scope" : [{ Reference }], // Specific test scope for one test case
    "dependencies" : [{ // The required criteria to execute the test case - e.g. preconditions, previous tests
      "description" : "<markdown>", // Description of the criteria
      "predecessor" : { Reference } // Link to predecessor test plans
    }],
    "testRun" : [{ Reference }], // 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 }
      }
    }
    "testData" : [{ // The test data used in the test case
      "type" : { Coding }, // R!  The type of test data description, e.g. 'synthea'
      "content" : { Reference }, // 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 }
    }],
    "assertions" : [{ // The test assertions
      "type" : [{ CodeableConcept }], // The test assertion type
      "object" : [{ CodeableReference }], // The focus or object of the assertion
      "result" : [{ CodeableReference }] // The test assertions
    }]
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ 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 URL
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Business identifier
  fhir:version  ( [ string ] ... ) ; # 0..* Version
  fhir:name  ( [ string ] ... ) ; # 0..* Name
  fhir:title  ( [ string ] ... ) ; # 0..* Human-readable title
  fhir:status  ( [ code ] ... ) ; # 0..* draft | active | retired | unknown
  fhir:date  ( [ dateTime ] ... ) ; # 0..* Date
  fhir:publisher  ( [ string ] ... ) ; # 0..* Publisher
  fhir:contact  ( [ ContactDetail ] ... ) ; # 0..* Contact
  fhir:description [ markdown ] ; # 0..1 Description
  fhir:jurisdiction  ( [ CodeableConcept ] ... ) ; # 0..* Jurisdiction
  fhir:purpose [ markdown ] ; # 0..1 Purpose
  fhir:copyright [ markdown ] ; # 0..1 Copyright
  fhir:category  ( [ CodeableConcept ] ... ) ; # 0..* The category of the Test Plan - can be acceptance, unit, performance
  fhir:scope  ( [ Reference ] ... ) ; # 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:dependencies ( [ # 0..* The required criteria to execute the test plan - e.g. preconditions, previous tests
    fhir:description [ markdown ] ; # 0..1 Description of the criteria
    fhir:predecessor [ Reference ] ; # 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 are part of this plan
    fhir:sequence [ integer ] ; # 0..1 Sequence of testing
    fhir:scope  ( [ Reference ] ... ) ; # 0..* Specific test scope for one test case
    fhir:dependencies ( [ # 0..* The required criteria to execute the test case - e.g. preconditions, previous tests
      fhir:description [ markdown ] ; # 0..1 Description of the criteria
      fhir:predecessor [ Reference ] ; # 0..1 Link to predecessor test plans
    ] ... ) ;
    fhir:testRun  ( [ Reference ] ... ) ; # 0..* The actual test to be executed
    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 ] ; # 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 ]
    ] ... ) ;
    fhir:assertions ( [ # 0..* The test assertions
      fhir:type  ( [ CodeableConcept ] ... ) ; # 0..* The test assertion type
      fhir:object  ( [ CodeableReference ] ... ) ; # 0..* The focus or object of the assertion
      fhir:result  ( [ CodeableReference ] ... ) ; # 0..* The test assertions
    ] ... ) ;
  ] ... ) ;
]

Changes since Release 4

This resource did not exist in Release 3

This analysis is available as XML or JSON.

 

Additional definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions, the spreadsheet version & the dependency analysis

PathValueSetTypeDocumentation
TestPlan.status PublicationStatus Required

The lifecycle status of an artifact.

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.

(No search parameters for this resource)