|
TestScript
|
|
Definition
|
TestScript
is
a
resource
that
specifies
a
suite
of
tests
against
a
FHIR
server
implementation
to
determine
compliance
against
the
FHIR
specification.
TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.
|
|
Control
|
1..1
|
|
TestScript.url
|
|
Definition
|
An
absolute
URL
that
is
used
to
identify
this
Test
Script.
This
SHALL
be
a
URL,
SHOULD
be
globally
unique,
and
SHOULD
be
an
address
at
which
this
Test
Script
is
(or
will
be)
published.
An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.
|
|
Control
|
1..1
|
|
Type
|
uri
|
Alternate
Names
Alternate Names
|
url;
authoritative-url;
destination;
identity
url; authoritative-url; destination; identity
|
|
Summary
|
true
|
|
TestScript.version
|
|
Definition
|
The
identifier
that
is
used
to
identify
this
version
of
the
TestScript.
This
is
an
arbitrary
value
managed
by
the
TestScript
author
manually.
The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.
|
|
Note
|
This
is
a
business
versionId,
not
a
resource
identifier
(see
This is a business versionId, not a resource version id (see
discussion
)
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Requirements
|
There
may
be
multiple
resource
versions
of
the
TestScript
that
have
this
same
identifier.
The
resource
version
id
will
change
for
technical
reasons,
whereas
the
stated
version
number
needs
to
be
under
the
author's
control.
There may be multiple resource versions of the TestScript that have this same identifier. The resource version id will change for technical reasons, whereas the stated version number needs to be under the author's control.
|
|
Summary
|
true
|
|
TestScript.name
|
|
Definition
|
A
free
text
natural
language
name
identifying
the
TestScript.
A free text natural language name identifying the TestScript.
|
|
Control
|
1..1
|
|
Type
|
string
|
|
Summary
|
true
|
|
Comments
|
Not
expected
to
be
globally
unique.
Not expected to be globally unique.
|
|
TestScript.status
|
|
Definition
|
The
status
of
the
TestScript.
The status of the TestScript.
|
|
Control
|
1..1
|
|
Binding
|
ConformanceResourceStatus:
The
lifecycle
status
of
a
Value
Set
or
Concept
Map.
(
ConformanceResourceStatus:
The lifecycle status of a Value Set or Concept Map.
(
Required
)
|
|
Type
|
code
|
Is
Modifier
Is Modifier
|
true
|
|
Requirements
|
Allows
filtering
of
TestScripts
that
are
appropriate
for
use
vs.
not.
Allows filtering of TestScripts that are appropriate for use vs. not.
|
|
Summary
|
true
|
|
TestScript.identifier
|
|
Definition
|
Identifier
for
the
TestScript
assigned
for
external
purposes
outside
the
context
of
FHIR.
Identifier for the TestScript assigned for external purposes outside the context of FHIR.
|
|
Note
|
This
is
a
business
identifer,
not
a
resource
identifier
(see
This is a business identifer, not a resource identifier (see
discussion
)
|
|
Control
|
0..1
|
|
Type
|
Identifier
|
|
Summary
|
true
|
|
TestScript.experimental
|
|
Definition
|
This
TestScript
was
authored
for
testing
purposes
(or
education/evaluation/marketing),
and
is
not
intended
to
be
used
for
genuine
usage.
This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
|
|
Control
|
0..1
|
|
Type
|
boolean
|
|
Requirements
|
Allows
filtering
of
TestScripts
that
are
appropriate
for
use
vs.
not.
Allows filtering of TestScripts that are appropriate for use vs. not.
|
|
Summary
|
true
|
|
TestScript.publisher
|
|
Definition
|
The
name
of
the
individual
or
organization
that
published
the
Test
Script.
The name of the individual or organization that published the Test Script.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Requirements
|
Helps
establish
the
"authority/credibility"
of
the
Test
Script.
May
also
allow
for
contact.
Helps establish the "authority/credibility" of the Test Script. May also allow for contact.
|
|
Summary
|
true
|
|
Comments
|
Usually
an
organization,
but
may
be
an
individual.
This
item
SHOULD
be
populated
unless
the
information
is
available
from
context.
Usually an organization, but may be an individual. This item SHOULD be populated unless the information is available from context.
|
|
TestScript.contact
|
|
Definition
|
Contacts
to
assist
a
user
in
finding
and
communicating
with
the
publisher.
Contacts to assist a user in finding and communicating with the publisher.
|
|
Control
|
0..*
|
|
Summary
|
true
|
|
Comments
|
May
be
a
web
site,
an
email
address,
a
telephone
number
(tel:),
etc.
May be a web site, an email address, a telephone number (tel:), etc.
|
|
TestScript.contact.name
|
|
Definition
|
The
name
of
an
individual
to
contact
regarding
the
Test
Script.
The name of an individual to contact regarding the Test Script.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Summary
|
true
|
|
Comments
|
If
there
is
no
named
individual,
the
telecom
is
for
the
organization
as
a
whole.
If there is no named individual, the telecom is for the organization as a whole.
|
|
TestScript.contact.telecom
|
|
Definition
|
Contact
details
for
individual
(if
a
name
was
provided)
or
the
publisher.
Contact details for individual (if a name was provided) or the publisher.
|
|
Control
|
0..*
|
|
Type
|
ContactPoint
|
|
Summary
|
true
|
|
TestScript.date
|
|
Definition
|
The
date
this
version
of
the
test
tcript
was
published.
The
date
must
change
when
the
business
version
changes,
if
it
does,
and
it
must
change
if
the
status
code
changes.
In
addition,
it
should
change
when
the
substantive
content
of
the
test
cases
change.
The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.
|
|
Control
|
0..1
|
|
Type
|
dateTime
|
|
Summary
|
true
|
|
Comments
|
Additional
specific
dates
may
be
added
as
extensions.
Additional specific dates may be added as extensions.
|
|
TestScript.description
|
|
Definition
|
A
free
text
natural
language
description
of
the
TestScript
and
its
use.
A free text natural language description of the TestScript and its use.
|
|
Control
|
0..1
|
|
Type
|
string
markdown
|
|
Summary
|
true
|
|
Comments
|
This
field
can
be
used
for
things
such
as
why
the
TestScript
was
written,
comments
about
misuse,
instructions
for
clinical
use
and
interpretation,
literature
references,
examples
from
the
paper
world,
etc.
It
is
This field can be used for things such as why the TestScript was written, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is
not
a
rendering
of
the
TestScript
as
conveyed
in
TestScript.text.
This
item
SHOULD
be
populated
unless
the
information
is
available
from
context.
a rendering of the TestScript as conveyed in TestScript.text. This item SHOULD be populated unless the information is available from context.
|
|
TestScript.useContext
|
|
Definition
|
The
content
was
developed
with
a
focus
and
intent
of
supporting
the
contexts
that
are
listed.
These
terms
may
be
used
to
assist
with
indexing
and
searching
of
Test
Scripts.
The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.
|
|
Control
|
0..*
|
|
Binding
|
Context
of
Use
ValueSet:
Indicates
the
countries,
regions,
disciplines
and
other
aspects
of
use
within
which
this
artifact
is
targeted
for
use.
(
Context of Use ValueSet:
Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use.
(
Extensible
)
|
|
Type
|
CodeableConcept
|
|
Requirements
|
Assist
in
searching
for
appropriate
content.
Assist in searching for appropriate content.
|
|
Summary
|
true
|
|
TestScript.requirements
|
|
Definition
|
Explains
why
this
Test
Script
is
needed
and
why
it's
been
constrained
as
it
has.
Explains why this Test Script is needed and why it's been constrained as it has.
|
|
Control
|
0..1
|
|
Type
|
string
markdown
|
|
Comments
|
This
element
does
not
describe
the
usage
of
the
Test
Script
(that's
done
in
comments),
rather
it's
for
traceability
of
why
the
element
is
either
needed
or
This element does not describe the usage of the Test Script (that's done in comments), rather it's for traceability of
why
the
constraints
exist
as
they
do.
This
may
be
used
to
point
to
source
materials
or
specifications
that
drove
the
structure
of
this
data
element.
the element is either needed or why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this data element.
|
|
TestScript.copyright
|
|
Definition
|
A
copyright
statement
relating
to
the
Test
Script
and/or
its
contents.
Copyright
statements
are
generally
legal
restrictions
on
the
use
and
publishing
of
the
details
of
the
constraints
and
mappings.
A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.
|
|
Control
|
0..1
|
|
Type
|
string
|
Alternate
Names
Alternate Names
|
License;
Restrictions
License; Restrictions
|
|
TestScript.origin
|
|
Definition
|
An abstract server used in operations within this test script in the origin element.
|
|
Control
|
0..*
|
|
Comments
|
The purpose of this element is to define the profile of an origin element used elsewhere in the script. Test engines could then use the origin-profile mapping to offer a filtered list of test systems that can serve as the sender for the interaction.
|
TestScript.metadata
TestScript.origin.index
|
|
Definition
|
The
required
capability
must
exist
and
are
assumed
to
function
correctly
on
the
FHIR
server
being
tested.
Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.
|
|
Control
|
1..1
|
|
Type
|
integer
|
|
Comments
|
A given origin index (e.g. 1) can appear only once in the list (e.g. Origin 1 cannot be specified twice ... once as FormFiller and and again as FormProcessor within the same script as that could get confusing during test configuration).
Different origin indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Filler).
The origin indices provided elsewhere in the test script must be one of these origin indices.
|
|
TestScript.origin.profile
|
|
Definition
|
The type of origin profile the test system supports.
|
|
Control
|
1..1
|
|
Binding
|
TestScriptProfileOriginType:
The type of origin profile the test system supports.
(
Extensible
)
|
|
Type
|
Coding
|
|
Meaning if Missing
|
FHIR-Client
|
|
Comments
|
Must be a "sender"/"client" profile.
|
|
TestScript.destination
|
|
Definition
|
An abstract server used in operations within this test script in the destination element.
|
|
Control
|
0..*
|
|
Comments
|
The purpose of this element is to define the profile of an destination element used elsewhere in the script. Test engines could then use the destination-profile mapping to offer a filtered list of test systems that can serve as the receiver for the interaction.
|
|
TestScript.destination.index
|
|
Definition
|
Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.
|
|
Control
|
1..1
|
|
Type
|
integer
|
|
Comments
|
A given destination index (e.g. 1) can appear only once in the list (e.g. Destination 1 cannot be specified twice ... once as Form-Manager and and again as Form-Processor within the same script as that could get confusing during test configuration).
Different destination indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Manager).
The destination indices provided elsewhere in the test script must be one of these destination indices.
|
|
TestScript.destination.profile
|
|
Definition
|
The type of destination profile the test system supports.
|
|
Control
|
1..1
|
|
Binding
|
TestScriptProfileDestinationType:
The type of destination profile the test system supports.
(
Extensible
)
|
|
Type
|
Coding
|
|
Meaning if Missing
|
FHIR-Server
|
|
Comments
|
Must be a "receiver"/"server" profile.
|
|
TestScript.metadata
|
|
Definition
|
The required capability must exist and are assumed to function correctly on the FHIR server being tested.
|
|
Control
|
0..1
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-5
:
TestScript
metadata
capability
SHALL
contain
required
or
validated
or
both.
(xpath:
f:capability/f:required
or
f:capability/f:validated
or
(f:capability/f:required
and
f:capability/f:validated))
: TestScript metadata capability SHALL contain required or validated or both. (
expression
: capability.required.exists() or capability.validated.exists(), xpath: f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated))
|
|
TestScript.metadata.link
|
|
Definition
|
A
link
to
the
FHIR
specification
that
this
test
is
covering.
A link to the FHIR specification that this test is covering.
|
|
Control
|
0..*
|
|
TestScript.metadata.link.url
|
|
Definition
|
URL
to
a
particular
requirement
or
feature
within
the
FHIR
specification.
URL to a particular requirement or feature within the FHIR specification.
|
|
Control
|
1..1
|
|
Type
|
uri
|
|
TestScript.metadata.link.description
|
|
Definition
|
Short
description
of
the
link.
Short description of the link.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
TestScript.metadata.capability
|
|
Definition
|
Capabilities
that
must
exist
and
are
assumed
to
function
correctly
on
the
FHIR
server
being
tested.
Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.
|
|
Control
|
1..*
|
|
Comments
|
When
the
metadata
capabilities
section
is
defined
at
TestScript.metadata
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
and
the
server's
conformance
statement
does
not
contain
the
elements
defined
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.
When the metadata capabilities section is defined at TestScript.metadata 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 and the server's conformance statement does not contain the elements defined 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.
|
|
TestScript.metadata.capability.required
|
|
Definition
|
Whether
or
not
the
test
execution
will
require
the
given
capabilities
of
the
server
in
order
for
this
test
script
to
execute.
Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
|
|
Control
|
0..1
|
|
Type
|
boolean
|
Default
Value
Default Value
|
false
|
|
TestScript.metadata.capability.validated
|
|
Definition
|
Whether
or
not
the
test
execution
will
validate
the
given
capabilities
of
the
server
in
order
for
this
test
script
to
execute.
Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
|
|
Control
|
0..1
|
|
Type
|
boolean
|
Default
Value
Default Value
|
false
|
|
TestScript.metadata.capability.description
|
|
Definition
|
Description
of
the
capabilities
that
this
test
script
is
requiring
the
server
to
support.
Description of the capabilities that this test script is requiring the server to support.
|
|
Control
|
0..1
|
|
Type
|
string
|
TestScript.metadata.capability.destination
TestScript.metadata.capability.origin
|
|
Definition
|
Which
server
these
requirements
apply
to.
Which origin server these requirements apply to.
|
|
Control
|
0..1
0..*
|
|
Type
|
integer
|
TestScript.metadata.capability.link
TestScript.metadata.capability.destination
|
|
Definition
|
Links
to
the
FHIR
specification
that
describes
this
interaction
and
the
resources
involved
in
more
detail.
Which server these requirements apply to.
|
|
Control
|
0..*
0..1
|
|
Type
|
uri
integer
|
TestScript.metadata.capability.conformance
TestScript.metadata.capability.link
|
|
Definition
|
Minimum
conformance
required
of
server
for
test
script
to
execute
successfully.
If
server
does
not
meet
at
a
minimum
the
reference
conformance
definition,
then
all
tests
in
this
script
are
skipped.
Links to the FHIR specification that describes this interaction and the resources involved in more detail.
|
|
Control
|
1..1
0..*
|
|
Type
|
Reference
(
Conformance
uri
)
Comments
|
The
conformance
statement
of
the
server
has
to
contain
at
a
minimum
the
contents
of
the
reference
pointed
to
by
this
element.
TestScript.multiserver
TestScript.metadata.capability.conformance
|
|
Definition
|
If
the
tests
apply
to
more
than
one
FHIR
server
(e.g.
cross-server
interoperability
tests)
then
multiserver=true.
Defaults
to
false
if
value
is
unspecified.
Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.
|
|
Control
|
0..1
1..1
|
|
Type
|
boolean
Reference
(
Conformance
)
|
Meaning
if
Missing
Comments
|
False
The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element.
|
|
TestScript.fixture
|
|
Definition
|
Fixture
in
the
test
script
-
by
reference
(uri).
All
fixtures
are
required
for
the
test
script
to
execute.
Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.
|
|
Control
|
0..*
|
|
TestScript.fixture.autocreate
|
|
Definition
|
Whether
or
not
to
implicitly
create
the
fixture
during
setup.
If
true,
the
fixture
is
automatically
created
on
each
server
being
tested
during
setup,
therefore
no
create
operation
is
required
for
this
fixture
in
the
TestScript.setup
section.
Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.
|
|
Control
|
0..1
|
|
Type
|
boolean
|
Meaning
if
Missing
Default Value
|
False
false
|
|
TestScript.fixture.autodelete
|
|
Definition
|
Whether
or
not
to
implicitly
delete
the
fixture
during
teardown
If
true,
the
fixture
is
automatically
deleted
on
each
server
being
tested
during
teardown,
therefore
no
delete
operation
is
required
for
this
fixture
in
the
TestScript.teardown
section.
Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.
|
|
Control
|
0..1
|
|
Type
|
boolean
|
Meaning
if
Missing
Default Value
|
False
false
|
|
TestScript.fixture.resource
|
|
Definition
|
Reference
to
the
resource
(containing
the
contents
of
the
resource
needed
for
operations).
Reference to the resource (containing the contents of the resource needed for operations).
|
|
Control
|
0..1
|
|
Type
|
Reference
(
Any
)
|
|
Comments
|
See
http://hl7-fhir.github.io/resourcelist.html
for
complete
list
of
resource
types.
See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.
|
|
TestScript.profile
|
|
Definition
|
Reference
to
the
profile
to
be
used
for
validation.
Reference to the profile to be used for validation.
|
|
Control
|
0..*
|
|
Type
|
Reference
(
Any
)
|
|
Comments
|
See
http://hl7-fhir.github.io/resourcelist.html
for
complete
list
of
resource
types.
See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.
|
|
TestScript.variable
|
|
Definition
|
Variable
is
set
based
either
on
element
value
in
response
body
or
on
header
field
value
in
the
response
headers.
Variable is set based either on element value in response body or on header field value in the response headers.
|
|
Control
|
0..*
|
|
Comments
|
Variables
would
be
set
based
either
on
XPath/JsonPath
expressions
against
fixtures
(static
and
response),
or
headerField
evaluations
against
response
headers.
If
variable
evaluates
to
nodelist
or
anything
other
than
a
primitive
value,
then
test
engine
would
report
error.
Variables
would
be
used
to
perform
clean
replacements
in
"operation.params",
"operation.requestHeader.value",
and
"operation.url"
element
values
during
operation
calls
and
in
"assert.value"
during
assertion
evaluations.
This
limits
the
places
that
test
engines
would
need
to
look
for
placeholders
"${}".
Variables
are
scoped
to
the
whole
script.
They
are
NOT
evaluated
at
declaration.
They
are
evaluated
by
test
engine
when
used
for
substitutions
in
"operation.params",
"operation.requestHeader.value",
and
"operation.url"
element
values
during
operation
calls
and
in
"assert.value"
during
assertion
evaluations.
See
example
testscript-search.xml.
Variables would be set based either on XPath/JsonPath expressions against fixtures (static and response), or headerField evaluations against response headers. If variable evaluates to nodelist or anything other than a primitive value, then test engine would report error. Variables would be used to perform clean replacements in "operation.params", "operation.requestHeader.value", and "operation.url" element values during operation calls and in "assert.value" during assertion evaluations. This limits the places that test engines would need to look for placeholders "${}". Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in "operation.params", "operation.requestHeader.value", and "operation.url" element values during operation calls and in "assert.value" during assertion evaluations. See example testscript-search.xml.
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-4
:
Variable
cannot
contain
both
headerField
and
path.
(xpath:
not(f:headerField
and
f:path))
: Variable cannot contain both headerField and path. (
expression
: headerField.empty() or path.empty(), xpath: not(f:headerField and f:path))
|
|
TestScript.variable.name
|
|
Definition
|
Descriptive
name
for
this
variable.
Descriptive name for this variable.
|
|
Control
|
1..1
|
|
Type
|
string
|
|
Comments
|
Placeholders
would
contain
the
variable
name
wrapped
in
${}
in
"operation.params",
"operation.requestHeader.value",
and
"operation.url"
elements.
These
placeholders
would
need
to
be
replaced
by
the
variable
value
before
the
operation
is
executed.
Placeholders would contain the variable name wrapped in ${} in "operation.params", "operation.requestHeader.value", and "operation.url" elements. These placeholders would need to be replaced by the variable value before the operation is executed.
|
|
TestScript.variable.defaultValue
|
|
Definition
|
A default, hard-coded, or user-defined value for this variable.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
The purpose of this element is to allow for a pre-defined value that can be used as a default or as an override value. Test engines can optionally use this as a placeholder for user-defined execution time values.
|
|
TestScript.variable.headerField
|
|
Definition
|
Will
be
used
to
grab
the
HTTP
header
field
value
from
the
headers
that
sourceId
is
pointing
to.
Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
If
headerField
is
defined,
then
the
variable
will
be
evaluated
against
the
headers
that
sourceId
is
pointing
to.
If
path
is
defined,
then
the
variable
will
be
evaluated
against
the
fixture
body
that
sourceId
is
pointing
to.
It
is
an
error
to
define
both
headerField
and
path.
If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.
|
|
TestScript.variable.path
|
|
Definition
|
XPath
or
JSONPath
against
the
fixture
body.
When
variables
are
defined,
either
headerField
must
be
specified
or
path,
but
not
both.
XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
If
headerField
is
defined,
then
the
variable
will
be
evaluated
against
the
headers
that
sourceId
is
pointing
to.
If
path
is
defined,
then
the
variable
will
be
evaluated
against
the
fixture
body
that
sourceId
is
pointing
to.
It
is
an
error
to
define
both
headerField
and
path.
If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.
|
|
TestScript.variable.sourceId
|
|
Definition
|
Fixture
to
evaluate
the
XPath/JSONPath
expression
or
the
headerField
against
within
this
variable.
Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.
|
|
Control
|
0..1
|
|
Type
|
id
|
|
Comments
|
This
can
be
a
statically
defined
fixture
(at
the
top
of
the
testscript)
or
a
dynamically
set
fixture
created
by
responseId
of
the
action.operation
element.
This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.
|
|
TestScript.rule
|
|
Definition
|
Assert rule to be used in one or more asserts within the test script.
|
|
Control
|
0..*
|
|
Comments
|
Each rule should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.
|
|
TestScript.rule.resource
|
|
Definition
|
Reference to the resource (containing the contents of the rule needed for assertions).
|
|
Control
|
1..1
|
|
Type
|
Reference
(
Any
)
|
TestScript.setup
TestScript.rule.param
|
|
Definition
|
A
series
of
required
setup
operations
before
tests
are
executed.
Each rule template can take one or more parameters for rule evaluation.
|
|
Control
|
0..*
|
|
Comments
|
The parameter value can be dynamic at runtime.
|
|
TestScript.rule.param.name
|
|
Definition
|
Descriptive name for this parameter that matches the external assert rule parameter name.
|
|
Control
|
1..1
|
|
Type
|
string
|
|
Comments
|
The external rule template would be looking for the parameter by this name.
|
|
TestScript.rule.param.value
|
|
Definition
|
The explict or dynamic value for the parameter that will be passed on to the external rule template.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
This value can be overwritten by the assert.rule.param.value i.e. TestScript.rule.param.value will be used if assert.rule.param.value is not specified. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.
|
|
TestScript.ruleset
|
|
Definition
|
Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.
|
|
Control
|
0..*
|
|
Comments
|
Each rule within a ruleset should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.
|
|
TestScript.ruleset.resource
|
|
Definition
|
Reference to the resource (containing the contents of the ruleset needed for assertions).
|
|
Control
|
1..1
|
|
Type
|
Reference
(
Any
)
|
TestScript.setup.metadata
TestScript.ruleset.rule
|
|
Definition
|
Capabilities
that
must
exist
and
are
assumed
to
function
correctly
on
the
FHIR
server
being
tested.
The referenced rule within the external ruleset template.
|
|
Control
|
1..*
|
|
Comments
|
This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset.
|
|
TestScript.ruleset.rule.ruleId
|
|
Definition
|
Id of the referenced rule within the external ruleset template.
|
|
Control
|
0..1
1..1
|
|
Type
|
See
TestScript.metadata
id
|
|
TestScript.ruleset.rule.param
|
Invariants
Definition
|
Each rule template can take one or more parameters for rule evaluation.
|
|
Control
|
0..*
|
|
Comments
|
The parameter value can be dynamic at runtime.
|
Defined
on
this
element
TestScript.ruleset.rule.param.name
inv-6
:
Setup
metadata
capability
SHALL
contain
required
or
validated
or
both.
(xpath:
f:capability/f:required
or
f:capability/f:validated
or
(f:capability/f:required
and
f:capability/f:validated))
|
|
Definition
|
Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
|
|
Control
|
1..1
|
|
Type
|
string
|
|
Comments
|
The external rule template would be looking for the parameter by this name.
|
|
TestScript.ruleset.rule.param.value
|
|
Definition
|
The value for the parameter that will be passed on to the external ruleset rule template.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
This value can be overwritten by the assert.ruleset.rule.param.value i.e. TestScript.ruleset.rule.param.value will be used if assert.ruleset.rule.param.value is not specified. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.
|
TestScript.setup.action
TestScript.setup
|
|
Definition
|
Action
would
contain
either
an
operation
or
an
assertion.
A series of required setup operations before tests are executed.
|
|
Control
|
0..1
|
|
TestScript.setup.action
|
|
Definition
|
Action would contain either an operation or an assertion.
|
|
Control
|
1..*
|
|
Comments
|
An
action
should
contain
either
an
operation
or
an
assertion
but
not
both.
It
can
contain
any
number
of
variables.
An action should contain either an operation or an assertion but not both. It can contain any number of variables.
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-1
:
Setup
action
SHALL
contain
either
an
operation
or
assert
but
not
both.
(xpath:
(f:operation
or
f:assert)
and
not(f:operation
and
f:assert))
: Setup action SHALL contain either an operation or assert but not both. (
expression
: operation.exists() xor assert.exists(), xpath: (f:operation or f:assert) and not(f:operation and f:assert))
|
|
TestScript.setup.action.operation
|
|
Definition
|
The
operation
to
perform.
The operation to perform.
|
|
Control
|
0..1
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-10
:
Setup
operation
SHALL
contain
either
sourceId
or
targetId
or
params
or
url.
(xpath:
f:sourceId
or
((f:targetId
or
f:url
or
f:params)
and
(count(f:targetId)
+
count(f:url)
+
count(f:params)
=1))
or
(f:type/f:code/@value='conformance'
or
f:type/f:code/@value='search'
or
f:type/f:code/@value='transaction'
or
f:type/f:code/@value='history'))
inv-8
: Setup operation SHALL contain either sourceId or targetId or params or url. (
expression
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' |'search' | 'transaction' | 'history')), xpath: f:sourceId or ((f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1)) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history'))
|
|
TestScript.setup.action.operation.type
|
|
Definition
|
Server
interaction
or
operation
type.
Server interaction or operation type.
|
|
Control
|
0..1
|
|
Binding
|
TestScriptOperationCodes:
The
allowable
operation
types.
(
TestScriptOperationCode:
The allowable operation code types.
(
Extensible
)
|
|
Type
|
Coding
|
|
Comments
|
See
http://hl7-fhir.github.io/http.html
for
list
of
server
interactions.
See http://hl7-fhir.github.io/http.html for list of server interactions.
|
|
TestScript.setup.action.operation.resource
|
|
Definition
|
The
type
of
the
resource.
See
http://hl7-fhir.github.io/resourcelist.html.
The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.
|
|
Control
|
0..1
|
|
Binding
|
FHIRDefinedType:
Any
defined
Resource
or
Data
Type
name
FHIRDefinedType:
Any defined Resource or Data Type name
|
|
Type
|
code
|
|
Comments
|
If
"url"
element
is
specified,
then
"targetId",
"params",
and
"resource"
elements
will
be
ignored
as
"url"
element
will
have
everything
needed
for
constructing
the
request
url.
If
"params"
element
is
specified,
then
"targetId"
element
is
ignored.
For
FHIR
operations
that
require
a
resource
(e.g.
"read"
and
"vread"
operations),
the
"resource"
element
must
be
specified
when
"params"
element
is
specified.
If
"url"
and
"params"
elements
are
absent,
then
the
request
url
will
be
constructed
from
"targetId"
fixture
if
present.
For
"read"
operation,
the
resource
and
id
values
will
be
extracted
from
"targetId"
fixture
and
used
to
construct
the
url.
For
"vread"
and
"history"
operations,
the
versionId
value
will
also
be
used.
If "url" element is specified, then "targetId", "params", and "resource" elements will be ignored as "url" element will have everything needed for constructing the request url. If "params" element is specified, then "targetId" element is ignored. For FHIR operations that require a resource (e.g. "read" and "vread" operations), the "resource" element must be specified when "params" element is specified. If "url" and "params" elements are absent, then the request url will be constructed from "targetId" fixture if present. For "read" operation, the resource and id values will be extracted from "targetId" fixture and used to construct the url. For "vread" and "history" operations, the versionId value will also be used.
|
|
TestScript.setup.action.operation.label
|
|
Definition
|
The
label
would
be
used
for
tracking/logging
purposes
by
test
engines.
The label would be used for tracking/logging purposes by test engines.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
This
has
no
impact
on
the
verification
itself.
This has no impact on the verification itself.
|
|
TestScript.setup.action.operation.description
|
|
Definition
|
The
description
would
be
used
by
test
engines
for
tracking
and
reporting
purposes.
The description would be used by test engines for tracking and reporting purposes.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
This
has
no
impact
on
the
verification
itself.
This has no impact on the verification itself.
|
|
TestScript.setup.action.operation.accept
|
|
Definition
|
The
content-type
or
mime-type
to
use
for
RESTful
operation
in
the
'Accept'
header.
The content-type or mime-type to use for RESTful operation in the 'Accept' header.
|
|
Control
|
0..1
|
|
Binding
|
ContentType:
The
content
or
mime
type.
(
ContentType:
The content or mime type.
(
Required
)
|
|
Type
|
code
|
Meaning
if
Missing
Meaning if Missing
|
xml
|
|
Comments
|
If
this
is
specified,
then
test
engine
shall
set
the
'Accept'
header
to
the
corresponding
value.
If
'xml'
is
specified,
then
'Accept'
header
of
'application/xml+fhir'
will
be
set.
If
'json'
is
specified,
then
'application/json+fhir'
will
be
used.
If
you'd
like
to
explicitly
set
the
'Accept'
to
some
other
value
then
use
the
'requestHeader'
element.
If this is specified, then test engine shall set the 'Accept' header to the corresponding value. If 'xml' is specified, then 'Accept' header of 'application/fhir+xml' will be set. If 'json' is specified, then 'application/fhir+json' will be used. If you'd like to explicitly set the 'Accept' to some other value then use the 'requestHeader' element.
|
|
TestScript.setup.action.operation.contentType
|
|
Definition
|
The
content-type
or
mime-type
to
use
for
RESTful
operation
in
the
'Content-Type'
header.
The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.
|
|
Control
|
0..1
|
|
Binding
|
ContentType:
The
content
or
mime
type.
(
ContentType:
The content or mime type.
(
Required
)
|
|
Type
|
code
|
Meaning
if
Missing
Meaning if Missing
|
xml
|
|
Comments
|
If
this
is
specified,
then
test
engine
shall
set
the
'Content-Type'
header
to
the
corresponding
value.
If
'xml'
is
specified,
then
'Content-Type'
header
of
'application/xml+fhir'
will
be
set.
If
'json'
is
specified,
then
'application/json+fhir'
will
be
used.
If
you'd
like
to
explicitly
set
the
'Content-Type'
to
some
other
value
then
use
the
'requestHeader'
element.
If this is specified, then test engine shall set the 'Content-Type' header to the corresponding value. If 'xml' is specified, then 'Content-Type' header of 'application/fhir+xml' will be set. If 'json' is specified, then 'application/fhir+json' will be used. If you'd like to explicitly set the 'Content-Type' to some other value then use the 'requestHeader' element.
|
|
TestScript.setup.action.operation.destination
|
|
Definition
|
Which
server
to
perform
the
operation
on.
The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.
|
|
Control
|
0..1
|
|
Type
|
integer
|
Default
Value
Comments
|
0
If multiple TestScript.destination elements are defined and operation.destination is undefined, test engine will error as it cannot determine what destination to use for the exchange.
|
|
TestScript.setup.action.operation.encodeRequestUrl
|
|
Definition
|
Whether
or
not
to
implicitly
send
the
request
url
in
encoded
format.
The
default
is
true
to
match
the
standard
RESTful
client
behavior.
Set
to
false
when
communicating
with
a
server
that
does
not
support
encoded
url
paths.
Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.
|
|
Control
|
0..1
|
|
Type
|
boolean
|
Default
Value
Default Value
|
true
|
|
TestScript.setup.action.operation.origin
|
|
Definition
|
The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.
|
|
Control
|
0..1
|
|
Type
|
integer
|
|
Comments
|
If absent, test engine will send the message. When present, test engine will not send the request message but will wait for the request message to be sent from this origin server.
|
|
TestScript.setup.action.operation.params
|
|
Definition
|
Path
plus
parameters
after
[type].
Used
to
set
parts
of
the
request
URL
explicitly.
Path plus parameters after [type]. Used to set parts of the request URL explicitly.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
If
"url"
element
is
specified,
then
"targetId",
"params",
and
"resource"
elements
will
be
ignored
as
"url"
element
will
have
everything
needed
for
constructing
the
request
url.
If
"params"
element
is
specified,
then
"targetId"
element
is
ignored.
For
FHIR
operations
that
require
a
resource
(e.g.
"read"
and
"vread"
operations),
the
"resource"
element
must
be
specified
when
"params"
element
is
specified.
If
"url"
and
"params"
elements
are
absent,
then
the
request
url
will
be
constructed
from
"targetId"
fixture
if
present.
For
"read"
operation,
the
resource
and
id
values
will
be
extracted
from
"targetId"
fixture
and
used
to
construct
the
url.
For
"vread"
and
"history"
operations,
the
versionId
value
will
also
be
used.
Test
engines
would
append
whatever
is
specified
for
"params"
to
the
URL
after
the
resource
type
without
tampering
with
the
string
(beyond
encoding
the
URL
for
HTTP).
The
"params"
element
does
not
correspond
exactly
to
"search
parameters".
Nor
is
it
the
"path".
It
corresponds
to
the
part
of
the
URL
that
comes
after
the
[type]
(when
"resource"
element
is
specified);
e.g.
It
corresponds
to
"/[id]/
If "url" element is specified, then "targetId", "params", and "resource" elements will be ignored as "url" element will have everything needed for constructing the request url. If "params" element is specified, then "targetId" element is ignored. For FHIR operations that require a resource (e.g. "read" and "vread" operations), the "resource" element must be specified when "params" element is specified. If "url" and "params" elements are absent, then the request url will be constructed from "targetId" fixture if present. For "read" operation, the resource and id values will be extracted from "targetId" fixture and used to construct the url. For "vread" and "history" operations, the versionId value will also be used. Test engines would append whatever is specified for "params" to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP). The "params" element does not correspond exactly to "search parameters". Nor is it the "path". It corresponds to the part of the URL that comes after the [type] (when "resource" element is specified); e.g. It corresponds to "/[id]/
history/[vid]
{?
history/[vid] {?
format=[mime-type]}"
in
the
following
operation:
GET
[base]/[type]/[id]/
format=[mime-type]}" in the following operation: GET [base]/[type]/[id]/
history/[vid]
{?
history/[vid] {?
format=[mime-type]}
Test
engines
do
have
to
look
for
placeholders
(${})
and
replace
the
variable
placeholders
with
the
variable
values
at
runtime
before
sending
the
request.
format=[mime-type]} Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.
|
|
TestScript.setup.action.operation.requestHeader
|
|
Definition
|
Header
elements
would
be
used
to
set
HTTP
headers.
Header elements would be used to set HTTP headers.
|
|
Control
|
0..*
|
|
Comments
|
This
gives
control
to
test-script
writers
to
set
headers
explicitly
based
on
test
requirements.
It
will
allow
for
testing
using:
-
"If-Modified-Since"
and
"If-None-Match"
headers.
See
http://hl7-fhir.github.io/http.html#2.1.0.5.1
-
"If-Match"
header.
See
http://hl7-fhir.github.io/http.html#2.1.0.11
-
Conditional
Create
using
"If-None-Exist".
See
http://hl7-fhir.github.io/http.html#2.1.0.13.1
-
Invalid
"Content-Type"
header
for
negative
testing.
-
etc.
This gives control to test-script writers to set headers explicitly based on test requirements. It will allow for testing using: - "If-Modified-Since" and "If-None-Match" headers. See http://hl7-fhir.github.io/http.html#2.1.0.5.1 - "If-Match" header. See http://hl7-fhir.github.io/http.html#2.1.0.11 - Conditional Create using "If-None-Exist". See http://hl7-fhir.github.io/http.html#2.1.0.13.1 - Invalid "Content-Type" header for negative testing. - etc.
|
|
TestScript.setup.action.operation.requestHeader.field
|
|
Definition
|
The
HTTP
header
field
e.g.
"Accept".
The HTTP header field e.g. "Accept".
|
|
Control
|
1..1
|
|
Type
|
string
|
|
Comments
|
If
header
element
is
specified,
then
field
is
required.
If header element is specified, then field is required.
|
|
TestScript.setup.action.operation.requestHeader.value
|
|
Definition
|
The
value
of
the
header
e.g.
"application/xml".
The value of the header e.g. "application/fhir+xml".
|
|
Control
|
1..1
|
|
Type
|
string
|
|
Comments
|
If
header
element
is
specified,
then
value
is
required.
No
conversions
will
be
done
by
Test
Engine
e.g.
"xml"
to
"application/xml+fhir".
The
values
will
be
set
in
HTTP
headers
"as-is".
Test
engines
do
have
to
look
for
placeholders
(${})
and
replace
the
variable
placeholders
with
the
variable
values
at
runtime
before
sending
the
request.
If header element is specified, then value is required. No conversions will be done by Test Engine e.g. "xml" to "application/fhir+xml". The values will be set in HTTP headers "as-is". Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.
|
|
TestScript.setup.action.operation.responseId
|
|
Definition
|
The
fixture
id
(maybe
new)
to
map
to
the
response.
The fixture id (maybe new) to map to the response.
|
|
Control
|
0..1
|
|
Type
|
id
|
|
Comments
|
If
a
responseId
is
supplied,
and
the
server
responds,
then
the
resulting
response
(both
headers
and
body)
is
mapped
to
the
fixture
ID
(which
may
be
entirely
new
and
previously
undeclared)
designated
by
"responseId".
If
responseId
is
not
specified,
it
is
the
Test
Engine's
responsibility
to
store
the
response
and
use
it
as
sourceId
in
subsequent
assertions
when
assertion
path
and/or
headerField
is
specified
and
sourceId
is
not
specified.
If a responseId is supplied, and the server responds, then the resulting response (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by "responseId". If responseId is not specified, it is the Test Engine's responsibility to store the response and use it as sourceId in subsequent assertions when assertion path and/or headerField is specified and sourceId is not specified.
|
|
TestScript.setup.action.operation.sourceId
|
|
Definition
|
The
id
of
the
fixture
used
as
the
body
of
a
PUT
or
POST
request.
The id of the fixture used as the body of a PUT or POST request.
|
|
Control
|
0..1
|
|
Type
|
id
|
|
TestScript.setup.action.operation.targetId
|
|
Definition
|
Id
of
fixture
used
for
extracting
the
[id],
[type],
and
[vid]
for
GET
requests.
Id of fixture used for extracting the [id], [type], and [vid] for GET requests.
|
|
Control
|
0..1
|
|
Type
|
id
|
|
Comments
|
If
"url"
element
is
specified,
then
"targetId",
"params",
and
"resource"
elements
will
be
ignored
as
"url"
element
will
have
everything
needed
for
constructing
the
request
url.
If
"params"
element
is
specified,
then
"targetId"
element
is
ignored.
For
FHIR
operations
that
require
a
resource
(e.g.
"read"
and
"vread"
operations),
the
"resource"
element
must
be
specified
when
"params"
element
is
specified.
If
"url"
and
"params"
elements
are
absent,
then
the
request
url
will
be
constructed
from
"targetId"
fixture
if
present.
For
"read"
operation,
the
resource
and
id
values
will
be
extracted
from
"targetId"
fixture
and
used
to
construct
the
url.
For
"vread"
and
"history"
operations,
the
versionId
value
will
also
be
used.
If "url" element is specified, then "targetId", "params", and "resource" elements will be ignored as "url" element will have everything needed for constructing the request url. If "params" element is specified, then "targetId" element is ignored. For FHIR operations that require a resource (e.g. "read" and "vread" operations), the "resource" element must be specified when "params" element is specified. If "url" and "params" elements are absent, then the request url will be constructed from "targetId" fixture if present. For "read" operation, the resource and id values will be extracted from "targetId" fixture and used to construct the url. For "vread" and "history" operations, the versionId value will also be used.
|
|
TestScript.setup.action.operation.url
|
|
Definition
|
Complete
request
URL.
Complete request URL.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
Used
to
set
the
request
URL
explicitly.
If
"url"
element
is
defined,
then
"targetId",
"resource",
and
"params"
elements
will
be
ignored.
Test
engines
would
use
whatever
is
specified
in
"url"
without
tampering
with
the
string
(beyond
encoding
the
URL
for
HTTP).
Test
engines
do
have
to
look
for
placeholders
(${})
and
replace
the
variable
placeholders
with
the
variable
values
at
runtime
before
sending
the
request.
Used to set the request URL explicitly. If "url" element is defined, then "targetId", "resource", and "params" elements will be ignored. Test engines would use whatever is specified in "url" without tampering with the string (beyond encoding the URL for HTTP). Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.
|
|
TestScript.setup.action.assert
|
|
Definition
|
Evaluates
the
results
of
previous
operations
to
determine
if
the
server
under
test
behaves
appropriately.
Evaluates the results of previous operations to determine if the server under test behaves appropriately.
|
|
Control
|
0..1
|
|
Comments
|
In
order
to
evaluate
an
assertion,
the
request,
response,
and
results
of
the
most
recently
executed
operation
must
always
be
maintained
by
the
test
engine.
In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-13
:
Setup
action
assert
shall
contain
both
compareToSourceId
and
compareToSourcePath
or
neither.
(xpath:
(f:compareToSourceId
and
f:compareToSourcePath)
or
not(f:compareToSourceId
or
f:compareToSourcePath))
inv-11
: Setup action assert shall contain both compareToSourceId and compareToSourcePath or neither. (
expression
: compareToSourceId.empty() xor compareToSourcePath.exists(), xpath: (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath))
inv-8
:
Only
a
single
assertion
SHALL
be
present
within
setup
action
assert
element.
(xpath:
count(f:contentType)
+
count(f:headerField)
+
count(f:minimumId)
+
count(f:navigationLinks)
+
count(f:path)
+
count(f:resource)
+
count(f:responseCode)
+
count(f:response)
+
count(f:validateProfileId)
<=1)
inv-6
: Only a single assertion SHALL be present within setup action assert element. (
expression
: contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1, xpath: count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1)
|
|
TestScript.setup.action.assert.label
|
|
Definition
|
The
label
would
be
used
for
tracking/logging
purposes
by
test
engines.
The label would be used for tracking/logging purposes by test engines.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
This
has
no
impact
on
the
verification
itself.
This has no impact on the verification itself.
|
|
TestScript.setup.action.assert.description
|
|
Definition
|
The
description
would
be
used
by
test
engines
for
tracking
and
reporting
purposes.
The description would be used by test engines for tracking and reporting purposes.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
This
has
no
impact
on
the
verification
itself.
This has no impact on the verification itself.
|
|
TestScript.setup.action.assert.direction
|
|
Definition
|
The
direction
to
use
for
the
assertion.
The direction to use for the assertion.
|
|
Control
|
0..1
|
|
Binding
|
AssertionDirectionType:
The
type
of
direction
to
use
for
assertion.
(
AssertionDirectionType:
The type of direction to use for assertion.
(
Required
)
|
|
Type
|
code
|
|
TestScript.setup.action.assert.compareToSourceId
|
|
Definition
|
Id
of
fixture
used
to
compare
the
"sourceId/path"
evaluations
to.
Id of fixture used to compare the "sourceId/path" evaluations to.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
The
id
of
the
fixture
used
to
make
comparisons
to.
The id of the fixture used to make comparisons to.
|
|
TestScript.setup.action.assert.compareToSourcePath
|
|
Definition
|
XPath
or
JSONPath
expression
against
fixture
used
to
compare
the
"sourceId/path"
evaluations
to.
XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
The
XPath
or
JSONPath
expression
to
be
evaluated
against
the
expected
fixture
to
compare
to.
Ignored
if
"assert.value"
is
used.
The
evaluation
will
be
done
before
the
assertion
is
evaluated.
The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if "assert.value" is used. The evaluation will be done before the assertion is evaluated.
|
|
TestScript.setup.action.assert.contentType
|
|
Definition
|
The
content-type
or
mime-type
to
use
for
RESTful
operation
in
the
'Content-Type'
header.
The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.
|
|
Control
|
0..1
|
|
Binding
|
ContentType:
The
content
or
mime
type.
(
ContentType:
The content or mime type.
(
Required
)
|
|
Type
|
code
|
Meaning
if
Missing
Meaning if Missing
|
xml
|
|
Comments
|
If
this
is
specified,
then
test
engine
shall
confirm
that
the
content-type
of
the
last
operation's
headers
is
set
to
this
value.
If
"assert.sourceId"
element
is
specified,
then
the
evaluation
will
be
done
against
the
headers
mapped
to
that
sourceId
(and
not
the
last
operation's
headers).
If
'xml'
is
specified,
then
'Content-Type'
header
of
'application/xml+fhir'
will
be
confirmed.
If
'json'
is
specified,
then
'application/json+fhir'
will
be
used.
If
you'd
like
to
have
more
control
over
the
string,
then
use
'assert.headerField'
instead.
If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value. If "assert.sourceId" element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers). If 'xml' is specified, then 'Content-Type' header of 'application/fhir+xml' will be confirmed. If 'json' is specified, then 'application/fhir+json' will be used. If you'd like to have more control over the string, then use 'assert.headerField' instead.
|
|
TestScript.setup.action.assert.headerField
|
|
Definition
|
The
HTTP
header
field
name
e.g.
'Location'.
The HTTP header field name e.g. 'Location'.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
If
"headerField"
is
specified
then
"value"
must
be
specified.
If
"sourceId"
is
not
specified,
then
"headerField"
will
be
evaluated
against
the
last
operation's
response
headers.
Test
engines
are
to
keep
track
of
the
last
operation's
response
body
and
response
headers.
If "headerField" is specified then "value" must be specified. If "sourceId" is not specified, then "headerField" will be evaluated against the last operation's response headers. Test engines are to keep track of the last operation's response body and response headers.
|
|
TestScript.setup.action.assert.minimumId
|
|
Definition
|
The
ID
of
a
fixture.
Asserts
that
the
response
contains
at
a
minimumId
the
fixture
specified
by
minimumId.
The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
Asserts
that
the
response
contains
all
the
element/content
in
another
fixture
pointed
to
by
minimumId.
This
can
be
a
statically
defined
fixture
or
one
that
is
dynamically
set
via
responseId.
Asserts that the response contains all the element/content in another fixture pointed to by minimumId. This can be a statically defined fixture or one that is dynamically set via responseId.
|
|
TestScript.setup.action.assert.navigationLinks
|
|
Definition
|
Whether
or
not
the
test
execution
performs
validation
on
the
bundle
navigation
links.
Whether or not the test execution performs validation on the bundle navigation links.
|
|
Control
|
0..1
|
|
Type
|
boolean
|
|
Comments
|
Asserts
that
the
Bundle
contains
first,
last,
and
next
links.
Asserts that the Bundle contains first, last, and next links.
|
|
TestScript.setup.action.assert.operator
|
|
Definition
|
The
operator
type.
The operator type.
|
|
Control
|
0..1
|
|
Binding
|
AssertionOperatorType:
The
type
of
operator
to
use
for
assertion.
(
AssertionOperatorType:
The type of operator to use for assertion.
(
Required
)
|
|
Type
|
code
|
|
Comments
|
Operators
come
handy
especially
for
negative
testing.
If
operator
is
not
specified,
then
the
"equals"
operator
is
assumed;
e.g.
<code>
<assert>
<operator
value="in"
/>
<responseCode
value="200,201,204"
/>
</assert>
<assert>
<operator
value="notEquals"
/>
<response
value="okay"/>
</assert>
<assert>
<operator
value="greaterThan"
/>
<responseHeader>
<field
value="Content-Length"
/>
<value
value="0"
/>
<responseHeader>
</assert>
</code>.
Operators are useful especially for negative testing. If operator is not specified, then the "equals" operator is assumed; e.g. <code> <assert> <operator value="in" /> <responseCode value="200,201,204" /> </assert> <assert> <operator value="notEquals" /> <response value="okay"/> </assert> <assert> <operator value="greaterThan" /> <responseHeader> <field value="Content-Length" /> <value value="0" /> <responseHeader/> </assert> </code>.
|
|
TestScript.setup.action.assert.path
|
|
Definition
|
The
XPath
or
JSONPath
expression
to
be
evaluated
against
the
fixture
representing
the
response
received
from
server.
The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
If
both
"path"
and
"fixtureId"
are
specified,
then
the
path
will
be
evaluated
against
the
responseBody
mapped
to
the
fixtureId.
If
"path"
is
specified
and
"fixtureId"
is
not,
then
the
path
will
be
evaluated
against
the
responseBody
of
the
last
operation.
Test
engines
are
to
store
the
response
body
and
headers
of
the
last
operation
at
all
times
for
subsequent
assertions.
If both "path" and "fixtureId" are specified, then the path will be evaluated against the responseBody mapped to the fixtureId. If "path" is specified and "fixtureId" is not, then the path will be evaluated against the responseBody of the last operation. Test engines are to store the response body and headers of the last operation at all times for subsequent assertions.
|
|
TestScript.setup.action.assert.requestURL
|
|
Definition
|
The value to use in a comparison against the request URL path string.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
If "requestURL" is specified then it will be used in place of "value". The "requestURL" will evaluate against the last operation's full request URL path string.
|
|
TestScript.setup.action.assert.resource
|
|
Definition
|
The
type
of
the
resource.
See
http://hl7-fhir.github.io/resourcelist.html.
The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.
|
|
Control
|
0..1
|
|
Binding
|
FHIRDefinedType:
Any
defined
Resource
or
Data
Type
name
FHIRDefinedType:
Any defined Resource or Data Type name
|
|
Type
|
code
|
|
Comments
|
This
will
be
expected
resource
type
in
response
body
e.g.
in
read,
vread,
search,
etc.
See
http://hl7-fhir.github.io/resourcelist.html
for
complete
list
of
resource
types;
e.g.
<assert
>
<resourceType
value="Patient"
</assert>.
This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types; e.g. <assert > <resourceType value="Patient" </assert>.
|
|
TestScript.setup.action.assert.response
|
|
Definition
|
okay
|
created
|
noContent
|
notModified
|
bad
|
forbidden
|
notFound
|
methodNotAllowed
|
conflict
|
gone
|
preconditionFailed
|
unprocessable.
okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
|
|
Control
|
0..1
|
|
Binding
|
AssertionResponseTypes:
The
type
of
response
code
to
use
for
assertion.
(
AssertionResponseTypes:
The type of response code to use for assertion.
(
Required
)
|
|
Type
|
code
|
|
Comments
|
This
is
a
shorter
way
of
achieving
similar
verifications
via
"assert.responseCode".
If
you
need
more
control,
then
use
"assert.responseCode"
e.g.
<assert>
<contentType
value="json"
/>
<response
value="okay"/>
</assert>.
This is a shorter way of achieving similar verifications via "assert.responseCode". If you need more control, then use "assert.responseCode" e.g. <assert> <contentType value="json" /> <response value="okay"/> </assert>.
|
|
TestScript.setup.action.assert.responseCode
|
|
Definition
|
The
value
of
the
HTTP
response
code
to
be
tested.
The value of the HTTP response code to be tested.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
To
be
used
with
"operator"
attribute
value.
Asserts
that
the
response
code
equals
this
value
if
"operator"
is
not
specified.
If
the
operator
is
"in"
or
"notIn"
then
the
responseCode
would
be
a
comma-separated
list
of
values
e.g.
"200,201".
Otherwise,
it's
expected
to
be
a
numeric
value.
If
"fixture"
is
not
specified,
then
the
"responseBodyId"
value
of
the
last
operation
is
assumed.
To be used with "operator" attribute value. Asserts that the response code equals this value if "operator" is not specified. If the operator is "in" or "notIn" then the responseCode would be a comma-separated list of values e.g. "200,201". Otherwise, it's expected to be a numeric value. If "fixture" is not specified, then the "responseBodyId" value of the last operation is assumed.
|
TestScript.setup.action.assert.sourceId
TestScript.setup.action.assert.rule
|
|
Definition
|
Fixture
to
evaluate
the
XPath/JSONPath
expression
or
the
headerField
against.
The TestScript.rule this assert will evaluate.
|
|
Control
|
0..1
|
|
Comments
|
Each rule should get evaluated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.
|
|
TestScript.setup.action.assert.rule.ruleId
|
|
Definition
|
The TestScript.rule id value this assert will evaluate.
|
|
Control
|
1..1
|
|
Type
|
id
|
|
TestScript.setup.action.assert.rule.param
|
Comments
Definition
|
This
can
be
a
statically
defined
fixture
(at
the
top
of
the
testscript)
or
a
dynamically
set
fixture
created
by
responseId
of
the
action.operation
element.
Each rule template can take one or more parameters for rule evaluation.
|
|
Control
|
0..*
|
|
Comments
|
The parameter value can be dynamic at runtime.
|
TestScript.setup.action.assert.validateProfileId
TestScript.setup.action.assert.rule.param.name
|
|
Definition
|
The
ID
of
the
Profile
to
validate
against.
Descriptive name for this parameter that matches the external assert rule parameter name.
|
|
Control
|
0..1
1..1
|
|
Type
|
id
string
|
|
Comments
|
The
ID
of
a
Profile
fixture.
Asserts
that
the
response
is
valid
according
to
the
Profile
specified
by
validateProfileId.
The external rule template would be looking for the parameter by this name.
|
TestScript.setup.action.assert.value
TestScript.setup.action.assert.rule.param.value
|
|
Definition
|
The
value
to
compare
to.
The value for the parameter that will be passed on to the external rule template.
|
|
Control
|
0..1
1..1
|
|
Type
|
string
|
|
Comments
|
The
string-representation
of
a
number,
string,
or
boolean
that
is
expected.
Test
engines
do
have
to
look
for
placeholders
(${})
and
replace
the
variable
placeholders
with
the
variable
values
at
runtime
before
comparing
this
value
to
the
actual
value.
This value overwrites the value (if any) specified in TestScript.rule.param.value. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.
|
TestScript.setup.action.assert.warningOnly
TestScript.setup.action.assert.ruleset
|
|
Definition
|
Whether
or
not
the
test
execution
will
produce
a
warning
only
on
error
for
this
assert.
The TestScript.ruleset this assert will evaluate.
|
|
Control
|
0..1
|
|
Comments
|
Each rule within a ruleset should get evaluated by test engines as a separate assertion. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource. If the first rule within the ruleset results in a failed assertion, then test engines do not have to evaluate the rest of the rules within the ruleset.
|
|
TestScript.setup.action.assert.ruleset.rulesetId
|
|
Definition
|
The TestScript.ruleset id value this assert will evaluate.
|
|
Control
|
1..1
|
|
Type
|
boolean
id
|
|
TestScript.setup.action.assert.ruleset.rule
|
Default
Value
Definition
|
false
The referenced rule within the external ruleset template.
|
|
Control
|
0..*
|
|
Comments
|
If
this
element
is
specified
and
it
is
true,
then
assertion
failures
can
be
logged
by
test
engine
but
should
not
stop
the
test
script
execution
from
proceeding.
There
are
likely
cases
where
the
spec
is
not
clear
on
what
should
happen.
If
the
spec
says
something
is
optional
(maybe
a
response
header
for
example),
but
a
server
doesn’t
do
it,
we
could
choose
to
issue
a
warning.
This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset.
|
TestScript.test
TestScript.setup.action.assert.ruleset.rule.ruleId
|
|
Definition
|
A
test
in
this
script.
Id of the referenced rule within the external ruleset template.
|
|
Control
|
1..1
|
|
Type
|
id
|
|
TestScript.setup.action.assert.ruleset.rule.param
|
|
Definition
|
Each rule template can take one or more parameters for rule evaluation.
|
|
Control
|
0..*
|
|
Comments
|
The parameter value can be dynamic at runtime.
|
TestScript.test.name
TestScript.setup.action.assert.ruleset.rule.param.name
|
|
Definition
|
The
name
of
this
test
used
for
tracking/logging
purposes
by
test
engines.
Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
|
|
Control
|
1..1
|
|
Type
|
string
|
|
Comments
|
The external rule template would be looking for the parameter by this name.
|
|
TestScript.setup.action.assert.ruleset.rule.param.value
|
|
Definition
|
The value for the parameter that will be passed on to the external ruleset rule template.
|
|
Control
|
0..1
1..1
|
|
Type
|
string
|
|
Comments
|
This value overwrites the value (if any) specified in TestScript.ruleset.rule.param.value. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.
|
|
TestScript.setup.action.assert.sourceId
|
|
Definition
|
Fixture to evaluate the XPath/JSONPath expression or the headerField against.
|
|
Control
|
0..1
|
|
Type
|
id
|
|
Comments
|
This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.
|
TestScript.test.description
TestScript.setup.action.assert.validateProfileId
|
|
Definition
|
A
short
description
of
the
test
used
by
test
engines
for
tracking
and
reporting
purposes.
The ID of the Profile to validate against.
|
|
Control
|
0..1
|
|
Type
|
id
|
|
Comments
|
The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.
|
|
TestScript.setup.action.assert.value
|
|
Definition
|
The value to compare to.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
Comments
|
The string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.
|
TestScript.test.metadata
TestScript.setup.action.assert.warningOnly
|
|
Definition
|
Capabilities
that
must
exist
and
are
assumed
to
function
correctly
on
the
FHIR
server
being
tested.
Whether or not the test execution will produce a warning only on error for this assert.
|
|
Control
|
0..1
|
|
Type
|
See
TestScript.metadata
boolean
|
Invariants
Default Value
|
false
|
|
Comments
|
If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding. There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning.
|
Defined
on
this
element
TestScript.test
inv-7
:
Test
metadata
capability
SHALL
contain
required
or
validated
or
both.
(xpath:
f:capability/f:required
or
f:capability/f:validated
or
(f:capability/f:required
and
f:capability/f:validated))
|
|
Definition
|
A test in this script.
|
|
Control
|
0..*
|
|
TestScript.test.name
|
|
Definition
|
The name of this test used for tracking/logging purposes by test engines.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
TestScript.test.description
|
|
Definition
|
A short description of the test used by test engines for tracking and reporting purposes.
|
|
Control
|
0..1
|
|
Type
|
string
|
|
TestScript.test.action
|
|
Definition
|
Action
would
contain
either
an
operation
or
an
assertion.
Action would contain either an operation or an assertion.
|
|
Control
|
1..*
|
|
Comments
|
An
action
should
contain
either
an
operation
or
an
assertion
but
not
both.
It
can
contain
any
number
of
variables.
An action should contain either an operation or an assertion but not both. It can contain any number of variables.
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-2
:
Test
action
SHALL
contain
either
an
operation
or
assert
but
not
both.
(xpath:
(f:operation
or
f:assert)
and
not(f:operation
and
f:assert))
: Test action SHALL contain either an operation or assert but not both. (
expression
: operation.exists() xor assert.exists(), xpath: (f:operation or f:assert) and not(f:operation and f:assert))
|
|
TestScript.test.action.operation
|
|
Definition
|
An
operation
would
involve
a
REST
request
to
a
server.
An operation would involve a REST request to a server.
|
|
Control
|
0..1
|
|
Type
|
See
TestScript.setup.action.operation
See TestScript.setup.action.operation
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-11
:
Test
operation
SHALL
contain
either
sourceId
or
targetId
or
params
or
url.
(xpath:
f:sourceId
or
(f:targetId
or
f:url
or
f:params)
and
(count(f:targetId)
+
count(f:url)
+
count(f:params)
=1)
or
(f:type/f:code/@value='conformance'
or
f:type/f:code/@value='search'
or
f:type/f:code/@value='transaction'
or
f:type/f:code/@value='history'))
inv-9
: Test operation SHALL contain either sourceId or targetId or params or url. (
expression
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history')), xpath: f:sourceId or (f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history'))
|
|
TestScript.test.action.assert
|
|
Definition
|
Evaluates
the
results
of
previous
operations
to
determine
if
the
server
under
test
behaves
appropriately.
Evaluates the results of previous operations to determine if the server under test behaves appropriately.
|
|
Control
|
0..1
|
|
Type
|
See
TestScript.setup.action.assert
See TestScript.setup.action.assert
|
|
Comments
|
In
order
to
evaluate
an
assertion,
the
request,
response,
and
results
of
the
most
recently
executed
operation
must
always
be
maintained
by
the
test
engine.
In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-14
:
Test
action
assert
shall
contain
both
compareToSourceId
and
compareToSourcePath
or
neither.
(xpath:
(f:compareToSourceId
and
f:compareToSourcePath)
or
not(f:compareToSourceId
or
f:compareToSourcePath))
inv-12
: Test action assert shall contain both compareToSourceId and compareToSourcePath or neither. (
expression
: compareToSourceId.empty() xor compareToSourcePath.exists(), xpath: (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath))
inv-9
:
Only
a
single
assertion
SHALL
be
present
within
test
action
assert
element.
(xpath:
count(f:contentType)
+
count(f:headerField)
+
count(f:minimumId)
+
count(f:navigationLinks)
+
count(f:path)
+
count(f:resource)
+
count(f:responseCode)
+
count(f:response)
+
count(f:validateProfileId)
<=1)
inv-7
: Only a single assertion SHALL be present within test action assert element. (
expression
: contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1, xpath: count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1)
|
|
TestScript.teardown
|
|
Definition
|
A
series
of
operations
required
to
clean
up
after
the
all
the
tests
are
executed
(successfully
or
otherwise).
A series of operations required to clean up after the all the tests are executed (successfully or otherwise).
|
|
Control
|
0..1
|
|
TestScript.teardown.action
|
|
Definition
|
The
teardown
action
will
only
contain
an
operation.
The teardown action will only contain an operation.
|
|
Control
|
1..*
|
|
Comments
|
An
action
should
contain
either
an
operation
or
an
assertion
but
not
both.
It
can
contain
any
number
of
variables.
An action should contain either an operation or an assertion but not both. It can contain any number of variables.
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-3
:
Teardown
action
SHALL
contain
an
operation.
(xpath:
f:operation)
: Teardown action SHALL contain an operation. (
expression
: operation.exists(), xpath: f:operation)
|
|
TestScript.teardown.action.operation
|
|
Definition
|
An
operation
would
involve
a
REST
request
to
a
server.
An operation would involve a REST request to a server.
|
|
Control
|
0..1
|
|
Type
|
See
TestScript.setup.action.operation
See TestScript.setup.action.operation
|
|
Invariants
|
Defined
on
this
element
Defined on this element
inv-12
:
Teardown
operation
SHALL
contain
either
sourceId
or
targetId
or
params
or
url.
(xpath:
f:sourceId
or
(f:targetId
or
f:url
or
(f:params
and
f:resource))
and
(count(f:targetId)
+
count(f:url)
+
count(f:params)
=1)
or
(f:type/f:code/@value='conformance'
or
f:type/f:code/@value='search'
or
f:type/f:code/@value='transaction'
or
f:type/f:code/@value='history'))
inv-10
: Teardown operation SHALL contain either sourceId or targetId or params or url. (
expression
©
HL7.org
2011+.
FHIR
DSTU2
(v1.0.2-7202)
generated
on
Sat,
Oct
24,
2015
07:44+1100.
Links:
Search
: sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history')), xpath: f:sourceId or (f:targetId or f:url or (f:params and f:resource)) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history'))
|
|
Version
History
|
Table
of
Contents
|
Compare
to
DSTU1