FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions icon

7.3 Resource TestPlan - Content

FHIR Infrastructure icon Work GroupMaturity Level: 1 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 ActorDefinition, 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 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 only - never for 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..* BackboneElement What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference

.... artifact[x] 1..1 The specific conformance artifact, or narrative criteria, or an external reference being tested
..... artifactCanonical canonical(ActivityDefinition | ActorDefinition | CapabilityStatement | ImplementationGuide | Library | Measure | MessageDefinition | OperationDefinition | PlanDefinition | Questionnaire | Requirements | StructureDefinition | SearchParameter | StructureMap | SubscriptionTopic)
..... artifactMarkdown markdown
..... artifactUri uri
... 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..* BackboneElement The scope or artifact covered by the case

..... artifact[x] 1..1 The specific conformance artifact, or narrative criteria, or an external reference covered by the case
...... artifactCanonical canonical(ActivityDefinition | ActorDefinition | CapabilityStatement | ImplementationGuide | Library | Measure | MessageDefinition | OperationDefinition | PlanDefinition | Questionnaire | Requirements | StructureDefinition | SearchParameter | StructureMap | SubscriptionTopic)
...... artifactMarkdown markdown
...... artifactUri uri
.... 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
...... language 0..1 CodeableConcept The structured language for the test case script
Binding: TestPlanScriptLanguage (Example)
...... source[x] 0..1 The actual content of the script, reference to test resource (TestScript) or externally defined content
....... sourceString string
....... sourceAttachment Attachment
....... 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
...... sourceUri uri
...... sourceReference Reference(Any)
.... assertion 0..* BackboneElement Test assertions or expectations

..... type 0..* CodeableConcept The expected outcome for this assertion
Binding: TestPlanAssertionType (Example)

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

..... result 0..* CodeableReference(Any) The actual result assertion

.... testCase 0..* see testCase Nested test cases


doco Documentation for this format icon

See the Extensions for this resource

 

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.

TestPlan.testCase.testRun.script.language TestPlanScriptLanguage Example

The TestPlan test run script language.

TestPlan.testCase.assertion.type TestPlanAssertionType Example

The TestPlan test case assertion type.

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
category token The category for the test plan TestPlan.category
context token A use context assigned to the test script (TestPlan.useContext.value.ofType(CodeableConcept)) 30 Resources
context-quantity quantity A quantity- or range-valued use context assigned to the test script (TestPlan.useContext.value.ofType(Quantity)) | (TestPlan.useContext.value.ofType(Range)) 30 Resources
context-type token A type of use context assigned to the test script TestPlan.useContext.code 30 Resources
context-type-quantity composite A use context type and quantity- or range-based value assigned to the test script On TestPlan.useContext:
  context-type: code
  context-quantity: value.ofType(Quantity) | value.ofType(Range)
30 Resources
context-type-value composite A use context type and value assigned to the test script On TestPlan.useContext:
  context-type: code
  context: value.ofType(CodeableConcept)
30 Resources
date date The test script publication date TestPlan.date 31 Resources
description string The description of the test script TestPlan.description 29 Resources
identifier token An identifier for the test plan TestPlan.identifier 35 Resources
jurisdiction token Intended jurisdiction for the test script TestPlan.jurisdiction 27 Resources
name string Computationally friendly name of the test script TestPlan.name 28 Resources
publisher string Name of the publisher of the test script TestPlan.publisher 31 Resources
requirement uri Canonical reference to a requirement this TestPlan supports TestPlan.testCase.requirement.reference
requirement-key composite Canonical reference to a requirement and statement (key) this TestPlan supports On TestPlan.testCase.requirement:
  reference: reference
  key: key
scope-canonical uri URL contained in TestPlan.scope.artifactCanonical TestPlan.scope.artifact.ofType(canonical)
scope-uri uri URL contained in TestPlan.scope.artifactUri TestPlan.scope.artifact.ofType(uri)
status token The current status of the test plan TestPlan.status 35 Resources
title string The human-friendly name of the test script TestPlan.title 28 Resources
url uri The uri that identifies the test plan TestPlan.url 34 Resources
version token The business version of the test script TestPlan.version 32 Resources