Skip to main content

TestScript

ResourceSpecialized · Quality Reporting & TestingTrial useMaturity 2

A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.

Tested supportFull test results →
Backends
PostgreSQLElasticsearch
Interactions
CreateReadUpdatePatchDelete
Search
14 of 16 parameters tested

Structure​

ElementCard.TypeDescription
urlRequiredΣ
1..1uriCanonical identifier for this test script, represented as a URI (globally unique)
identifierΣ
0..1IdentifierAdditional identifier for the test script
versionΣ
0..1stringBusiness version of the test script
nameRequiredΣ
1..1stringName for this test script (computer friendly)
titleΣ
0..1stringName for this test script (human friendly)
statusRequired?!Σ
1..1codedraft | active | retired | unknownBinding (required): publication-status
experimentalΣ
0..1booleanFor testing purposes, not real usage
dateΣ
0..1dateTimeDate last changed
publisherΣ
0..1stringName of the publisher (organization or individual)
contactΣ
0..*ContactDetailContact details for the publisher
description
0..1markdownNatural language description of the test script
useContextΣ
0..*UsageContextThe context that the content is intended to support
jurisdictionΣ
0..*CodeableConceptIntended jurisdiction for test script (if applicable)Binding (extensible): jurisdiction
purpose
0..1markdownWhy this test script is defined
copyright
0..1markdownUse and/or publishing restrictions
origin
0..*BackboneElementAn abstract server representing a client or sender in a message exchange
indexRequired
1..1integerThe index of the abstract origin server starting at 1
profileRequired
1..1CodingFHIR-Client | FHIR-SDC-FormFillerBinding (extensible): testscript-profile-origin-types
destination
0..*BackboneElementAn abstract server representing a destination or receiver in a message exchange
indexRequired
1..1integerThe index of the abstract destination server starting at 1
profileRequired
1..1CodingFHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessorBinding (extensible): testscript-profile-destination-types
metadata
0..1BackboneElementRequired capability that is assumed to function correctly on the FHIR server being tested
urlRequired
1..1uriURL to the specification
description
0..1stringShort description
capabilityRequired
1..*BackboneElementCapabilities that are assumed to function correctly on the FHIR server being tested
requiredRequired
1..1booleanAre the capabilities required?
validatedRequired
1..1booleanAre the capabilities validated?
description
0..1stringThe expected capabilities of the server
origin
0..*integerWhich origin server these requirements apply to
destination
0..1integerWhich server these requirements apply to
capabilitiesRequired
1..1canonical(CapabilityStatement)Required Capability Statement
fixture
0..*BackboneElementFixture in the test script - by reference (uri)
autocreateRequired
1..1booleanWhether or not to implicitly create the fixture during setup
autodeleteRequired
1..1booleanWhether or not to implicitly delete the fixture during teardown
resource
0..1Reference(Resource)Reference of the resource
profile
0..*Reference(Resource)Reference of the validation profile
variable
0..*BackboneElementPlaceholder for evaluated elements
nameRequired
1..1stringDescriptive name for this variable
defaultValue
0..1stringDefault, hard-coded, or user-defined value for this variable
description
0..1stringNatural language description of the variable
expression
0..1stringThe FHIRPath expression against the fixture body
headerField
0..1stringHTTP header field name for source
hint
0..1stringHint help text for default value to enter
path
0..1stringXPath or JSONPath against the fixture body
sourceId
0..1idFixture Id of source expression or headerField within this variable
setup
0..1BackboneElementA series of required setup operations before tests are executed
actionRequired
1..*BackboneElementA setup operation or assert to perform
operation
0..1BackboneElementThe setup operation to perform
type
0..1CodingThe operation code type that will be executedBinding (extensible): testscript-operation-codes
resource
0..1codeResource typeBinding (required): defined-types
label
0..1stringTracking/logging operation label
description
0..1stringTracking/reporting operation description
accept
0..1codeMime type to accept in the payload of the response, with charset etc.Binding (required): mimetypes
contentType
0..1codeMime type of the request payload contents, with charset etc.Binding (required): mimetypes
destination
0..1integerServer responding to the request
encodeRequestUrlRequired
1..1booleanWhether or not to send the request url in encoded format
method
0..1codedelete | get | options | patch | post | put | headBinding (required): http-operations
origin
0..1integerServer initiating the request
params
0..1stringExplicitly defined path parameters
requestHeader
0..*BackboneElementEach operation can have one or more header elements
fieldRequired
1..1stringHTTP header field name
valueRequired
1..1stringHTTP headerfield value
requestId
0..1idFixture Id of mapped request
responseId
0..1idFixture Id of mapped response
sourceId
0..1idFixture Id of body for PUT and POST requests
targetId
0..1idId of fixture used for extracting the [id], [type], and [vid] for GET requests
url
0..1stringRequest URL
assert
0..1BackboneElementThe assertion to perform
label
0..1stringTracking/logging assertion label
description
0..1stringTracking/reporting assertion description
direction
0..1coderesponse | requestBinding (required): assert-direction-codes
compareToSourceId
0..1stringId of the source fixture to be evaluated
compareToSourceExpression
0..1stringThe FHIRPath expression to evaluate against the source fixture
compareToSourcePath
0..1stringXPath or JSONPath expression to evaluate against the source fixture
contentType
0..1codeMime type to compare against the 'Content-Type' headerBinding (required): mimetypes
expression
0..1stringThe FHIRPath expression to be evaluated
headerField
0..1stringHTTP header field name
minimumId
0..1stringFixture Id of minimum content resource
operator
0..1codeequals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | evalBinding (required): assert-operator-codes
path
0..1stringXPath or JSONPath expression
requestMethod
0..1codedelete | get | options | patch | post | put | headBinding (required): http-operations
requestURL
0..1stringRequest URL comparison value
resource
0..1codeResource typeBinding (required): defined-types
response
0..1codeokay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessableBinding (required): assert-response-code-types
responseCode
0..1stringHTTP response code to test
sourceId
0..1idFixture Id of source expression or headerField
validateProfileId
0..1idProfile Id of validation profile reference
value
0..1stringThe value to compare to
warningOnlyRequired
1..1booleanWill this assert produce a warning only on error?
test
0..*BackboneElementA test in this script
name
0..1stringTracking/logging name of this test
description
0..1stringTracking/reporting short description of the test
actionRequired
1..*BackboneElementA test operation or assert to perform
operation
0..1Same as TestScript.setup.action.operationThe setup operation to perform
assert
0..1Same as TestScript.setup.action.assertThe setup assertion to perform
teardown
0..1BackboneElementA series of required clean up steps
actionRequired
1..*BackboneElementOne or more teardown operations to perform
operationRequired
1..1Same as TestScript.setup.action.operationThe teardown operation to perform

Σ in _summary results · ?! modifier element · 1.. required · inherited elements in grey

Search parameters​

Query with GET [base]/TestScript?[parameter]=[value]. Type decides which modifiers and prefixes apply, see search features.

ParameterTypeDescriptionPGES
contexttoken

A use context assigned to the test script

(TestScript.useContext.value.ofType(CodeableConcept))
context-quantityquantity

A quantity- or range-valued use context assigned to the test script

(TestScript.useContext.value.ofType(Quantity)) | (TestScript.useContext.value.ofType(Range))
context-typetoken

A type of use context assigned to the test script

TestScript.useContext.code
context-type-quantitycomposite

A use context type and quantity- or range-based value assigned to the test script

TestScript.useContext
context-type-valuecomposite

A use context type and value assigned to the test script

TestScript.useContext
datedate

The test script publication date

TestScript.date
descriptionstring

The description of the test script

TestScript.description
identifiertoken

External identifier for the test script

TestScript.identifier
jurisdictiontoken

Intended jurisdiction for the test script

TestScript.jurisdiction
namestring

Computationally friendly name of the test script

TestScript.name
publisherstring

Name of the publisher of the test script

TestScript.publisher
statustoken

The current status of the test script

TestScript.status
testscript-capabilitystring

TestScript required and validated capability

TestScript.metadata.capability.description
titlestring

The human-friendly name of the test script

TestScript.title
urluri

The uri that identifies the test script

TestScript.url
versiontoken

The business version of the test script

TestScript.version

PG: PostgreSQL, ES: Elasticsearch. passes its TestScript checks, fails, not tested yet.

Common parameters on every resource (8)
_haste-health-authorreference

The author of the resource

_idtoken

Logical id of this artifact

_lastUpdateddate

When the resource version last changed

_profileuri

Profiles this resource claims to conform to

_securitytoken

Security Labels applied to this resource

_sourceuri

Identifies where the resource comes from

_tagtoken

Tags applied to this resource

_typetoken

Derived from the R4B Definition