R6 Ballot (2nd Draft)

Publish-box (todo)

7.3 Resource TestPlan - Content

FHIR Infrastructure icon Work GroupMaturity Level: 0 DraftSecurity 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.

  • Implements: Definition
  • Resource References: itself

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. 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
.... 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


doco Documentation for this format icon

See the Extensions for this resource

UML Diagram (Legend)

TestPlan (DomainResource) +CanonicalResourceAn absolute URI that is used to identify this test plan when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this test plan is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test plan is stored on different serversurl : uri [0..1]A formal identifier that is used to identify this test plan when it is represented in other formats, or referenced in a specification, model, design or an instanceidentifier : Identifier [0..*]The identifier that is used to identify this version of the test plan when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test plan author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequenceversion : string [0..1]Indicates the mechanism used to compare versions to determine which is more currentversionAlgorithm[x] : DataType [0..1] « string|Coding; null (Strength=Extensible) VersionAlgorithm+ »A natural language name identifying the test plan. This name should be usable as an identifier for the module by machine processing applications such as code generationname : string [0..1] « This element has or is affected by some invariantsC »A short, descriptive, user-friendly title for the test plantitle : string [0..1]The status of this test plan. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements)status : code [1..1] « null (Strength=Required)PublicationStatus! »A Boolean value to indicate that this test plan is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the test plan was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test plan changesdate : dateTime [0..1]The name of the organization or individual responsible for the release and ongoing maintenance of the test planpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the test plan from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test plan instancesuseContext : UsageContext [0..*]A legal or geographic region in which the test plan is intended to be usedjurisdiction : CodeableConcept [0..*] « null (Strength=Extensible)JurisdictionValueSet+ »Explanation of why this test plan is needed and why it has been designed as it haspurpose : markdown [0..1]A copyright statement relating to the test plan and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test plan. The short copyright declaration (e.g. (c) '2015+ xyz organization' should be sent in the copyrightLabel elementcopyright : markdown [0..1]A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')copyrightLabel : string [0..1]The category of the Test Plan - can be acceptance, unit, performance, etccategory : CodeableConcept [0..*] « The high-level category for this plan. (Strength=Example)TestScriptScopePhaseType?? »What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference..scope : Reference [0..*] « Any »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]DependencyA textual description of the criterium - what is needed for the dependency to be considered metdescription : markdown [0..1]Predecessor test plans - those that are expected to be successfully performed as a dependency for the execution of this test planpredecessor : Reference [0..1] « TestPlan »TestCaseKey that identifies this test case (unique within this resource)key : id [1..1]Narrative description using markdown content to explain the purpose of this test casedescription : markdown [0..1]Sequence of test case - an ordinal number that indicates the order for the present test case in the test plansequence : integer [0..1]The scope or artifact covered by the case, when the individual test case is associated with a testable artifactscope : Reference [0..*] « Any »RequirementCanonical reference providing traceability to the testing requirement for this test casereference : canonical [1..1] « Requirements »Requirements.statement.key that identifies the statement that this test case satisfieskey : id [1..1]TestCaseDependencyDescription of the criteriadescription : markdown [0..1]Canonical reference providing traceability to the TestPlan dependency instance for this test casereference : canonical [0..1] « TestPlan »TestPlan.testCase.key that identifies the testCase in the TestPlan dependency instancekey : id [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(Any) »TestDataThe type of test data description, e.g. 'synthea'type : Coding [1..1]The actual test resources when they existcontent : Reference [0..1] « Any »Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etcsource[x] : DataType [0..1] « string|Reference(Any) »AssertionThe test assertion type - this can be used to group assertions as 'required' or 'optional', or can be used for other classification of the assertiontype : CodeableConcept [0..*]The focus or object of the assertion i.e. a resourceobject : CodeableReference [0..*] « »The test assertion - the expected outcome from the test case executionresult : CodeableReference [0..*] « »The required criteria to execute the test plan - e.g. preconditions, previous tests..dependency[0..*]Links or references providing traceability to the testing requirements for this assertrequirement[0..*]The required criteria to execute the test case - e.g. preconditions, previous testsdependency[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 assertions - the expectations of test results from the execution of the test caseassertion[0..*]The individual test cases that are part of this plan, when they they are made explicittestCase[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 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

{doco
  "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/> .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 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

NameFlagsCard.TypeDescription & Constraintsdoco
.. 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
.... 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


doco Documentation for this format icon

See the Extensions for this resource

UML Diagram (Legend)

TestPlan (DomainResource) +CanonicalResourceAn absolute URI that is used to identify this test plan when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this test plan is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test plan is stored on different serversurl : uri [0..1]A formal identifier that is used to identify this test plan when it is represented in other formats, or referenced in a specification, model, design or an instanceidentifier : Identifier [0..*]The identifier that is used to identify this version of the test plan when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test plan author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequenceversion : string [0..1]Indicates the mechanism used to compare versions to determine which is more currentversionAlgorithm[x] : DataType [0..1] « string|Coding; null (Strength=Extensible) VersionAlgorithm+ »A natural language name identifying the test plan. This name should be usable as an identifier for the module by machine processing applications such as code generationname : string [0..1] « This element has or is affected by some invariantsC »A short, descriptive, user-friendly title for the test plantitle : string [0..1]The status of this test plan. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements)status : code [1..1] « null (Strength=Required)PublicationStatus! »A Boolean value to indicate that this test plan is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the test plan was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test plan changesdate : dateTime [0..1]The name of the organization or individual responsible for the release and ongoing maintenance of the test planpublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the test plan from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test plan instancesuseContext : UsageContext [0..*]A legal or geographic region in which the test plan is intended to be usedjurisdiction : CodeableConcept [0..*] « null (Strength=Extensible)JurisdictionValueSet+ »Explanation of why this test plan is needed and why it has been designed as it haspurpose : markdown [0..1]A copyright statement relating to the test plan and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test plan. The short copyright declaration (e.g. (c) '2015+ xyz organization' should be sent in the copyrightLabel elementcopyright : markdown [0..1]A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')copyrightLabel : string [0..1]The category of the Test Plan - can be acceptance, unit, performance, etccategory : CodeableConcept [0..*] « The high-level category for this plan. (Strength=Example)TestScriptScopePhaseType?? »What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference..scope : Reference [0..*] « Any »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]DependencyA textual description of the criterium - what is needed for the dependency to be considered metdescription : markdown [0..1]Predecessor test plans - those that are expected to be successfully performed as a dependency for the execution of this test planpredecessor : Reference [0..1] « TestPlan »TestCaseKey that identifies this test case (unique within this resource)key : id [1..1]Narrative description using markdown content to explain the purpose of this test casedescription : markdown [0..1]Sequence of test case - an ordinal number that indicates the order for the present test case in the test plansequence : integer [0..1]The scope or artifact covered by the case, when the individual test case is associated with a testable artifactscope : Reference [0..*] « Any »RequirementCanonical reference providing traceability to the testing requirement for this test casereference : canonical [1..1] « Requirements »Requirements.statement.key that identifies the statement that this test case satisfieskey : id [1..1]TestCaseDependencyDescription of the criteriadescription : markdown [0..1]Canonical reference providing traceability to the TestPlan dependency instance for this test casereference : canonical [0..1] « TestPlan »TestPlan.testCase.key that identifies the testCase in the TestPlan dependency instancekey : id [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(Any) »TestDataThe type of test data description, e.g. 'synthea'type : Coding [1..1]The actual test resources when they existcontent : Reference [0..1] « Any »Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etcsource[x] : DataType [0..1] « string|Reference(Any) »AssertionThe test assertion type - this can be used to group assertions as 'required' or 'optional', or can be used for other classification of the assertiontype : CodeableConcept [0..*]The focus or object of the assertion i.e. a resourceobject : CodeableReference [0..*] « »The test assertion - the expected outcome from the test case executionresult : CodeableReference [0..*] « »The required criteria to execute the test plan - e.g. preconditions, previous tests..dependency[0..*]Links or references providing traceability to the testing requirements for this assertrequirement[0..*]The required criteria to execute the test case - e.g. preconditions, previous testsdependency[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 assertions - the expectations of test results from the execution of the test caseassertion[0..*]The individual test cases that are part of this plan, when they they are made explicittestCase[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 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

{doco
  "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/> .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 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 icon while the codes for "supra-national" regions are from UN Standard country or area codes for statistical use (M49) icon.

TestPlan.category TestScriptScopePhaseType Example

The phase of testing for this artifact.

UniqueKeyLevelLocationDescriptionExpression
img cnl-0Warning (base)Name should be usable as an identifier for the module by machine processing applications such as code generationname.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
img cnl-1Warning TestPlan.urlURL should not contain | or # - these characters make processing canonical references problematicexists() 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 icon.

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