This
page
is
part
of
the
FHIR
Specification
(v1.0.2:
DSTU
(v3.0.2:
STU
2).
3).
The
current
version
which
supercedes
this
version
is
5.0.0
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
R2
R3
R2
FHIR
Infrastructure
Work
Group
|
Maturity
Level
:
| Trial Use | Compartments : Not linked to any defined compartments |
TestScript
is
a
resource
that
specifies
a
suite
A
structured
set
of
tests
against
a
FHIR
server
implementation
to
determine
compliance
against
the
FHIR
specification.
The TestScript resource is used to define tests that can be executed on one or more FHIR servers. The TestScript resource would typically contain
For example, one TestScript might feature a set of tests focusing on searching Patients and validating the Bundle responses. The fixtures for such a test would contain a list of Patient resources that are required for the test to complete successfully. The setup procedures create the fixtures on the FHIR server being tested. A series of tests execute various search parameters and search for the fixtures in the results. The teardown procedures would then clean up (delete) the fixtures on FHIR server that were created during the setup procedures.
The purpose of the TestScript is to encode in an executable representation tests that can be used to
The TestScript resource should NOT be used to represent Clinical tests, Prescriptions, or any other Healthcare related concept. The TestScript resource is an infrastructure support resource used to represent standardized tests to determine an implementation's level of adherence to the FHIR specification.
The
TestScript
resource
relies
is
a
part
of
the
conformance
framework;
its
purpose
framework
and
is
used
to
validate
the
behavior
of
FHIR
systems,
specifically
their
correct
implementation
of
StructureDefinition,
ValueSet,
OperationDefinition,
CapabilityStatement
and
other
FHIR
resources
that
govern
system
behavior.
TestScript
instances
may
be
included
as
part
of
ImplementationGuides
to
help
define
and
test
whether
the
desired
behavior
of
systems
conform
that
choose
to
a
set
of
expectations.
comply
with
the
implementation
guide.
The
expectations
following
resources
represent
the
FHIR
conformance
framework
that
are
expressed
using
a
combination
of
used
to
express
the
following
resources:
expected
behavior
of
a
FHIR
compliant
system:
The
TestScript
resource
is
designed
to
establish
testing
as
a
first
class
artifact
within
the
FHIR
specification.
This
resource
allows
defining
a
suite
of
tests
that
can
be
executed
on
one
or
more
FHIR
servers.
The
TestScript
resource
provides
an
implementation
agnostic
description
of
tests
that
allows
test
execution
engines
to
evaluate
if
a
server
implementation
conforms
with
the
FHIR
specification.
Providing
a
clear
and
concise
test
methodology
for
the
FHIR
specification
through
the
TestScript
resource
helps
to
enable
interoperability
among
various
FHIR
server
and
client
implementations.
Furthermore,
the
TestScript
resource
provides
clear
examples
of
the
appropriate
use
of
the
FHIR
specification
through
test-based
documentation.
The
TestScript
resource
stands
as
a
form
of
executable
documentation
allowing
developers
to
examine
the
operations
defined
by
the
tests
to
understand
how
various
RESTful
API
interactions
and
resources
should
be
used
in
coordination.
The
tests
can
also
be
automatically
executed
against
systems
under
development
to
determine
how
well
the
systems
adhere
to
the
specification.
The
TestScript
resource
contains:
Name
and
description
detailing
the
purpose
of
the
test
suite
Links
describing
how
the
test
suite
relates
to
the
FHIR
specification
A
list
of
server
interactions
required
to
execute
the
test
suite
A
list
of
server
interactions
that
the
test
suite
validates
the
correctness
of
The
fixtures
(required
data
or
resources)
the
tests
use
during
execution
A
set
of
operations
to
set
up
the
test
suite
environment
A
list
of
tests
each
containing
Name
servers
and
description
of
the
test
Links
describing
how
the
test
relates
to
the
FHIR
specification
A
list
of
server
interactions
required
to
execute
the
test
A
list
of
server
interactions
that
the
test
validates
the
correctness
of
A
list
of
operations
that
provide
the
execution
logic
of
the
test
A
list
of
assertions
that
provide
the
verification
logic
of
the
test
A
set
of
operations
to
tear
down
the
test
environment
6.24.3.2
Execution
6.24.3.2.1
Workflow
Pre-Processing
The
TestScript
execution
workflow
begins
by
determining
if
the
test
suite
is
appropriate
for
the
server
under
test.
This
can
be
determined
by
evaluating
if
the
interactions
listed
in
the
TestScript
metadata
"capabilities"
section
are
supported
by
the
server's
conformance
resource.
If
the
capabilities
are
supported
by
the
server,
then
the
TestScript
can
be
executed.
Otherwise,
the
TestScript
as
a
whole
or
a
specific
test
within
the
test
script
may
be
skipped
depending
on
where
the
capabilities
section
is
defined.
See
How
to
specify
metadata
capabilities
.
If
the
server
supports
the
requirements
of
the
TestScript
instance,
any
specified
fixtures
are
loaded
or
retrieved.
If
the
fixtures
are
marked
as
'autocreate'
then
they
are
automatically
created
on
the
server(s)
under
test
using
'create'
operations.
If
any
of
the
autocreate
operations
fail,
then
the
tests
in
the
TestScript
are
skipped.
Setup
Execution
clients.
After
the
fixtures
are
loaded
and
autocreates
are
executed,
then
the
setup
section
is
executed
to
establish
the
test
suite
environment.
The
purpose
of
the
setup
section
is
typically
to
pre-load
data
(if
it
was
not
autocreated)
required
for
the
execution
of
the
tests
into
the
FHIR
server
under
test.
The
setup
operations
are
executed
once
before
all
the
tests
are
run
(see
Operation
Execution
).
All
operations
in
a
setup
section
(including
assertions)
must
complete
successfully
for
the
tests
to
be
executed.
If
an
assertion
operation
in
the
setup
section
fails,
then
execution
and
evaluation
of
the
tests
in
the
TestScript
Implementers
should
be
skipped.
Technically,
any
operation
(see
the
operations
table
for
a
complete
listing)
can
be
included
in
the
setup
section,
but
typical
operations
will
be
create,
update,
read,
and
vread.
Due
to
the
possibility
that
the
setup
actions
are
not
required
on
the
server
under
test,
the
TestScript
execution
workflow
MAY
provide
the
capability
of
skipping
or
ignoring
the
setup
section
of
familiar
with
the
TestScript.
Test
Execution
Once
setup
is
complete,
each
test
is
executed.
Tests
contain
a
set
of
operations,
testing
concepts
and
executing
a
test
involves
the
evaluation
of
each
operation
listed
in
the
test
descriptions
found
in
the
order
defined
by
the
test
(see
Operation
Execution
and
the
list
of
operations
).
Teardown
Execution
After
all
the
tests
have
completed
execution,
the
teardown
section
is
executed.
The
purpose
of
the
teardown
section
is
to
revert
the
Testing
FHIR
server
under
test
to
a
pre-test
clean
state.
This
requires
removing
any
resources
or
artifacts
generated
as
part
of
test
suite
setup
or
test
execution.
Technically,
any
operation
(see
the
operations
table
for
a
complete
listing)
can
be
included
in
the
teardown
section,
but
the
most
often
used
operation
will
be
delete.
Assertions
are
not
supported
in
the
teardown
section.
Due
to
the
possibility
that
the
teardown
actions
are
not
required
on
the
server
under
test,
the
TestScript
execution
workflow
MAY
provide
the
capability
of
skipping
or
ignoring
the
teardown
section
of
the
TestScript.
Post-Processing
After
the
teardown
section
is
executed,
any
fixtures
that
were
marked
'autodelete'
are
removed
from
the
server(s)
under
test.
After
before
working
with
this
final
stage,
the
execution
of
the
TestScript
is
complete.
resource.
The
fixtures
section
of
the
TestScript
defines
a
set
of
resource
instances
that
will
be
used
as
part
of
the
setup,
test,
and
teardown
sections
during
TestScript
execution.
The
fixtures
are
required
for
the
test
script
to
execute.
Each
fixture
defines
a
resource
instance
by
URI,
and
must
be
identified
by
an
ID.
The
URI
can
be
local
or
remote
(i.e.
another
server
than
the
one
the
TestScript
resource
resides),
absolute
or
relative.
The
ID
on
the
fixture
is
considered
the
"source"
identifier
of
the
fixture
--
it
is
not
the
same
thing
as
the
This
resource
ID
on
the
server
where
it
was
hosted.
The
"source"
identifier
is
used
to
define
the
fixture
instance
within
the
context
of
the
TestScript.
Operations
reference
the
ID
of
a
fixture
to
uniquely
identify
the
fixture
instance
the
operation
is
using
("sourceId")
or
acting
against
("targetId").
Once
a
fixture
has
been
instantiated
on
a
server
(typically
referenced
by
the
use
of
a
create
operation),
the
fixture
ID
is
mapped
to
the
ID
of
the
corresponding
resource
instance
on
the
server.
TestScript
execution
engines
must
maintain
this
relationship
between
fixture
IDs
and
server
resource
IDs.
The
TestScript
execution
engine
is
responsible
for
translating
the
fixture
IDs
(whether
provided
to
the
operation
as
"source"
or
"target")
to
the
ID
of
the
resource
on
the
server
during
execution.
Using
the
optional
"autocreate"
and
"autodelete"
elements
(missing
values
default
to
false),
fixtures
can
be
configured
to
automatically
be
created
during
TestScript
setup
and
automatically
deleted
during
TestScript
teardown.
This
means
that
additional
"create"
and
"delete"
operations
in
the
TestScript.setup
and
TestScript.teardown
sections
are
unnecessary.
6.24.3.2.3
Variables
testreport
The
variables
section
of
the
TestScript
defines
a
set
of
expressions
whose
evaluations
will
be
used
in
substitutions.
These
substitutions
are
performed
in
operation
request
headers
and
URL
paths
as
well
as
assertion
values.
Structure
| Name | Flags | Card. | Type |
Description
&
Constraints
|
|---|---|---|---|---|
|
DomainResource |
Describes
a
set
of
tests
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension |
||
|
Σ | 1..1 | uri |
Logical
URI
to
reference
this
|
| Σ | 0..1 | Identifier | Additional identifier for the test script |
![]() ![]() |
Σ | 0..1 | string |
Business
version
of
the
|
|
Σ | 1..1 | string |
Name
for
this
|
| Σ | 0..1 | string | Name for this test script (human friendly) |
![]() ![]() |
?! Σ | 1..1 | code |
draft
|
active
|
retired
|
unknown
|
|
?! Σ | 0..1 |
|
For testing purposes, not real usage |
|
Σ | 0..1 |
|
Date this was last changed |
|
Σ | 0..1 | string |
Name
of
the
publisher
|
|
Σ | 0..* |
|
Contact
details
|
|
0..1 | markdown | Natural language description of the test script | |
| Σ | 0..* |
|
Context
the
content
is
intended
to
|
|
Σ | 0..* |
|
Intended
jurisdiction
for
Jurisdiction ValueSet ( Extensible ) |
|
0..1 | markdown | Why this test script is defined | |
![]() ![]() | 0..1 |
|
Use and/or publishing restrictions | |
|
0..* | BackboneElement |
An
abstract
server
representing
a
client
or
sender
in
a
message
exchange
|
|
|
1..1 | integer |
The
index
of
the
|
|
|
1..1 |
|
FHIR-Client
|
FHIR-SDC-FormFiller
|
|
|
0..* |
|
An
abstract
server
representing
a
destination
or
receiver
in
a
message
exchange
|
|
|
1..1 |
|
The index of the abstract destination server starting at 1 | |
| 1..1 | Coding |
FHIR-Server
|
FHIR-SDC-FormManager
|
FHIR-SDC-FormReceiver
|
FHIR-SDC-FormProcessor
TestScriptProfileDestinationType ( Extensible ) | |
![]() ![]() |
I | 0..1 | BackboneElement |
Required
capability
that
is
assumed
to
function
correctly
on
the
FHIR
server
being
tested
+ TestScript metadata capability SHALL contain required or validated or both. |
|
0..* | BackboneElement |
Links
to
the
FHIR
specification
|
|
|
1..1 | uri | URL to the specification | |
|
0..1 | string | Short description | |
|
1..* | BackboneElement |
Capabilities
that
are
assumed
to
function
correctly
on
the
FHIR
server
being
tested
|
|
|
0..1 | boolean | Are the capabilities required? | |
|
0..1 | boolean | Are the capabilities validated? | |
|
0..1 | string | The expected capabilities of the server | |
|
0..* | integer |
Which
origin
server
these
requirements
apply
to
|
|
|
0..1 |
|
Which
server
these
requirements
apply
to
|
|
|
0..* |
|
Links
to
the
FHIR
specification
|
|
|
1..1 |
|
Required Capability Statement | |
|
0..* | BackboneElement |
Fixture
in
the
test
script
-
by
reference
(uri)
|
|
|
0..1 | boolean | Whether or not to implicitly create the fixture during setup | |
|
0..1 | boolean | Whether or not to implicitly delete the fixture during teardown | |
|
0..1 | Reference ( Any ) | Reference of the resource | |
|
0..* | Reference ( Any ) |
Reference
of
the
validation
profile
|
|
|
I | 0..* | BackboneElement |
Placeholder
for
evaluated
elements
+ Variable |
|
1..1 | string | Descriptive name for this variable | |
| 0..1 | string | Default, hard-coded, or user-defined value for this variable | |
![]() ![]() ![]() | 0..1 | string | Natural language description of the variable | |
![]() ![]() ![]() | 0..1 | string | The fluentpath expression against the fixture body | |
![]() ![]() ![]() |
0..1 | string | HTTP header field name for source | |
| 0..1 | string | Hint help text for default value to enter | |
![]() ![]() ![]() |
0..1 | string | XPath or JSONPath against the fixture body | |
|
0..1 | id | Fixture Id of source expression or headerField within this variable | |
|
0..* | BackboneElement |
Assert
rule
used
within
the
test
script
|
|
|
1..1 | Reference ( Any ) | Assert rule resource reference | |
![]() ![]() ![]() | 0..* | BackboneElement |
Rule
parameter
template
| |
![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert rule parameter | |
![]() ![]() ![]() ![]() | 0..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() | 0..* | BackboneElement |
Assert
ruleset
used
within
the
|
|
| 1..1 | Reference ( Any ) | Assert ruleset resource reference | |
![]() ![]() ![]() | 1..* | BackboneElement |
The
referenced
rule
within
the
ruleset
| |
![]() ![]() ![]() ![]() | 1..1 | id | Id of referenced rule within the ruleset | |
![]() ![]() ![]() ![]() | 0..* | BackboneElement |
Ruleset
rule
parameter
template
| |
![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert ruleset rule parameter | |
![]() ![]() ![]() ![]() ![]() | 0..1 | string |
Parameter
value
defined
either
explicitly
or
| |
![]() ![]() | 0..1 | BackboneElement | A series of required setup operations before tests are executed | |
|
I | 1..* | BackboneElement |
A
setup
operation
or
assert
to
perform
+ Setup action SHALL contain either an operation or assert but not both. |
|
I | 0..1 | BackboneElement |
The
setup
operation
to
perform
+ Setup operation SHALL contain either sourceId or targetId or params or url. |
|
0..1 | Coding |
The
|
|
|
0..1 | code |
Resource
type
FHIRDefinedType ( Required ) |
|
|
0..1 | string | Tracking/logging operation label | |
|
0..1 | string | Tracking/reporting operation description | |
|
0..1 | code |
xml
|
json
|
ttl
|
none
ContentType ( Required ) |
|
|
0..1 | code |
xml
|
json
|
ttl
|
none
ContentType ( Required ) |
|
|
0..1 | integer |
Server
responding
to
|
|
|
0..1 | boolean | Whether or not to send the request url in encoded format | |
| 0..1 | integer | Server initiating the request | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Explicitly defined path parameters | |
|
0..* | BackboneElement |
Each
operation
can
have
one
|
|
|
1..1 | string | HTTP header field name | |
|
1..1 | string | HTTP headerfield value | |
| 0..1 | id | Fixture Id of mapped request | |
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Fixture Id of mapped response | |
|
0..1 | id | Fixture Id of body for PUT and POST requests | |
|
0..1 | id | Id of fixture used for extracting the [id], [type], and [vid] for GET requests | |
|
0..1 | string | Request URL | |
|
I | 0..1 | BackboneElement |
The
assertion
to
perform
+ Only a single assertion SHALL be present within setup action assert element. + Setup action assert |
|
0..1 | string | Tracking/logging assertion label | |
|
0..1 | string | Tracking/reporting assertion description | |
|
0..1 | code |
response
|
request
AssertionDirectionType ( Required ) |
|
|
0..1 | string |
Id
of
the
source
fixture
| |
![]() ![]() ![]() ![]() ![]() | 0..1 | string | The fluentpath expression to evaluate against the source fixture | |
|
0..1 | string |
XPath
or
JSONPath
expression
|
|
|
0..1 | code |
xml
|
json
|
ttl
|
none
ContentType ( Required ) |
|
| 0..1 | string | The fluentpath expression to be evaluated | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | HTTP header field name | |
|
0..1 | string | Fixture Id of minimum content resource | |
|
0..1 | boolean | Perform validation on navigation links? | |
|
0..1 | code |
equals
|
notEquals
|
in
|
notIn
|
greaterThan
|
lessThan
|
empty
|
notEmpty
|
contains
|
notContains
|
eval
AssertionOperatorType ( Required ) |
|
|
0..1 | string | XPath or JSONPath expression | |
| 0..1 | code |
delete
|
get
|
options
|
patch
|
post
|
put
TestScriptRequestMethodCode ( Required ) | |
![]() ![]() ![]() ![]() ![]() | 0..1 | string | Request URL comparison value | |
![]() ![]() ![]() ![]() ![]() |
0..1 | code |
Resource
type
FHIRDefinedType ( Required ) |
|
|
0..1 | code |
okay
|
created
|
noContent
|
notModified
|
bad
|
forbidden
|
notFound
|
methodNotAllowed
|
conflict
|
gone
|
preconditionFailed
|
unprocessable
AssertionResponseTypes ( Required ) |
|
|
0..1 | string | HTTP response code to test | |
| 0..1 | BackboneElement | The reference to a TestScript.rule | |
![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | id | Id of the TestScript.rule | |
![]() ![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement |
Rule
parameter
template
| |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert rule parameter | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() ![]() ![]() ![]() | 0..1 | BackboneElement | The reference to a TestScript.ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | id | Id of the TestScript.ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement |
The
referenced
rule
within
the
ruleset
| |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | id | Id of referenced rule within the ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement |
Rule
parameter
template
| |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert ruleset rule parameter | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Fixture Id of source expression or headerField | |
|
0..1 | id | Profile Id of validation profile reference | |
|
0..1 | string | The value to compare to | |
|
0..1 | boolean | Will this assert produce a warning only on error? | |
|
0..* | BackboneElement |
A
test
in
this
script
|
|
|
0..1 | string | Tracking/logging name of this test | |
|
0..1 | string | Tracking/reporting short description of the test | |
|
I | 1..* | BackboneElement |
A
test
operation
or
assert
to
perform
+ Test action SHALL contain either an operation or assert but not both. |
|
I | 0..1 | see operation |
The
setup
operation
to
perform
+ Test operation SHALL contain either sourceId or targetId or params or url. |
|
I | 0..1 | see assert |
The
setup
assertion
to
perform
+ Only a single assertion SHALL be present within test action assert element. + Test action assert |
|
0..1 | BackboneElement | A series of required clean up steps | |
|
1..* | BackboneElement |
One
or
more
teardown
operations
to
perform
|
|
|
I | 1..1 | see operation |
The
teardown
operation
to
perform
+ Teardown operation SHALL contain either sourceId or targetId or params or url. |
Documentation
for
this
format
|
||||
UML Diagram ( Legend )
XML Template
<<TestScript xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
< < < < <</identifier> < < < < <</telecom> </contact> < < <</useContext> < < < < < <<url value="[uri]"/><!-- 1..1 Logical URI to reference this test script (globally unique) --> <identifier><!-- 0..1 Identifier Additional identifier for the test script --></identifier> <version value="[string]"/><!-- 0..1 Business version of the test script --> <name value="[string]"/><!-- 1..1 Name for this test script (computer friendly) --> <title value="[string]"/><!-- 0..1 Name for this test script (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 this was last changed --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) --> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the test script --> <useContext><!-- 0..* UsageContext Context the content is intended to support --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for test script (if applicable) --></jurisdiction> <purpose value="[markdown]"/><!-- 0..1 Why this test script is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <origin> <!-- 0..* An abstract server representing a client or sender in a message exchange --> <index value="[integer]"/><!-- 1..1 The index of the abstract origin server starting at 1 --> <profile><!-- 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller --></profile> </origin> <destination> <!-- 0..* An abstract server representing a destination or receiver in a message exchange --> <index value="[integer]"/><!-- 1..1 The index of the abstract destination server starting at 1 --> <profile><!-- 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor --></profile> </destination> <metadata> <!-- 0..1 Required capability that is assumed to function correctly on the FHIR server being tested --> <link> <!-- 0..* Links to the FHIR specification --> <url value="[uri]"/><!-- 1..1 URL to the specification --> <description value="[string]"/><!-- 0..1 Short description --> </link>< < < < < < <</conformance><capability> <!-- 1..* Capabilities that are assumed to function correctly on the FHIR server being tested --> <required value="[boolean]"/><!-- 0..1 Are the capabilities required? --> <validated value="[boolean]"/><!-- 0..1 Are the capabilities validated? --> <description value="[string]"/><!-- 0..1 The expected capabilities of the server --> <origin value="[integer]"/><!-- 0..* Which origin server these requirements apply to --> <destination value="[integer]"/><!-- 0..1 Which server these requirements apply to --> <link value="[uri]"/><!-- 0..* Links to the FHIR specification --> <capabilities><!-- 1..1 Reference(CapabilityStatement) Required Capability Statement --></capabilities> </capability> </metadata>< < < < <</resource><fixture> <!-- 0..* Fixture in the test script - by reference (uri) --> <autocreate value="[boolean]"/><!-- 0..1 Whether or not to implicitly create the fixture during setup --> <autodelete value="[boolean]"/><!-- 0..1 Whether or not to implicitly delete the fixture during teardown --> <resource><!-- 0..1 Reference(Any) Reference of the resource --></resource> </fixture><</profile> < < < < <<profile><!-- 0..* Reference(Any) Reference of the validation profile --></profile> <variable> <!-- 0..* Placeholder for evaluated elements --> <name value="[string]"/><!-- 1..1 Descriptive name for this variable --> <defaultValue value="[string]"/><!-- 0..1 Default, hard-coded, or user-defined value for this variable --> <description value="[string]"/><!-- 0..1 Natural language description of the variable --> <expression value="[string]"/><!-- 0..1 The fluentpath expression against the fixture body --> <headerField value="[string]"/><!-- 0..1 HTTP header field name for source --> <hint value="[string]"/><!-- 0..1 Hint help text for default value to enter --> <path value="[string]"/><!-- 0..1 XPath or JSONPath against the fixture body --> <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField within this variable --> </variable>< <</metadata> < < <</type> < < < < < < < < < < <<rule> <!-- 0..* Assert rule used within the test script --> <resource><!-- 1..1 Reference(Any) Assert rule resource reference --></resource> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert rule parameter --> <value value="[string]"/><!-- 0..1 Parameter value defined either explicitly or dynamically --> </param> </rule> <ruleset> <!-- 0..* Assert ruleset used within the test script --> <resource><!-- 1..1 Reference(Any) Assert ruleset resource reference --></resource> <rule> <!-- 1..* The referenced rule within the ruleset --> <ruleId value="[id]"/><!-- 1..1 Id of referenced rule within the ruleset --> <param> <!-- 0..* Ruleset rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert ruleset rule parameter --> <value value="[string]"/><!-- 0..1 Parameter value defined either explicitly or dynamically --> </param> </rule> </ruleset> <setup> <!-- 0..1 A series of required setup operations before tests are executed --> <action> <!-- 1..* A setup operation or assert to perform --> <operation> <!-- 0..1 The setup operation to perform --> <type><!-- 0..1 Coding The operation code type that will be executed --></type> <resource value="[code]"/><!-- 0..1 Resource type --> <label value="[string]"/><!-- 0..1 Tracking/logging operation label --> <description value="[string]"/><!-- 0..1 Tracking/reporting operation description --> <accept value="[code]"/><!-- 0..1 xml | json | ttl | none --> <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none --> <destination value="[integer]"/><!-- 0..1 Server responding to the request --> <encodeRequestUrl value="[boolean]"/><!-- 0..1 Whether or not to send the request url in encoded format --> <origin value="[integer]"/><!-- 0..1 Server initiating the request --> <params value="[string]"/><!-- 0..1 Explicitly defined path parameters --> <requestHeader> <!-- 0..* Each operation can have one or more header elements --> <field value="[string]"/><!-- 1..1 HTTP header field name --> <value value="[string]"/><!-- 1..1 HTTP headerfield value --> </requestHeader>< < < <<requestId value="[id]"/><!-- 0..1 Fixture Id of mapped request --> <responseId value="[id]"/><!-- 0..1 Fixture Id of mapped response --> <sourceId value="[id]"/><!-- 0..1 Fixture Id of body for PUT and POST requests --> <targetId value="[id]"/><!-- 0..1 Id of fixture used for extracting the [id], [type], and [vid] for GET requests --> <url value="[string]"/><!-- 0..1 Request URL --> </operation>< < < < < < < < < < < < < < < < < < <<assert> <!-- 0..1 The assertion to perform --> <label value="[string]"/><!-- 0..1 Tracking/logging assertion label --> <description value="[string]"/><!-- 0..1 Tracking/reporting assertion description --> <direction value="[code]"/><!-- 0..1 response | request --> <compareToSourceId value="[string]"/><!-- 0..1 Id of the source fixture to be evaluated --> <compareToSourceExpression value="[string]"/><!-- 0..1 The fluentpath expression to evaluate against the source fixture --> <compareToSourcePath value="[string]"/><!-- 0..1 XPath or JSONPath expression to evaluate against the source fixture --> <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none --> <expression value="[string]"/><!-- 0..1 The fluentpath expression to be evaluated --> <headerField value="[string]"/><!-- 0..1 HTTP header field name --> <minimumId value="[string]"/><!-- 0..1 Fixture Id of minimum content resource --> <navigationLinks value="[boolean]"/><!-- 0..1 Perform validation on navigation links? --> <operator value="[code]"/><!-- 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval --> <path value="[string]"/><!-- 0..1 XPath or JSONPath expression --> <requestMethod value="[code]"/><!-- 0..1 delete | get | options | patch | post | put --> <requestURL value="[string]"/><!-- 0..1 Request URL comparison value --> <resource value="[code]"/><!-- 0..1 Resource type --> <response value="[code]"/><!-- 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable --> <responseCode value="[string]"/><!-- 0..1 HTTP response code to test --> <rule> <!-- 0..1 The reference to a TestScript.rule --> <ruleId value="[id]"/><!-- 1..1 Id of the TestScript.rule --> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert rule parameter --> <value value="[string]"/><!-- 1..1 Parameter value defined either explicitly or dynamically --> </param> </rule> <ruleset> <!-- 0..1 The reference to a TestScript.ruleset --> <rulesetId value="[id]"/><!-- 1..1 Id of the TestScript.ruleset --> <rule> <!-- 0..* The referenced rule within the ruleset --> <ruleId value="[id]"/><!-- 1..1 Id of referenced rule within the ruleset --> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert ruleset rule parameter --> <value value="[string]"/><!-- 1..1 Parameter value defined either explicitly or dynamically --> </param> </rule> </ruleset> <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField --> <validateProfileId value="[id]"/><!-- 0..1 Profile Id of validation profile reference --> <value value="[string]"/><!-- 0..1 The value to compare to --> <warningOnly value="[boolean]"/><!-- 0..1 Will this assert produce a warning only on error? --> </assert> </action> </setup>< < < <</metadata> < <</operation> <</assert><test> <!-- 0..* A test in this script --> <name value="[string]"/><!-- 0..1 Tracking/logging name of this test --> <description value="[string]"/><!-- 0..1 Tracking/reporting short description of the test --> <action> <!-- 1..* A test operation or assert to perform --> <operation><!-- 0..1 Content as for TestScript.setup.action.operation The setup operation to perform --></operation> <assert><!-- 0..1 Content as for TestScript.setup.action.assert The setup assertion to perform --></assert> </action> </test>< < <</operation><teardown> <!-- 0..1 A series of required clean up steps --> <action> <!-- 1..* One or more teardown operations to perform --> <operation><!-- 1..1 Content as for TestScript.setup.action.operation The teardown operation to perform --></operation> </action> </teardown> </TestScript>
JSON Template
{ "resourceType" : "",{"resourceType" : "TestScript", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension
" " " " " " " " " ""url" : "<uri>", // R! Logical URI to reference this test script (globally unique) "identifier" : { Identifier }, // Additional identifier for the test script "version" : "<string>", // Business version of the test script "name" : "<string>", // R! Name for this test script (computer friendly) "title" : "<string>", // Name for this test script (human friendly) "status" : "<code>", // R! draft | active | retired | unknown "experimental" : <boolean>, // For testing purposes, not real usage "date" : "<dateTime>", // Date this was last changed "publisher" : "<string>", // Name of the publisher (organization or individual) "contact" : [{ ContactDetail }], // Contact details for the publisher "description" : "<markdown>", // Natural language description of the test script "useContext" : [{ UsageContext }], // Context the content is intended to support "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for test script (if applicable) "purpose" : "<markdown>", // Why this test script is defined "copyright" : "<markdown>", // Use and/or publishing restrictions "origin" : [{ // An abstract server representing a client or sender in a message exchange "index" : <integer>, // R! The index of the abstract origin server starting at 1 "profile" : { Coding } // R! FHIR-Client | FHIR-SDC-FormFiller }]," " " " " " " " ""destination" : [{ // An abstract server representing a destination or receiver in a message exchange "index" : <integer>, // R! The index of the abstract destination server starting at 1 "profile" : { Coding } // R! FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor }], "metadata" : { // Required capability that is assumed to function correctly on the FHIR server being tested "link" : [{ // Links to the FHIR specification "url" : "<uri>", // R! URL to the specification "description" : "<string>" // Short description }]," " " " " " ""capability" : [{ // R! Capabilities that are assumed to function correctly on the FHIR server being tested "required" : <boolean>, // Are the capabilities required? "validated" : <boolean>, // Are the capabilities validated? "description" : "<string>", // The expected capabilities of the server "origin" : [<integer>], // Which origin server these requirements apply to "destination" : <integer>, // Which server these requirements apply to "link" : ["<uri>"], // Links to the FHIR specification "capabilities" : { Reference(CapabilityStatement) } // R! Required Capability Statement }] }," " " " ""fixture" : [{ // Fixture in the test script - by reference (uri) "autocreate" : <boolean>, // Whether or not to implicitly create the fixture during setup "autodelete" : <boolean>, // Whether or not to implicitly delete the fixture during teardown "resource" : { Reference(Any) } // Reference of the resource }]," " " " " ""profile" : [{ Reference(Any) }], // Reference of the validation profile "variable" : [{ // Placeholder for evaluated elements "name" : "<string>", // R! Descriptive name for this variable "defaultValue" : "<string>", // Default, hard-coded, or user-defined value for this variable "description" : "<string>", // Natural language description of the variable "expression" : "<string>", // The fluentpath expression against the fixture body "headerField" : "<string>", // HTTP header field name for source "hint" : "<string>", // Hint help text for default value to enter "path" : "<string>", // XPath or JSONPath against the fixture body "sourceId" : "<id>" // Fixture Id of source expression or headerField within this variable }]," " " " " " " " " " " " " " " ""rule" : [{ // Assert rule used within the test script "resource" : { Reference(Any) }, // R! Assert rule resource reference "param" : [{ // Rule parameter template "name" : "<string>", // R! Parameter name matching external assert rule parameter "value" : "<string>" // Parameter value defined either explicitly or dynamically }] }], "ruleset" : [{ // Assert ruleset used within the test script "resource" : { Reference(Any) }, // R! Assert ruleset resource reference "rule" : [{ // R! The referenced rule within the ruleset "ruleId" : "<id>", // R! Id of referenced rule within the ruleset "param" : [{ // Ruleset rule parameter template "name" : "<string>", // R! Parameter name matching external assert ruleset rule parameter "value" : "<string>" // Parameter value defined either explicitly or dynamically }] }] }], "setup" : { // A series of required setup operations before tests are executed "action" : [{ // R! A setup operation or assert to perform "operation" : { // The setup operation to perform "type" : { Coding }, // The operation code type that will be executed "resource" : "<code>", // Resource type "label" : "<string>", // Tracking/logging operation label "description" : "<string>", // Tracking/reporting operation description "accept" : "<code>", // xml | json | ttl | none "contentType" : "<code>", // xml | json | ttl | none "destination" : <integer>, // Server responding to the request "encodeRequestUrl" : <boolean>, // Whether or not to send the request url in encoded format "origin" : <integer>, // Server initiating the request "params" : "<string>", // Explicitly defined path parameters "requestHeader" : [{ // Each operation can have one or more header elements "field" : "<string>", // R! HTTP header field name "value" : "<string>" // R! HTTP headerfield value }]," " " ""requestId" : "<id>", // Fixture Id of mapped request "responseId" : "<id>", // Fixture Id of mapped response "sourceId" : "<id>", // Fixture Id of body for PUT and POST requests "targetId" : "<id>", // Id of fixture used for extracting the [id], [type], and [vid] for GET requests "url" : "<string>" // Request URL }," " " " " " " " " " " " " " " " " " ""assert" : { // The assertion to perform "label" : "<string>", // Tracking/logging assertion label "description" : "<string>", // Tracking/reporting assertion description "direction" : "<code>", // response | request "compareToSourceId" : "<string>", // Id of the source fixture to be evaluated "compareToSourceExpression" : "<string>", // The fluentpath expression to evaluate against the source fixture "compareToSourcePath" : "<string>", // XPath or JSONPath expression to evaluate against the source fixture "contentType" : "<code>", // xml | json | ttl | none "expression" : "<string>", // The fluentpath expression to be evaluated "headerField" : "<string>", // HTTP header field name "minimumId" : "<string>", // Fixture Id of minimum content resource "navigationLinks" : <boolean>, // Perform validation on navigation links? "operator" : "<code>", // equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval "path" : "<string>", // XPath or JSONPath expression "requestMethod" : "<code>", // delete | get | options | patch | post | put "requestURL" : "<string>", // Request URL comparison value "resource" : "<code>", // Resource type "response" : "<code>", // okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable "responseCode" : "<string>", // HTTP response code to test "rule" : { // The reference to a TestScript.rule "ruleId" : "<id>", // R! Id of the TestScript.rule "param" : [{ // Rule parameter template "name" : "<string>", // R! Parameter name matching external assert rule parameter "value" : "<string>" // R! Parameter value defined either explicitly or dynamically }] }, "ruleset" : { // The reference to a TestScript.ruleset "rulesetId" : "<id>", // R! Id of the TestScript.ruleset "rule" : [{ // The referenced rule within the ruleset "ruleId" : "<id>", // R! Id of referenced rule within the ruleset "param" : [{ // Rule parameter template "name" : "<string>", // R! Parameter name matching external assert ruleset rule parameter "value" : "<string>" // R! Parameter value defined either explicitly or dynamically }] }] }, "sourceId" : "<id>", // Fixture Id of source expression or headerField "validateProfileId" : "<id>", // Profile Id of validation profile reference "value" : "<string>", // The value to compare to "warningOnly" : <boolean> // Will this assert produce a warning only on error? } }] }," " " " " " ""test" : [{ // A test in this script "name" : "<string>", // Tracking/logging name of this test "description" : "<string>", // Tracking/reporting short description of the test "action" : [{ // R! A test operation or assert to perform "operation" : { Content as for TestScript.setup.action.operation }, // The setup operation to perform "assert" : { Content as for TestScript.setup.action.assert } // The setup assertion to perform }] }]," " ""teardown" : { // A series of required clean up steps "action" : [{ // R! One or more teardown operations to perform "operation" : { Content as for TestScript.setup.action.operation } // R! The teardown operation to perform }] } }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:TestScript; 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:TestScript.url [ uri ]; # 1..1 Logical URI to reference this test script (globally unique) fhir:TestScript.identifier [ Identifier ]; # 0..1 Additional identifier for the test script fhir:TestScript.version [ string ]; # 0..1 Business version of the test script fhir:TestScript.name [ string ]; # 1..1 Name for this test script (computer friendly) fhir:TestScript.title [ string ]; # 0..1 Name for this test script (human friendly) fhir:TestScript.status [ code ]; # 1..1 draft | active | retired | unknown fhir:TestScript.experimental [ boolean ]; # 0..1 For testing purposes, not real usage fhir:TestScript.date [ dateTime ]; # 0..1 Date this was last changed fhir:TestScript.publisher [ string ]; # 0..1 Name of the publisher (organization or individual) fhir:TestScript.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher fhir:TestScript.description [ markdown ]; # 0..1 Natural language description of the test script fhir:TestScript.useContext [ UsageContext ], ... ; # 0..* Context the content is intended to support fhir:TestScript.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for test script (if applicable) fhir:TestScript.purpose [ markdown ]; # 0..1 Why this test script is defined fhir:TestScript.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions fhir:TestScript.origin [ # 0..* An abstract server representing a client or sender in a message exchange fhir:TestScript.origin.index [ integer ]; # 1..1 The index of the abstract origin server starting at 1 fhir:TestScript.origin.profile [ Coding ]; # 1..1 FHIR-Client | FHIR-SDC-FormFiller ], ...; fhir:TestScript.destination [ # 0..* An abstract server representing a destination or receiver in a message exchange fhir:TestScript.destination.index [ integer ]; # 1..1 The index of the abstract destination server starting at 1 fhir:TestScript.destination.profile [ Coding ]; # 1..1 FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor ], ...; fhir:TestScript.metadata [ # 0..1 Required capability that is assumed to function correctly on the FHIR server being tested fhir:TestScript.metadata.link [ # 0..* Links to the FHIR specification fhir:TestScript.metadata.link.url [ uri ]; # 1..1 URL to the specification fhir:TestScript.metadata.link.description [ string ]; # 0..1 Short description ], ...; fhir:TestScript.metadata.capability [ # 1..* Capabilities that are assumed to function correctly on the FHIR server being tested fhir:TestScript.metadata.capability.required [ boolean ]; # 0..1 Are the capabilities required? fhir:TestScript.metadata.capability.validated [ boolean ]; # 0..1 Are the capabilities validated? fhir:TestScript.metadata.capability.description [ string ]; # 0..1 The expected capabilities of the server fhir:TestScript.metadata.capability.origin [ integer ], ... ; # 0..* Which origin server these requirements apply to fhir:TestScript.metadata.capability.destination [ integer ]; # 0..1 Which server these requirements apply to fhir:TestScript.metadata.capability.link [ uri ], ... ; # 0..* Links to the FHIR specification fhir:TestScript.metadata.capability.capabilities [ Reference(CapabilityStatement) ]; # 1..1 Required Capability Statement ], ...; ]; fhir:TestScript.fixture [ # 0..* Fixture in the test script - by reference (uri) fhir:TestScript.fixture.autocreate [ boolean ]; # 0..1 Whether or not to implicitly create the fixture during setup fhir:TestScript.fixture.autodelete [ boolean ]; # 0..1 Whether or not to implicitly delete the fixture during teardown fhir:TestScript.fixture.resource [ Reference(Any) ]; # 0..1 Reference of the resource ], ...; fhir:TestScript.profile [ Reference(Any) ], ... ; # 0..* Reference of the validation profile fhir:TestScript.variable [ # 0..* Placeholder for evaluated elements fhir:TestScript.variable.name [ string ]; # 1..1 Descriptive name for this variable fhir:TestScript.variable.defaultValue [ string ]; # 0..1 Default, hard-coded, or user-defined value for this variable fhir:TestScript.variable.description [ string ]; # 0..1 Natural language description of the variable fhir:TestScript.variable.expression [ string ]; # 0..1 The fluentpath expression against the fixture body fhir:TestScript.variable.headerField [ string ]; # 0..1 HTTP header field name for source fhir:TestScript.variable.hint [ string ]; # 0..1 Hint help text for default value to enter fhir:TestScript.variable.path [ string ]; # 0..1 XPath or JSONPath against the fixture body fhir:TestScript.variable.sourceId [ id ]; # 0..1 Fixture Id of source expression or headerField within this variable ], ...; fhir:TestScript.rule [ # 0..* Assert rule used within the test script fhir:TestScript.rule.resource [ Reference(Any) ]; # 1..1 Assert rule resource reference fhir:TestScript.rule.param [ # 0..* Rule parameter template fhir:TestScript.rule.param.name [ string ]; # 1..1 Parameter name matching external assert rule parameter fhir:TestScript.rule.param.value [ string ]; # 0..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; fhir:TestScript.ruleset [ # 0..* Assert ruleset used within the test script fhir:TestScript.ruleset.resource [ Reference(Any) ]; # 1..1 Assert ruleset resource reference fhir:TestScript.ruleset.rule [ # 1..* The referenced rule within the ruleset fhir:TestScript.ruleset.rule.ruleId [ id ]; # 1..1 Id of referenced rule within the ruleset fhir:TestScript.ruleset.rule.param [ # 0..* Ruleset rule parameter template fhir:TestScript.ruleset.rule.param.name [ string ]; # 1..1 Parameter name matching external assert ruleset rule parameter fhir:TestScript.ruleset.rule.param.value [ string ]; # 0..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; ], ...; fhir:TestScript.setup [ # 0..1 A series of required setup operations before tests are executed fhir:TestScript.setup.action [ # 1..* A setup operation or assert to perform fhir:TestScript.setup.action.operation [ # 0..1 The setup operation to perform fhir:TestScript.setup.action.operation.type [ Coding ]; # 0..1 The operation code type that will be executed fhir:TestScript.setup.action.operation.resource [ code ]; # 0..1 Resource type fhir:TestScript.setup.action.operation.label [ string ]; # 0..1 Tracking/logging operation label fhir:TestScript.setup.action.operation.description [ string ]; # 0..1 Tracking/reporting operation description fhir:TestScript.setup.action.operation.accept [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.operation.contentType [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.operation.destination [ integer ]; # 0..1 Server responding to the request fhir:TestScript.setup.action.operation.encodeRequestUrl [ boolean ]; # 0..1 Whether or not to send the request url in encoded format fhir:TestScript.setup.action.operation.origin [ integer ]; # 0..1 Server initiating the request fhir:TestScript.setup.action.operation.params [ string ]; # 0..1 Explicitly defined path parameters fhir:TestScript.setup.action.operation.requestHeader [ # 0..* Each operation can have one or more header elements fhir:TestScript.setup.action.operation.requestHeader.field [ string ]; # 1..1 HTTP header field name fhir:TestScript.setup.action.operation.requestHeader.value [ string ]; # 1..1 HTTP headerfield value ], ...; fhir:TestScript.setup.action.operation.requestId [ id ]; # 0..1 Fixture Id of mapped request fhir:TestScript.setup.action.operation.responseId [ id ]; # 0..1 Fixture Id of mapped response fhir:TestScript.setup.action.operation.sourceId [ id ]; # 0..1 Fixture Id of body for PUT and POST requests fhir:TestScript.setup.action.operation.targetId [ id ]; # 0..1 Id of fixture used for extracting the [id], [type], and [vid] for GET requests fhir:TestScript.setup.action.operation.url [ string ]; # 0..1 Request URL ]; fhir:TestScript.setup.action.assert [ # 0..1 The assertion to perform fhir:TestScript.setup.action.assert.label [ string ]; # 0..1 Tracking/logging assertion label fhir:TestScript.setup.action.assert.description [ string ]; # 0..1 Tracking/reporting assertion description fhir:TestScript.setup.action.assert.direction [ code ]; # 0..1 response | request fhir:TestScript.setup.action.assert.compareToSourceId [ string ]; # 0..1 Id of the source fixture to be evaluated fhir:TestScript.setup.action.assert.compareToSourceExpression [ string ]; # 0..1 The fluentpath expression to evaluate against the source fixture fhir:TestScript.setup.action.assert.compareToSourcePath [ string ]; # 0..1 XPath or JSONPath expression to evaluate against the source fixture fhir:TestScript.setup.action.assert.contentType [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.assert.expression [ string ]; # 0..1 The fluentpath expression to be evaluated fhir:TestScript.setup.action.assert.headerField [ string ]; # 0..1 HTTP header field name fhir:TestScript.setup.action.assert.minimumId [ string ]; # 0..1 Fixture Id of minimum content resource fhir:TestScript.setup.action.assert.navigationLinks [ boolean ]; # 0..1 Perform validation on navigation links? fhir:TestScript.setup.action.assert.operator [ code ]; # 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval fhir:TestScript.setup.action.assert.path [ string ]; # 0..1 XPath or JSONPath expression fhir:TestScript.setup.action.assert.requestMethod [ code ]; # 0..1 delete | get | options | patch | post | put fhir:TestScript.setup.action.assert.requestURL [ string ]; # 0..1 Request URL comparison value fhir:TestScript.setup.action.assert.resource [ code ]; # 0..1 Resource type fhir:TestScript.setup.action.assert.response [ code ]; # 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable fhir:TestScript.setup.action.assert.responseCode [ string ]; # 0..1 HTTP response code to test fhir:TestScript.setup.action.assert.rule [ # 0..1 The reference to a TestScript.rule fhir:TestScript.setup.action.assert.rule.ruleId [ id ]; # 1..1 Id of the TestScript.rule fhir:TestScript.setup.action.assert.rule.param [ # 0..* Rule parameter template fhir:TestScript.setup.action.assert.rule.param.name [ string ]; # 1..1 Parameter name matching external assert rule parameter fhir:TestScript.setup.action.assert.rule.param.value [ string ]; # 1..1 Parameter value defined either explicitly or dynamically ], ...; ]; fhir:TestScript.setup.action.assert.ruleset [ # 0..1 The reference to a TestScript.ruleset fhir:TestScript.setup.action.assert.ruleset.rulesetId [ id ]; # 1..1 Id of the TestScript.ruleset fhir:TestScript.setup.action.assert.ruleset.rule [ # 0..* The referenced rule within the ruleset fhir:TestScript.setup.action.assert.ruleset.rule.ruleId [ id ]; # 1..1 Id of referenced rule within the ruleset fhir:TestScript.setup.action.assert.ruleset.rule.param [ # 0..* Rule parameter template fhir:TestScript.setup.action.assert.ruleset.rule.param.name [ string ]; # 1..1 Parameter name matching external assert ruleset rule parameter fhir:TestScript.setup.action.assert.ruleset.rule.param.value [ string ]; # 1..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; ]; fhir:TestScript.setup.action.assert.sourceId [ id ]; # 0..1 Fixture Id of source expression or headerField fhir:TestScript.setup.action.assert.validateProfileId [ id ]; # 0..1 Profile Id of validation profile reference fhir:TestScript.setup.action.assert.value [ string ]; # 0..1 The value to compare to fhir:TestScript.setup.action.assert.warningOnly [ boolean ]; # 0..1 Will this assert produce a warning only on error? ]; ], ...; ]; fhir:TestScript.test [ # 0..* A test in this script fhir:TestScript.test.name [ string ]; # 0..1 Tracking/logging name of this test fhir:TestScript.test.description [ string ]; # 0..1 Tracking/reporting short description of the test fhir:TestScript.test.action [ # 1..* A test operation or assert to perform fhir:TestScript.test.action.operation [ See TestScript.setup.action.operation ]; # 0..1 The setup operation to perform fhir:TestScript.test.action.assert [ See TestScript.setup.action.assert ]; # 0..1 The setup assertion to perform ], ...; ], ...; fhir:TestScript.teardown [ # 0..1 A series of required clean up steps fhir:TestScript.teardown.action [ # 1..* One or more teardown operations to perform fhir:TestScript.teardown.action.operation [ See TestScript.setup.action.operation ]; # 1..1 The teardown operation to perform ], ...; ]; ]
Changes since DSTU2
| TestScript | |
| TestScript.title |
|
| TestScript.status |
|
| TestScript.experimental |
|
| TestScript.contact |
|
| TestScript.description |
|
| TestScript.useContext |
|
| TestScript.jurisdiction |
|
| TestScript.purpose |
|
| TestScript.copyright |
|
| TestScript.origin |
|
| TestScript.origin.index |
|
| TestScript.origin.profile |
|
| TestScript.destination |
|
| TestScript.destination.index |
|
| TestScript.destination.profile |
|
| TestScript.metadata.capability.origin |
|
| TestScript.metadata.capability.capabilities |
|
| TestScript.fixture.autocreate |
|
| TestScript.fixture.autodelete |
|
| TestScript.variable.defaultValue |
|
| TestScript.variable.description |
|
| TestScript.variable.expression |
|
| TestScript.variable.hint |
|
| TestScript.rule |
|
| TestScript.rule.resource |
|
| TestScript.rule.param |
|
| TestScript.rule.param.name |
|
| TestScript.rule.param.value |
|
| TestScript.ruleset |
|
| TestScript.ruleset.resource |
|
| TestScript.ruleset.rule |
|
| TestScript.ruleset.rule.ruleId |
|
| TestScript.ruleset.rule.param |
|
| TestScript.ruleset.rule.param.name |
|
| TestScript.ruleset.rule.param.value |
|
| TestScript.setup.action.operation.destination |
|
| TestScript.setup.action.operation.origin |
|
| TestScript.setup.action.operation.requestId |
|
| TestScript.setup.action.assert.compareToSourceExpression |
|
| TestScript.setup.action.assert.expression |
|
| TestScript.setup.action.assert.requestMethod |
|
| TestScript.setup.action.assert.requestURL |
|
| TestScript.setup.action.assert.rule |
|
| TestScript.setup.action.assert.rule.ruleId |
|
| TestScript.setup.action.assert.rule.param |
|
| TestScript.setup.action.assert.rule.param.name |
|
| TestScript.setup.action.assert.rule.param.value |
|
| TestScript.setup.action.assert.ruleset |
|
| TestScript.setup.action.assert.ruleset.rulesetId |
|
| TestScript.setup.action.assert.ruleset.rule |
|
| TestScript.setup.action.assert.ruleset.rule.ruleId |
|
| TestScript.setup.action.assert.ruleset.rule.param |
|
| TestScript.setup.action.assert.ruleset.rule.param.name |
|
| TestScript.setup.action.assert.ruleset.rule.param.value |
|
| TestScript.teardown.action.operation |
|
| TestScript.contact.name |
|
| TestScript.contact.telecom |
|
| TestScript.requirements |
|
| TestScript.metadata.capability.conformance |
|
| TestScript.multiserver |
|
| TestScript.setup.metadata |
|
| TestScript.test.metadata |
|
See the Full Difference for further information
This analysis is available as XML or JSON .
See R2 <--> R3 Conversion Maps (status = 6 tests that all execute ok. 6 fail round-trip testing and 6 r3 resources are invalid (11 errors). ).
Structure
| Name | Flags | Card. | Type |
Description
&
Constraints
|
|---|---|---|---|---|
|
DomainResource |
Describes
a
set
of
tests
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension |
||
|
Σ | 1..1 | uri |
Logical
URI
to
reference
this
|
| Σ | 0..1 | Identifier | Additional identifier for the test script |
![]() ![]() |
Σ | 0..1 | string |
Business
version
of
the
|
|
Σ | 1..1 | string |
Name
for
this
|
| Σ | 0..1 | string | Name for this test script (human friendly) |
![]() ![]() |
?! Σ | 1..1 | code |
draft
|
active
|
retired
|
unknown
|
|
?! Σ | 0..1 |
|
For testing purposes, not real usage |
|
Σ | 0..1 |
|
Date this was last changed |
|
Σ | 0..1 | string |
Name
of
the
publisher
|
|
Σ | 0..* |
|
Contact
details
|
|
0..1 | markdown | Natural language description of the test script | |
| Σ | 0..* |
|
Context
the
content
is
intended
to
|
|
Σ | 0..* |
|
Intended
jurisdiction
for
Jurisdiction ValueSet ( Extensible ) |
|
0..1 | markdown | Why this test script is defined | |
![]() ![]() | 0..1 |
|
Use and/or publishing restrictions | |
|
0..* | BackboneElement |
An
abstract
server
representing
a
client
or
sender
in
a
message
exchange
|
|
|
1..1 | integer |
The
index
of
the
|
|
|
1..1 |
|
FHIR-Client
|
FHIR-SDC-FormFiller
|
|
|
0..* |
|
An
abstract
server
representing
a
destination
or
receiver
in
a
message
exchange
|
|
|
1..1 |
|
The index of the abstract destination server starting at 1 | |
| 1..1 | Coding |
FHIR-Server
|
FHIR-SDC-FormManager
|
FHIR-SDC-FormReceiver
|
FHIR-SDC-FormProcessor
TestScriptProfileDestinationType ( Extensible ) | |
![]() ![]() |
I | 0..1 | BackboneElement |
Required
capability
that
is
assumed
to
function
correctly
on
the
FHIR
server
being
tested
+ TestScript metadata capability SHALL contain required or validated or both. |
|
0..* | BackboneElement |
Links
to
the
FHIR
specification
|
|
|
1..1 | uri | URL to the specification | |
|
0..1 | string | Short description | |
|
1..* | BackboneElement |
Capabilities
that
are
assumed
to
function
correctly
on
the
FHIR
server
being
tested
|
|
|
0..1 | boolean | Are the capabilities required? | |
|
0..1 | boolean | Are the capabilities validated? | |
|
0..1 | string | The expected capabilities of the server | |
|
0..* | integer |
Which
origin
server
these
requirements
apply
to
|
|
|
0..1 |
|
Which
server
these
requirements
apply
to
|
|
|
0..* |
|
Links
to
the
FHIR
specification
|
|
|
1..1 |
|
Required Capability Statement | |
|
0..* | BackboneElement |
Fixture
in
the
test
script
-
by
reference
(uri)
|
|
|
0..1 | boolean | Whether or not to implicitly create the fixture during setup | |
|
0..1 | boolean | Whether or not to implicitly delete the fixture during teardown | |
|
0..1 | Reference ( Any ) | Reference of the resource | |
|
0..* | Reference ( Any ) |
Reference
of
the
validation
profile
|
|
|
I | 0..* | BackboneElement |
Placeholder
for
evaluated
elements
+ Variable |
|
1..1 | string | Descriptive name for this variable | |
| 0..1 | string | Default, hard-coded, or user-defined value for this variable | |
![]() ![]() ![]() | 0..1 | string | Natural language description of the variable | |
![]() ![]() ![]() | 0..1 | string | The fluentpath expression against the fixture body | |
![]() ![]() ![]() |
0..1 | string | HTTP header field name for source | |
| 0..1 | string | Hint help text for default value to enter | |
![]() ![]() ![]() |
0..1 | string | XPath or JSONPath against the fixture body | |
|
0..1 | id | Fixture Id of source expression or headerField within this variable | |
|
0..* | BackboneElement |
Assert
rule
used
within
the
test
script
|
|
|
1..1 | Reference ( Any ) | Assert rule resource reference | |
![]() ![]() ![]() | 0..* | BackboneElement |
Rule
parameter
template
| |
![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert rule parameter | |
![]() ![]() ![]() ![]() | 0..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() | 0..* | BackboneElement |
Assert
ruleset
used
within
the
|
|
| 1..1 | Reference ( Any ) | Assert ruleset resource reference | |
![]() ![]() ![]() | 1..* | BackboneElement |
The
referenced
rule
within
the
ruleset
| |
![]() ![]() ![]() ![]() | 1..1 | id | Id of referenced rule within the ruleset | |
![]() ![]() ![]() ![]() | 0..* | BackboneElement |
Ruleset
rule
parameter
template
| |
![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert ruleset rule parameter | |
![]() ![]() ![]() ![]() ![]() | 0..1 | string |
Parameter
value
defined
either
explicitly
or
| |
![]() ![]() |
0..1 | BackboneElement | A series of required setup operations before tests are executed | |
|
I | 1..* | BackboneElement |
A
setup
operation
or
assert
to
perform
+ Setup action SHALL contain either an operation or assert but not both. |
|
I | 0..1 | BackboneElement |
The
setup
operation
to
perform
+ Setup operation SHALL contain either sourceId or targetId or params or url. |
|
0..1 | Coding |
The
|
|
|
0..1 | code |
Resource
type
FHIRDefinedType ( Required ) |
|
|
0..1 | string | Tracking/logging operation label | |
|
0..1 | string | Tracking/reporting operation description | |
|
0..1 | code |
xml
|
json
|
ttl
|
none
ContentType ( Required ) |
|
|
0..1 | code |
xml
|
json
|
ttl
|
none
ContentType ( Required ) |
|
|
0..1 | integer |
Server
responding
to
|
|
|
0..1 | boolean | Whether or not to send the request url in encoded format | |
| 0..1 | integer | Server initiating the request | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | Explicitly defined path parameters | |
|
0..* | BackboneElement |
Each
operation
can
have
one
|
|
|
1..1 | string | HTTP header field name | |
|
1..1 | string | HTTP headerfield value | |
| 0..1 | id | Fixture Id of mapped request | |
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Fixture Id of mapped response | |
|
0..1 | id | Fixture Id of body for PUT and POST requests | |
|
0..1 | id | Id of fixture used for extracting the [id], [type], and [vid] for GET requests | |
|
0..1 | string | Request URL | |
|
I | 0..1 | BackboneElement |
The
assertion
to
perform
+ Only a single assertion SHALL be present within setup action assert element. + Setup action assert |
|
0..1 | string | Tracking/logging assertion label | |
|
0..1 | string | Tracking/reporting assertion description | |
|
0..1 | code |
response
|
request
AssertionDirectionType ( Required ) |
|
|
0..1 | string |
Id
of
the
source
fixture
| |
![]() ![]() ![]() ![]() ![]() | 0..1 | string | The fluentpath expression to evaluate against the source fixture | |
|
0..1 | string |
XPath
or
JSONPath
expression
|
|
|
0..1 | code |
xml
|
json
|
ttl
|
none
ContentType ( Required ) |
|
| 0..1 | string | The fluentpath expression to be evaluated | |
![]() ![]() ![]() ![]() ![]() |
0..1 | string | HTTP header field name | |
|
0..1 | string | Fixture Id of minimum content resource | |
|
0..1 | boolean | Perform validation on navigation links? | |
|
0..1 | code |
equals
|
notEquals
|
in
|
notIn
|
greaterThan
|
lessThan
|
empty
|
notEmpty
|
contains
|
notContains
|
eval
AssertionOperatorType ( Required ) |
|
|
0..1 | string | XPath or JSONPath expression | |
| 0..1 | code |
delete
|
get
|
options
|
patch
|
post
|
put
TestScriptRequestMethodCode ( Required ) | |
![]() ![]() ![]() ![]() ![]() | 0..1 | string | Request URL comparison value | |
![]() ![]() ![]() ![]() ![]() |
0..1 | code |
Resource
type
FHIRDefinedType ( Required ) |
|
|
0..1 | code |
okay
|
created
|
noContent
|
notModified
|
bad
|
forbidden
|
notFound
|
methodNotAllowed
|
conflict
|
gone
|
preconditionFailed
|
unprocessable
AssertionResponseTypes ( Required ) |
|
|
0..1 | string | HTTP response code to test | |
| 0..1 | BackboneElement | The reference to a TestScript.rule | |
![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | id | Id of the TestScript.rule | |
![]() ![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement |
Rule
parameter
template
| |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert rule parameter | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() ![]() ![]() ![]() | 0..1 | BackboneElement | The reference to a TestScript.ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | id | Id of the TestScript.ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement |
The
referenced
rule
within
the
ruleset
| |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | id | Id of referenced rule within the ruleset | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement |
Rule
parameter
template
| |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter name matching external assert ruleset rule parameter | |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | Parameter value defined either explicitly or dynamically | |
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Fixture Id of source expression or headerField | |
|
0..1 | id | Profile Id of validation profile reference | |
|
0..1 | string | The value to compare to | |
|
0..1 | boolean | Will this assert produce a warning only on error? | |
|
0..* | BackboneElement |
A
test
in
this
script
|
|
|
0..1 | string | Tracking/logging name of this test | |
|
0..1 | string | Tracking/reporting short description of the test | |
|
I | 1..* | BackboneElement |
A
test
operation
or
assert
to
perform
+ Test action SHALL contain either an operation or assert but not both. |
|
I | 0..1 | see operation |
The
setup
operation
to
perform
+ Test operation SHALL contain either sourceId or targetId or params or url. |
|
I | 0..1 | see assert |
The
setup
assertion
to
perform
+ Only a single assertion SHALL be present within test action assert element. + Test action assert |
|
0..1 | BackboneElement | A series of required clean up steps | |
|
1..* | BackboneElement |
One
or
more
teardown
operations
to
perform
|
|
|
I | 1..1 | see operation |
The
teardown
operation
to
perform
+ Teardown operation SHALL contain either sourceId or targetId or params or url. |
Documentation
for
this
format
|
||||
XML Template
<<TestScript xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension -->
< < < < <</identifier> < < < < <</telecom> </contact> < < <</useContext> < < < < < <<url value="[uri]"/><!-- 1..1 Logical URI to reference this test script (globally unique) --> <identifier><!-- 0..1 Identifier Additional identifier for the test script --></identifier> <version value="[string]"/><!-- 0..1 Business version of the test script --> <name value="[string]"/><!-- 1..1 Name for this test script (computer friendly) --> <title value="[string]"/><!-- 0..1 Name for this test script (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 this was last changed --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) --> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the test script --> <useContext><!-- 0..* UsageContext Context the content is intended to support --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for test script (if applicable) --></jurisdiction> <purpose value="[markdown]"/><!-- 0..1 Why this test script is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <origin> <!-- 0..* An abstract server representing a client or sender in a message exchange --> <index value="[integer]"/><!-- 1..1 The index of the abstract origin server starting at 1 --> <profile><!-- 1..1 Coding FHIR-Client | FHIR-SDC-FormFiller --></profile> </origin> <destination> <!-- 0..* An abstract server representing a destination or receiver in a message exchange --> <index value="[integer]"/><!-- 1..1 The index of the abstract destination server starting at 1 --> <profile><!-- 1..1 Coding FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor --></profile> </destination> <metadata> <!-- 0..1 Required capability that is assumed to function correctly on the FHIR server being tested --> <link> <!-- 0..* Links to the FHIR specification --> <url value="[uri]"/><!-- 1..1 URL to the specification --> <description value="[string]"/><!-- 0..1 Short description --> </link>< < < < < < <</conformance><capability> <!-- 1..* Capabilities that are assumed to function correctly on the FHIR server being tested --> <required value="[boolean]"/><!-- 0..1 Are the capabilities required? --> <validated value="[boolean]"/><!-- 0..1 Are the capabilities validated? --> <description value="[string]"/><!-- 0..1 The expected capabilities of the server --> <origin value="[integer]"/><!-- 0..* Which origin server these requirements apply to --> <destination value="[integer]"/><!-- 0..1 Which server these requirements apply to --> <link value="[uri]"/><!-- 0..* Links to the FHIR specification --> <capabilities><!-- 1..1 Reference(CapabilityStatement) Required Capability Statement --></capabilities> </capability> </metadata>< < < < <</resource><fixture> <!-- 0..* Fixture in the test script - by reference (uri) --> <autocreate value="[boolean]"/><!-- 0..1 Whether or not to implicitly create the fixture during setup --> <autodelete value="[boolean]"/><!-- 0..1 Whether or not to implicitly delete the fixture during teardown --> <resource><!-- 0..1 Reference(Any) Reference of the resource --></resource> </fixture><</profile> < < < < <<profile><!-- 0..* Reference(Any) Reference of the validation profile --></profile> <variable> <!-- 0..* Placeholder for evaluated elements --> <name value="[string]"/><!-- 1..1 Descriptive name for this variable --> <defaultValue value="[string]"/><!-- 0..1 Default, hard-coded, or user-defined value for this variable --> <description value="[string]"/><!-- 0..1 Natural language description of the variable --> <expression value="[string]"/><!-- 0..1 The fluentpath expression against the fixture body --> <headerField value="[string]"/><!-- 0..1 HTTP header field name for source --> <hint value="[string]"/><!-- 0..1 Hint help text for default value to enter --> <path value="[string]"/><!-- 0..1 XPath or JSONPath against the fixture body --> <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField within this variable --> </variable>< <</metadata> < < <</type> < < < < < < < < < < <<rule> <!-- 0..* Assert rule used within the test script --> <resource><!-- 1..1 Reference(Any) Assert rule resource reference --></resource> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert rule parameter --> <value value="[string]"/><!-- 0..1 Parameter value defined either explicitly or dynamically --> </param> </rule> <ruleset> <!-- 0..* Assert ruleset used within the test script --> <resource><!-- 1..1 Reference(Any) Assert ruleset resource reference --></resource> <rule> <!-- 1..* The referenced rule within the ruleset --> <ruleId value="[id]"/><!-- 1..1 Id of referenced rule within the ruleset --> <param> <!-- 0..* Ruleset rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert ruleset rule parameter --> <value value="[string]"/><!-- 0..1 Parameter value defined either explicitly or dynamically --> </param> </rule> </ruleset> <setup> <!-- 0..1 A series of required setup operations before tests are executed --> <action> <!-- 1..* A setup operation or assert to perform --> <operation> <!-- 0..1 The setup operation to perform --> <type><!-- 0..1 Coding The operation code type that will be executed --></type> <resource value="[code]"/><!-- 0..1 Resource type --> <label value="[string]"/><!-- 0..1 Tracking/logging operation label --> <description value="[string]"/><!-- 0..1 Tracking/reporting operation description --> <accept value="[code]"/><!-- 0..1 xml | json | ttl | none --> <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none --> <destination value="[integer]"/><!-- 0..1 Server responding to the request --> <encodeRequestUrl value="[boolean]"/><!-- 0..1 Whether or not to send the request url in encoded format --> <origin value="[integer]"/><!-- 0..1 Server initiating the request --> <params value="[string]"/><!-- 0..1 Explicitly defined path parameters --> <requestHeader> <!-- 0..* Each operation can have one or more header elements --> <field value="[string]"/><!-- 1..1 HTTP header field name --> <value value="[string]"/><!-- 1..1 HTTP headerfield value --> </requestHeader>< < < <<requestId value="[id]"/><!-- 0..1 Fixture Id of mapped request --> <responseId value="[id]"/><!-- 0..1 Fixture Id of mapped response --> <sourceId value="[id]"/><!-- 0..1 Fixture Id of body for PUT and POST requests --> <targetId value="[id]"/><!-- 0..1 Id of fixture used for extracting the [id], [type], and [vid] for GET requests --> <url value="[string]"/><!-- 0..1 Request URL --> </operation>< < < < < < < < < < < < < < < < < < <<assert> <!-- 0..1 The assertion to perform --> <label value="[string]"/><!-- 0..1 Tracking/logging assertion label --> <description value="[string]"/><!-- 0..1 Tracking/reporting assertion description --> <direction value="[code]"/><!-- 0..1 response | request --> <compareToSourceId value="[string]"/><!-- 0..1 Id of the source fixture to be evaluated --> <compareToSourceExpression value="[string]"/><!-- 0..1 The fluentpath expression to evaluate against the source fixture --> <compareToSourcePath value="[string]"/><!-- 0..1 XPath or JSONPath expression to evaluate against the source fixture --> <contentType value="[code]"/><!-- 0..1 xml | json | ttl | none --> <expression value="[string]"/><!-- 0..1 The fluentpath expression to be evaluated --> <headerField value="[string]"/><!-- 0..1 HTTP header field name --> <minimumId value="[string]"/><!-- 0..1 Fixture Id of minimum content resource --> <navigationLinks value="[boolean]"/><!-- 0..1 Perform validation on navigation links? --> <operator value="[code]"/><!-- 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval --> <path value="[string]"/><!-- 0..1 XPath or JSONPath expression --> <requestMethod value="[code]"/><!-- 0..1 delete | get | options | patch | post | put --> <requestURL value="[string]"/><!-- 0..1 Request URL comparison value --> <resource value="[code]"/><!-- 0..1 Resource type --> <response value="[code]"/><!-- 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable --> <responseCode value="[string]"/><!-- 0..1 HTTP response code to test --> <rule> <!-- 0..1 The reference to a TestScript.rule --> <ruleId value="[id]"/><!-- 1..1 Id of the TestScript.rule --> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert rule parameter --> <value value="[string]"/><!-- 1..1 Parameter value defined either explicitly or dynamically --> </param> </rule> <ruleset> <!-- 0..1 The reference to a TestScript.ruleset --> <rulesetId value="[id]"/><!-- 1..1 Id of the TestScript.ruleset --> <rule> <!-- 0..* The referenced rule within the ruleset --> <ruleId value="[id]"/><!-- 1..1 Id of referenced rule within the ruleset --> <param> <!-- 0..* Rule parameter template --> <name value="[string]"/><!-- 1..1 Parameter name matching external assert ruleset rule parameter --> <value value="[string]"/><!-- 1..1 Parameter value defined either explicitly or dynamically --> </param> </rule> </ruleset> <sourceId value="[id]"/><!-- 0..1 Fixture Id of source expression or headerField --> <validateProfileId value="[id]"/><!-- 0..1 Profile Id of validation profile reference --> <value value="[string]"/><!-- 0..1 The value to compare to --> <warningOnly value="[boolean]"/><!-- 0..1 Will this assert produce a warning only on error? --> </assert> </action> </setup>< < < <</metadata> < <</operation> <</assert><test> <!-- 0..* A test in this script --> <name value="[string]"/><!-- 0..1 Tracking/logging name of this test --> <description value="[string]"/><!-- 0..1 Tracking/reporting short description of the test --> <action> <!-- 1..* A test operation or assert to perform --> <operation><!-- 0..1 Content as for TestScript.setup.action.operation The setup operation to perform --></operation> <assert><!-- 0..1 Content as for TestScript.setup.action.assert The setup assertion to perform --></assert> </action> </test>< < <</operation><teardown> <!-- 0..1 A series of required clean up steps --> <action> <!-- 1..* One or more teardown operations to perform --> <operation><!-- 1..1 Content as for TestScript.setup.action.operation The teardown operation to perform --></operation> </action> </teardown> </TestScript>
JSON Template
{ "resourceType" : "",{"resourceType" : "TestScript", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension
" " " " " " " " " ""url" : "<uri>", // R! Logical URI to reference this test script (globally unique) "identifier" : { Identifier }, // Additional identifier for the test script "version" : "<string>", // Business version of the test script "name" : "<string>", // R! Name for this test script (computer friendly) "title" : "<string>", // Name for this test script (human friendly) "status" : "<code>", // R! draft | active | retired | unknown "experimental" : <boolean>, // For testing purposes, not real usage "date" : "<dateTime>", // Date this was last changed "publisher" : "<string>", // Name of the publisher (organization or individual) "contact" : [{ ContactDetail }], // Contact details for the publisher "description" : "<markdown>", // Natural language description of the test script "useContext" : [{ UsageContext }], // Context the content is intended to support "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for test script (if applicable) "purpose" : "<markdown>", // Why this test script is defined "copyright" : "<markdown>", // Use and/or publishing restrictions "origin" : [{ // An abstract server representing a client or sender in a message exchange "index" : <integer>, // R! The index of the abstract origin server starting at 1 "profile" : { Coding } // R! FHIR-Client | FHIR-SDC-FormFiller }]," " " " " " " " ""destination" : [{ // An abstract server representing a destination or receiver in a message exchange "index" : <integer>, // R! The index of the abstract destination server starting at 1 "profile" : { Coding } // R! FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor }], "metadata" : { // Required capability that is assumed to function correctly on the FHIR server being tested "link" : [{ // Links to the FHIR specification "url" : "<uri>", // R! URL to the specification "description" : "<string>" // Short description }]," " " " " " ""capability" : [{ // R! Capabilities that are assumed to function correctly on the FHIR server being tested "required" : <boolean>, // Are the capabilities required? "validated" : <boolean>, // Are the capabilities validated? "description" : "<string>", // The expected capabilities of the server "origin" : [<integer>], // Which origin server these requirements apply to "destination" : <integer>, // Which server these requirements apply to "link" : ["<uri>"], // Links to the FHIR specification "capabilities" : { Reference(CapabilityStatement) } // R! Required Capability Statement }] }," " " " ""fixture" : [{ // Fixture in the test script - by reference (uri) "autocreate" : <boolean>, // Whether or not to implicitly create the fixture during setup "autodelete" : <boolean>, // Whether or not to implicitly delete the fixture during teardown "resource" : { Reference(Any) } // Reference of the resource }]," " " " " ""profile" : [{ Reference(Any) }], // Reference of the validation profile "variable" : [{ // Placeholder for evaluated elements "name" : "<string>", // R! Descriptive name for this variable "defaultValue" : "<string>", // Default, hard-coded, or user-defined value for this variable "description" : "<string>", // Natural language description of the variable "expression" : "<string>", // The fluentpath expression against the fixture body "headerField" : "<string>", // HTTP header field name for source "hint" : "<string>", // Hint help text for default value to enter "path" : "<string>", // XPath or JSONPath against the fixture body "sourceId" : "<id>" // Fixture Id of source expression or headerField within this variable }]," " " " " " " " " " " " " " " ""rule" : [{ // Assert rule used within the test script "resource" : { Reference(Any) }, // R! Assert rule resource reference "param" : [{ // Rule parameter template "name" : "<string>", // R! Parameter name matching external assert rule parameter "value" : "<string>" // Parameter value defined either explicitly or dynamically }] }], "ruleset" : [{ // Assert ruleset used within the test script "resource" : { Reference(Any) }, // R! Assert ruleset resource reference "rule" : [{ // R! The referenced rule within the ruleset "ruleId" : "<id>", // R! Id of referenced rule within the ruleset "param" : [{ // Ruleset rule parameter template "name" : "<string>", // R! Parameter name matching external assert ruleset rule parameter "value" : "<string>" // Parameter value defined either explicitly or dynamically }] }] }], "setup" : { // A series of required setup operations before tests are executed "action" : [{ // R! A setup operation or assert to perform "operation" : { // The setup operation to perform "type" : { Coding }, // The operation code type that will be executed "resource" : "<code>", // Resource type "label" : "<string>", // Tracking/logging operation label "description" : "<string>", // Tracking/reporting operation description "accept" : "<code>", // xml | json | ttl | none "contentType" : "<code>", // xml | json | ttl | none "destination" : <integer>, // Server responding to the request "encodeRequestUrl" : <boolean>, // Whether or not to send the request url in encoded format "origin" : <integer>, // Server initiating the request "params" : "<string>", // Explicitly defined path parameters "requestHeader" : [{ // Each operation can have one or more header elements "field" : "<string>", // R! HTTP header field name "value" : "<string>" // R! HTTP headerfield value }]," " " ""requestId" : "<id>", // Fixture Id of mapped request "responseId" : "<id>", // Fixture Id of mapped response "sourceId" : "<id>", // Fixture Id of body for PUT and POST requests "targetId" : "<id>", // Id of fixture used for extracting the [id], [type], and [vid] for GET requests "url" : "<string>" // Request URL }," " " " " " " " " " " " " " " " " " ""assert" : { // The assertion to perform "label" : "<string>", // Tracking/logging assertion label "description" : "<string>", // Tracking/reporting assertion description "direction" : "<code>", // response | request "compareToSourceId" : "<string>", // Id of the source fixture to be evaluated "compareToSourceExpression" : "<string>", // The fluentpath expression to evaluate against the source fixture "compareToSourcePath" : "<string>", // XPath or JSONPath expression to evaluate against the source fixture "contentType" : "<code>", // xml | json | ttl | none "expression" : "<string>", // The fluentpath expression to be evaluated "headerField" : "<string>", // HTTP header field name "minimumId" : "<string>", // Fixture Id of minimum content resource "navigationLinks" : <boolean>, // Perform validation on navigation links? "operator" : "<code>", // equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval "path" : "<string>", // XPath or JSONPath expression "requestMethod" : "<code>", // delete | get | options | patch | post | put "requestURL" : "<string>", // Request URL comparison value "resource" : "<code>", // Resource type "response" : "<code>", // okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable "responseCode" : "<string>", // HTTP response code to test "rule" : { // The reference to a TestScript.rule "ruleId" : "<id>", // R! Id of the TestScript.rule "param" : [{ // Rule parameter template "name" : "<string>", // R! Parameter name matching external assert rule parameter "value" : "<string>" // R! Parameter value defined either explicitly or dynamically }] }, "ruleset" : { // The reference to a TestScript.ruleset "rulesetId" : "<id>", // R! Id of the TestScript.ruleset "rule" : [{ // The referenced rule within the ruleset "ruleId" : "<id>", // R! Id of referenced rule within the ruleset "param" : [{ // Rule parameter template "name" : "<string>", // R! Parameter name matching external assert ruleset rule parameter "value" : "<string>" // R! Parameter value defined either explicitly or dynamically }] }] }, "sourceId" : "<id>", // Fixture Id of source expression or headerField "validateProfileId" : "<id>", // Profile Id of validation profile reference "value" : "<string>", // The value to compare to "warningOnly" : <boolean> // Will this assert produce a warning only on error? } }] }," " " " " " ""test" : [{ // A test in this script "name" : "<string>", // Tracking/logging name of this test "description" : "<string>", // Tracking/reporting short description of the test "action" : [{ // R! A test operation or assert to perform "operation" : { Content as for TestScript.setup.action.operation }, // The setup operation to perform "assert" : { Content as for TestScript.setup.action.assert } // The setup assertion to perform }] }]," " ""teardown" : { // A series of required clean up steps "action" : [{ // R! One or more teardown operations to perform "operation" : { Content as for TestScript.setup.action.operation } // R! The teardown operation to perform }] } }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:TestScript; 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:TestScript.url [ uri ]; # 1..1 Logical URI to reference this test script (globally unique) fhir:TestScript.identifier [ Identifier ]; # 0..1 Additional identifier for the test script fhir:TestScript.version [ string ]; # 0..1 Business version of the test script fhir:TestScript.name [ string ]; # 1..1 Name for this test script (computer friendly) fhir:TestScript.title [ string ]; # 0..1 Name for this test script (human friendly) fhir:TestScript.status [ code ]; # 1..1 draft | active | retired | unknown fhir:TestScript.experimental [ boolean ]; # 0..1 For testing purposes, not real usage fhir:TestScript.date [ dateTime ]; # 0..1 Date this was last changed fhir:TestScript.publisher [ string ]; # 0..1 Name of the publisher (organization or individual) fhir:TestScript.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher fhir:TestScript.description [ markdown ]; # 0..1 Natural language description of the test script fhir:TestScript.useContext [ UsageContext ], ... ; # 0..* Context the content is intended to support fhir:TestScript.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for test script (if applicable) fhir:TestScript.purpose [ markdown ]; # 0..1 Why this test script is defined fhir:TestScript.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions fhir:TestScript.origin [ # 0..* An abstract server representing a client or sender in a message exchange fhir:TestScript.origin.index [ integer ]; # 1..1 The index of the abstract origin server starting at 1 fhir:TestScript.origin.profile [ Coding ]; # 1..1 FHIR-Client | FHIR-SDC-FormFiller ], ...; fhir:TestScript.destination [ # 0..* An abstract server representing a destination or receiver in a message exchange fhir:TestScript.destination.index [ integer ]; # 1..1 The index of the abstract destination server starting at 1 fhir:TestScript.destination.profile [ Coding ]; # 1..1 FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor ], ...; fhir:TestScript.metadata [ # 0..1 Required capability that is assumed to function correctly on the FHIR server being tested fhir:TestScript.metadata.link [ # 0..* Links to the FHIR specification fhir:TestScript.metadata.link.url [ uri ]; # 1..1 URL to the specification fhir:TestScript.metadata.link.description [ string ]; # 0..1 Short description ], ...; fhir:TestScript.metadata.capability [ # 1..* Capabilities that are assumed to function correctly on the FHIR server being tested fhir:TestScript.metadata.capability.required [ boolean ]; # 0..1 Are the capabilities required? fhir:TestScript.metadata.capability.validated [ boolean ]; # 0..1 Are the capabilities validated? fhir:TestScript.metadata.capability.description [ string ]; # 0..1 The expected capabilities of the server fhir:TestScript.metadata.capability.origin [ integer ], ... ; # 0..* Which origin server these requirements apply to fhir:TestScript.metadata.capability.destination [ integer ]; # 0..1 Which server these requirements apply to fhir:TestScript.metadata.capability.link [ uri ], ... ; # 0..* Links to the FHIR specification fhir:TestScript.metadata.capability.capabilities [ Reference(CapabilityStatement) ]; # 1..1 Required Capability Statement ], ...; ]; fhir:TestScript.fixture [ # 0..* Fixture in the test script - by reference (uri) fhir:TestScript.fixture.autocreate [ boolean ]; # 0..1 Whether or not to implicitly create the fixture during setup fhir:TestScript.fixture.autodelete [ boolean ]; # 0..1 Whether or not to implicitly delete the fixture during teardown fhir:TestScript.fixture.resource [ Reference(Any) ]; # 0..1 Reference of the resource ], ...; fhir:TestScript.profile [ Reference(Any) ], ... ; # 0..* Reference of the validation profile fhir:TestScript.variable [ # 0..* Placeholder for evaluated elements fhir:TestScript.variable.name [ string ]; # 1..1 Descriptive name for this variable fhir:TestScript.variable.defaultValue [ string ]; # 0..1 Default, hard-coded, or user-defined value for this variable fhir:TestScript.variable.description [ string ]; # 0..1 Natural language description of the variable fhir:TestScript.variable.expression [ string ]; # 0..1 The fluentpath expression against the fixture body fhir:TestScript.variable.headerField [ string ]; # 0..1 HTTP header field name for source fhir:TestScript.variable.hint [ string ]; # 0..1 Hint help text for default value to enter fhir:TestScript.variable.path [ string ]; # 0..1 XPath or JSONPath against the fixture body fhir:TestScript.variable.sourceId [ id ]; # 0..1 Fixture Id of source expression or headerField within this variable ], ...; fhir:TestScript.rule [ # 0..* Assert rule used within the test script fhir:TestScript.rule.resource [ Reference(Any) ]; # 1..1 Assert rule resource reference fhir:TestScript.rule.param [ # 0..* Rule parameter template fhir:TestScript.rule.param.name [ string ]; # 1..1 Parameter name matching external assert rule parameter fhir:TestScript.rule.param.value [ string ]; # 0..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; fhir:TestScript.ruleset [ # 0..* Assert ruleset used within the test script fhir:TestScript.ruleset.resource [ Reference(Any) ]; # 1..1 Assert ruleset resource reference fhir:TestScript.ruleset.rule [ # 1..* The referenced rule within the ruleset fhir:TestScript.ruleset.rule.ruleId [ id ]; # 1..1 Id of referenced rule within the ruleset fhir:TestScript.ruleset.rule.param [ # 0..* Ruleset rule parameter template fhir:TestScript.ruleset.rule.param.name [ string ]; # 1..1 Parameter name matching external assert ruleset rule parameter fhir:TestScript.ruleset.rule.param.value [ string ]; # 0..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; ], ...; fhir:TestScript.setup [ # 0..1 A series of required setup operations before tests are executed fhir:TestScript.setup.action [ # 1..* A setup operation or assert to perform fhir:TestScript.setup.action.operation [ # 0..1 The setup operation to perform fhir:TestScript.setup.action.operation.type [ Coding ]; # 0..1 The operation code type that will be executed fhir:TestScript.setup.action.operation.resource [ code ]; # 0..1 Resource type fhir:TestScript.setup.action.operation.label [ string ]; # 0..1 Tracking/logging operation label fhir:TestScript.setup.action.operation.description [ string ]; # 0..1 Tracking/reporting operation description fhir:TestScript.setup.action.operation.accept [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.operation.contentType [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.operation.destination [ integer ]; # 0..1 Server responding to the request fhir:TestScript.setup.action.operation.encodeRequestUrl [ boolean ]; # 0..1 Whether or not to send the request url in encoded format fhir:TestScript.setup.action.operation.origin [ integer ]; # 0..1 Server initiating the request fhir:TestScript.setup.action.operation.params [ string ]; # 0..1 Explicitly defined path parameters fhir:TestScript.setup.action.operation.requestHeader [ # 0..* Each operation can have one or more header elements fhir:TestScript.setup.action.operation.requestHeader.field [ string ]; # 1..1 HTTP header field name fhir:TestScript.setup.action.operation.requestHeader.value [ string ]; # 1..1 HTTP headerfield value ], ...; fhir:TestScript.setup.action.operation.requestId [ id ]; # 0..1 Fixture Id of mapped request fhir:TestScript.setup.action.operation.responseId [ id ]; # 0..1 Fixture Id of mapped response fhir:TestScript.setup.action.operation.sourceId [ id ]; # 0..1 Fixture Id of body for PUT and POST requests fhir:TestScript.setup.action.operation.targetId [ id ]; # 0..1 Id of fixture used for extracting the [id], [type], and [vid] for GET requests fhir:TestScript.setup.action.operation.url [ string ]; # 0..1 Request URL ]; fhir:TestScript.setup.action.assert [ # 0..1 The assertion to perform fhir:TestScript.setup.action.assert.label [ string ]; # 0..1 Tracking/logging assertion label fhir:TestScript.setup.action.assert.description [ string ]; # 0..1 Tracking/reporting assertion description fhir:TestScript.setup.action.assert.direction [ code ]; # 0..1 response | request fhir:TestScript.setup.action.assert.compareToSourceId [ string ]; # 0..1 Id of the source fixture to be evaluated fhir:TestScript.setup.action.assert.compareToSourceExpression [ string ]; # 0..1 The fluentpath expression to evaluate against the source fixture fhir:TestScript.setup.action.assert.compareToSourcePath [ string ]; # 0..1 XPath or JSONPath expression to evaluate against the source fixture fhir:TestScript.setup.action.assert.contentType [ code ]; # 0..1 xml | json | ttl | none fhir:TestScript.setup.action.assert.expression [ string ]; # 0..1 The fluentpath expression to be evaluated fhir:TestScript.setup.action.assert.headerField [ string ]; # 0..1 HTTP header field name fhir:TestScript.setup.action.assert.minimumId [ string ]; # 0..1 Fixture Id of minimum content resource fhir:TestScript.setup.action.assert.navigationLinks [ boolean ]; # 0..1 Perform validation on navigation links? fhir:TestScript.setup.action.assert.operator [ code ]; # 0..1 equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval fhir:TestScript.setup.action.assert.path [ string ]; # 0..1 XPath or JSONPath expression fhir:TestScript.setup.action.assert.requestMethod [ code ]; # 0..1 delete | get | options | patch | post | put fhir:TestScript.setup.action.assert.requestURL [ string ]; # 0..1 Request URL comparison value fhir:TestScript.setup.action.assert.resource [ code ]; # 0..1 Resource type fhir:TestScript.setup.action.assert.response [ code ]; # 0..1 okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable fhir:TestScript.setup.action.assert.responseCode [ string ]; # 0..1 HTTP response code to test fhir:TestScript.setup.action.assert.rule [ # 0..1 The reference to a TestScript.rule fhir:TestScript.setup.action.assert.rule.ruleId [ id ]; # 1..1 Id of the TestScript.rule fhir:TestScript.setup.action.assert.rule.param [ # 0..* Rule parameter template fhir:TestScript.setup.action.assert.rule.param.name [ string ]; # 1..1 Parameter name matching external assert rule parameter fhir:TestScript.setup.action.assert.rule.param.value [ string ]; # 1..1 Parameter value defined either explicitly or dynamically ], ...; ]; fhir:TestScript.setup.action.assert.ruleset [ # 0..1 The reference to a TestScript.ruleset fhir:TestScript.setup.action.assert.ruleset.rulesetId [ id ]; # 1..1 Id of the TestScript.ruleset fhir:TestScript.setup.action.assert.ruleset.rule [ # 0..* The referenced rule within the ruleset fhir:TestScript.setup.action.assert.ruleset.rule.ruleId [ id ]; # 1..1 Id of referenced rule within the ruleset fhir:TestScript.setup.action.assert.ruleset.rule.param [ # 0..* Rule parameter template fhir:TestScript.setup.action.assert.ruleset.rule.param.name [ string ]; # 1..1 Parameter name matching external assert ruleset rule parameter fhir:TestScript.setup.action.assert.ruleset.rule.param.value [ string ]; # 1..1 Parameter value defined either explicitly or dynamically ], ...; ], ...; ]; fhir:TestScript.setup.action.assert.sourceId [ id ]; # 0..1 Fixture Id of source expression or headerField fhir:TestScript.setup.action.assert.validateProfileId [ id ]; # 0..1 Profile Id of validation profile reference fhir:TestScript.setup.action.assert.value [ string ]; # 0..1 The value to compare to fhir:TestScript.setup.action.assert.warningOnly [ boolean ]; # 0..1 Will this assert produce a warning only on error? ]; ], ...; ]; fhir:TestScript.test [ # 0..* A test in this script fhir:TestScript.test.name [ string ]; # 0..1 Tracking/logging name of this test fhir:TestScript.test.description [ string ]; # 0..1 Tracking/reporting short description of the test fhir:TestScript.test.action [ # 1..* A test operation or assert to perform fhir:TestScript.test.action.operation [ See TestScript.setup.action.operation ]; # 0..1 The setup operation to perform fhir:TestScript.test.action.assert [ See TestScript.setup.action.assert ]; # 0..1 The setup assertion to perform ], ...; ], ...; fhir:TestScript.teardown [ # 0..1 A series of required clean up steps fhir:TestScript.teardown.action [ # 1..* One or more teardown operations to perform fhir:TestScript.teardown.action.operation [ See TestScript.setup.action.operation ]; # 1..1 The teardown operation to perform ], ...; ]; ]
Changes
since
DSTU2
| TestScript | |
| TestScript.title |
|
| TestScript.status |
|
| TestScript.experimental |
|
| TestScript.contact |
|
| TestScript.description |
|
| TestScript.useContext |
|
| TestScript.jurisdiction |
|
| TestScript.purpose |
|
| TestScript.copyright |
|
| TestScript.origin |
|
| TestScript.origin.index |
|
| TestScript.origin.profile |
|
| TestScript.destination |
|
| TestScript.destination.index |
|
| TestScript.destination.profile |
|
| TestScript.metadata.capability.origin |
|
| TestScript.metadata.capability.capabilities |
|
| TestScript.fixture.autocreate |
|
| TestScript.fixture.autodelete |
|
| TestScript.variable.defaultValue |
|
| TestScript.variable.description |
|
| TestScript.variable.expression |
|
| TestScript.variable.hint |
|
| TestScript.rule |
|
| TestScript.rule.resource |
|
| TestScript.rule.param |
|
| TestScript.rule.param.name |
|
| TestScript.rule.param.value |
|
| TestScript.ruleset |
|
| TestScript.ruleset.resource |
|
| TestScript.ruleset.rule |
|
| TestScript.ruleset.rule.ruleId |
|
| TestScript.ruleset.rule.param |
|
| TestScript.ruleset.rule.param.name |
|
| TestScript.ruleset.rule.param.value |
|
| TestScript.setup.action.operation.destination |
|
| TestScript.setup.action.operation.origin |
|
| TestScript.setup.action.operation.requestId |
|
| TestScript.setup.action.assert.compareToSourceExpression |
|
| TestScript.setup.action.assert.expression |
|
| TestScript.setup.action.assert.requestMethod |
|
| TestScript.setup.action.assert.requestURL |
|
| TestScript.setup.action.assert.rule |
|
| TestScript.setup.action.assert.rule.ruleId |
|
| TestScript.setup.action.assert.rule.param |
|
| TestScript.setup.action.assert.rule.param.name |
|
| TestScript.setup.action.assert.rule.param.value |
|
| TestScript.setup.action.assert.ruleset |
|
| TestScript.setup.action.assert.ruleset.rulesetId |
|
| TestScript.setup.action.assert.ruleset.rule |
|
| TestScript.setup.action.assert.ruleset.rule.ruleId |
|
| TestScript.setup.action.assert.ruleset.rule.param |
|
| TestScript.setup.action.assert.ruleset.rule.param.name |
|
| TestScript.setup.action.assert.ruleset.rule.param.value |
|
| TestScript.teardown.action.operation |
|
| TestScript.contact.name |
|
| TestScript.contact.telecom |
|
| TestScript.requirements |
|
| TestScript.metadata.capability.conformance |
|
| TestScript.multiserver |
|
| TestScript.setup.metadata |
|
| TestScript.test.metadata |
|
See the Full Difference for further information
This analysis is available as XML or JSON .
See R2 <--> R3 Conversion Maps (status = 6 tests that all execute ok. 6 fail round-trip testing and 6 r3 resources are invalid (11 errors). ).
Alternate
definitions:
Schema
/
Schematron
,
Resource
Profile
Master
Definition
(
XML
,
JSON
),
Questionnaire
XML
Schema
/
Schematron
(for
)
+
JSON
Schema
,
ShEx
(for
Turtle
)
| Path | Definition | Type | Reference |
|---|---|---|---|
| TestScript.status | The lifecycle status of a Value Set or Concept Map. | Required |
|
| TestScript.jurisdiction |
|
Extensible |
|
| TestScript.origin.profile | The type of origin profile the test system supports. | Extensible | TestScriptProfileOriginType |
| TestScript.destination.profile | The type of destination profile the test system supports. | Extensible | TestScriptProfileDestinationType |
| TestScript.setup.action.operation.type | The allowable operation code types. | Extensible |
|
|
TestScript.setup.action.operation.resource
TestScript.setup.action.assert.resource |
Either a resource or a data type. | Required |
|
|
TestScript.setup.action.operation.accept
TestScript.setup.action.operation.contentType TestScript.setup.action.assert.contentType |
The content or mime type. | Required | ContentType |
| TestScript.setup.action.assert.direction | The type of direction to use for assertion. | Required | AssertionDirectionType |
| TestScript.setup.action.assert.operator | The type of operator to use for assertion. | Required | AssertionOperatorType |
| TestScript.setup.action.assert.requestMethod | The allowable request method or HTTP operation codes. | Required | TestScriptRequestMethodCode |
| TestScript.setup.action.assert.response | The type of response code to use for assertion. | Required | AssertionResponseTypes |
on
on
on
on
on
on
There
are
two
ways
Please
refer
to
verify
the
"Content-Type"
header
in
response:
Use
the
contentType
element:
Test
engines
will
verify
that
"application/json+fhir"
is
present
in
Content-Type
header
if
"json"
is
specified
and
will
verify
that
"application/xml+fhir"
is
present
if
"xml"
is
specified.
Use
the
requestHeader
element
to
verify
Content-Type
explicitly
:
Test
engines
will
take
values
specified
for
headerField
"as-is"
and
not
interpret
them.
Note
that
test
engines
will
not
verify
contentType
in
response
if
assertions
for
contentType
are
missing.
6.24.5.1.15
Use
variables
Variables
Testing
FHIR
-
How
Tos
can
be
defined
against
static
fixtures
and
dynamic
operation
responses.
They
can
be
used
in
"operation.params",
"operation.requestHeader.value",
"operation.url",
and
"assert.value"
element
values.
As
such
they
allow
for
the
data
used
in
operations
and
assertions
to
be
externally
defined.
The
data
could
be
unique
to
each
client
involved
in
interactions
examples
on
working
with
a
server
or
could
be
unique
to
a
given
server
database
instance.
This
allows
for
multiple
clients
to
execute
the
same
test
scripts
concurrently
against
the
same
server.
Variables
would
be
defined
at
the
top
of
the
script.
Below
is
a
variable
that
is
defined
as
the
Location
header
to
the
response
referenced
by
"R1":
Test
engines
will
not
evaluate
this
at
this
point.
They
will
store
the
expresssion
in
"V1"
and
will
look
for
"${}"
in
"operation.params",
"operation.requestHeader.value",
and
"operation.url"
element
values
during
operation
calls.
Here
is
a
read
operation
that
will
use
the
V1
variable.
The
variable
expression
was
"Location
against
R1
response"
(defined
above).
If
a
prior
operation
has
not
set
R1
to
be
the
responseId
of
the
operation,
then
test
engine
will
error
out.
Otherwise,
V1
will
be
set
to
the
Location
header
value
of
R1
response
and
that
value
will
be
substituted
for
${V1}
below.
In
other
words,
the
read
will
be
performed
against
the
Location
header
value
of
R1
response.
Below
are
three
variables
defined
as
path
expressions
against
the
static
fixture
referenced
by
"F1".
The
expressions
are
against
the
given
name,
family
name,
and
birthDate
of
a
patient
resource.
The
resource
data
will
be
managed
external
to
the
test
script.
Again,
test
engines
will
not
evaluate
the
path
expression
at
this
point.
They
will
look
for
anything
wrapped
in
'${}'
in
"operation.params",
"operation.requestHeader.value",
"operation.url",
and
"assert.value"
element
values
and
substitute
the
placeholders
with
the
evaluated
expressions.
Search
parameters
for
this
resource.
The
contents
of
PatientCreateDelete.xml
would
be
a
minimal
conformance
statement
to
indicate
what
sections
need
to
be
present
in
server
conformance
statement:
When
the
metadata
capabilities
section
is
defined
at
TestScript.metadata
common
parameters
or
at
TestScript.setup.metadata
,
and
the
server's
conformance
statement
does
not
contain
the
elements
defined
in
the
minimal
conformance
statement,
then
all
the
tests
in
the
TestScript
are
skipped.
When
the
metadata
capabilities
section
is
defined
at
TestScript.test.metadata
also
apply.
See
Searching
and
the
server's
conformance
statement
does
not
contain
the
elements
defined
for
more
information
about
searching
in
the
minimal
conformance
statement,
then
only
that
test
is
skipped.
The
"metadata.capabilities.required"
and
"metadata.capabilities.validated"
elements
only
indicate
whether
the
capabilities
are
the
primary
focus
of
the
test
script
or
not.
The
do
not
impact
the
skipping
logic.
Capabilities
whose
"metadata.capabilities.validated"
flag
is
true
are
the
primary
focus
of
the
test
script.
6.24.6
Operations
This
table
presents
a
summary
of
the
constraints
applicable
to
TestScript.setup.action.operation,
TestScript.test.action.operation,
REST,
messaging,
and
TestScript.teardown.action.operation
elements.
The
operation
elements
should
be
configured
consistently
with
the
FHIR
RESTful
API
summary
.
services.
|
|
|
Description
|
Expression
|
In
Common
|
|
|
|
The
|
|
|
|
|
|
The
|
|
|
|
|
token
|
|
|
|
|
|
|
|
|
|
|
|
string |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| testscript-capability | string | TestScript required and validated capability | TestScript.metadata.capability.description | |
|
|
string |
|
|
|
|
|
|
|
|
|
|
|
|
|
|