FHIR Chat · TestScript - test scope · implementers

Stream: implementers

Topic: TestScript - test scope


view this post on Zulip Jose Costa Teixeira (Apr 27 2020 at 13:29):

How would we say "This TestScript covers Profile XX" ? Or "This TestScript covers Transaction YY"?

view this post on Zulip Jose Costa Teixeira (Apr 27 2020 at 13:31):

"Transaction" is just an example and can be any (other) FHIR resource.

view this post on Zulip Jose Costa Teixeira (Apr 27 2020 at 13:31):

any examples of associating TestScripts to the thing they are testing?

view this post on Zulip Jose Costa Teixeira (Apr 27 2020 at 13:32):

TestScript.metadata.capability.capabilities is:

  1. only 1..1
  2. only CapabilityStatement

view this post on Zulip Lloyd McKenzie (Apr 27 2020 at 15:02):

@Richard Ettema

view this post on Zulip Jose Costa Teixeira (Apr 30 2020 at 17:58):

.. @Richard Ettema or anyone?

view this post on Zulip ryan moehrke (Apr 30 2020 at 18:35):

I believe the CapabilityStatement linked in TestScript is expected to have the relevant operations and resources defined as supported and then having TestScript.metadata.capability.validated set to true would imply what you are asking for but I'm not completely sure

view this post on Zulip Jose Costa Teixeira (Apr 30 2020 at 18:45):

that could work, but would force me to make one CapStatement for each thing i want to test (at least), right?

view this post on Zulip John Moehrke (May 01 2020 at 15:51):

isn't that what TestScript.profile is for?

view this post on Zulip John Moehrke (May 01 2020 at 16:01):

another perspective... shouldn't the IG point at the TestScripts? Not the TestScripts pointing at the IG? so, your use-case is walking through the IG for test scripts.

view this post on Zulip Jose Costa Teixeira (May 01 2020 at 16:37):

John Moehrke said:

isn't that what TestScript.profile is for?

Yes, if all we want to test is profiles

view this post on Zulip Jose Costa Teixeira (May 01 2020 at 16:37):

I created J#27007

view this post on Zulip Jose Costa Teixeira (May 01 2020 at 16:41):

My idea is to have the IG point at the test scripts for the artifacts contained in that IG

view this post on Zulip Jose Costa Teixeira (May 01 2020 at 16:41):

but I can have a couple of other scripts outside the IG

view this post on Zulip John Moehrke (May 01 2020 at 17:06):

Jose Costa Teixeira said:

John Moehrke said:

isn't that what TestScript.profile is for?

Yes, if all we want to test is profiles

.profile can point at ANY resource type, not just structureDefinition

view this post on Zulip Jose Costa Teixeira (May 01 2020 at 17:22):

Oops, true.

view this post on Zulip Jose Costa Teixeira (May 01 2020 at 17:22):

The name fooled me

view this post on Zulip Jose Costa Teixeira (May 01 2020 at 17:23):

It doesn't support version, but at least it's a start

view this post on Zulip Jose Costa Teixeira (May 01 2020 at 17:23):

thanks

view this post on Zulip Jose Costa Teixeira (May 27 2020 at 18:59):

I've created a ticket to check whether this is correct - that the TestScript.profile is "the thing that this TestScript intends to cover". The description could be improved and the name is misleading.

view this post on Zulip Jose Costa Teixeira (May 27 2020 at 19:01):

I'd prefer a different name, because we could test other things than profiles -
We need CapStatement, StructureDefs (extensions and profiles) and PlanDefinitions

view this post on Zulip Jose Costa Teixeira (May 27 2020 at 19:01):

@Richard Ettema ?

view this post on Zulip Jose Costa Teixeira (May 27 2020 at 19:02):

J#27533

view this post on Zulip ryan moehrke (May 27 2020 at 19:36):

In Touchstone (and I believe as intended) TestScript.profile is used to declare an Id Alias for assert.validateProfileId not to show what the testscript is intended to cover. If you find TestScript.metadata to be lacking, sounds like that's where you should propose a change, no?

view this post on Zulip Grahame Grieve (May 28 2020 at 03:45):

what's this got to do with metadata?

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 05:07):

So this is even less clear than I thought. @John Moehrke suggested looking at .profile - which I wouldn't guess by the name or by the description. Now @ryan moehrke are you suggesting TestScript.metadata? Also the name or description of are not very revealing...

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 05:10):

metadata is "Capabilities that are assumed to function correctly on the FHIR server being tested" -

  1. I don't want assumed capabilities, I want Capabilities under test.
  2. I'm not intending to test only FHIR servers

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 05:12):

what I'm lookin for is the system under test or capability under test

view this post on Zulip ryan moehrke (May 28 2020 at 12:39):

ryan moehrke said:

I believe the CapabilityStatement linked in TestScript is expected to have the relevant operations and resources defined as supported and then having TestScript.metadata.capability.validated set to true would imply what you are asking for but I'm not completely sure

I already suggested looking under TestScript.metadata (which is distinct from TestScript.meta and I get that's confusing I'm in no way saying it shouldn't be renamed for clarity) but It's my understanding that "metadata" is the element that should be covering your needs.
TestScript.metadata.capability.validated: Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
It might not capture exactly how you want to use it. But this reads in the spirit of what you want. I would suggest renaming/expanding TestScript.metadata to cover your needs instead of making a new element that borders on duplication.

view this post on Zulip Jason Walonoski (May 28 2020 at 13:03):

As I have the dubious distinction of being one of the original designers of the TestScript, I can tell you that metadata was supposed to be both the required capabilities and the capabilities under test.

The required capabilities should be marked with TestScript.metadata.capability.required = true

The capabilities under test should be marked with TestScript.metadata.capability.validated = true

It is possible that a capability can be required but not validated, or required and validated, but it doesn't make a lot of sense for it to be not required or validated.

Hope that helps.

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:28):

  1. what is the difference between validated and required?

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:28):

  1. "metadata" - can we find a better name?

view this post on Zulip ryan moehrke (May 28 2020 at 14:33):

validated is what capabilities are under test
required is what capabilities are needed for the test to run correctly (i.e. you need to Patient Create to load test resources etc.)

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:34):

thanks.

  1. "validated" - can we find a better name?

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:34):

:)

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:35):

  1. metadata.link.url: why is that not a Reference?

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:36):

sorry, I meant metadata.capability.link.

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:37):

  1. what is the difference between metadata.link and metadata.capability.url?

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:38):

(sorry for all these questions, but reading the spec it clearly seemed that these elements were something else)

view this post on Zulip Jose Costa Teixeira (May 28 2020 at 14:39):

  1. in metadata and metadata.capability we read "capability/ies that is/are assumed to function correctly on the FHIR server being tested"
    Can we change that description? If they are "validated" this means they are not assumed to function correctly, right?

view this post on Zulip Jason Walonoski (May 28 2020 at 21:32):

@Jose Costa Teixeira I'm not really involved in maintaining TestScript any longer and haven't been for several years. But regarding question #1, @ryan moehrke is correct. Regarding better names or descriptions, probably, but I'm not particularly vested in the outcomes. Any of the link fields are URIs and not References, because they are literally meant to be hyperlinks to sections of the FHIR specification. (e.g. this link http://hl7.org/fhir/R4/http.html#vsearch to a paragraph about variant searches).

view this post on Zulip Jose Costa Teixeira (May 29 2020 at 04:41):

I understand the reason to test the FHIR spec itself, but we should be able to test the systems and profiles.

view this post on Zulip Jose Costa Teixeira (May 29 2020 at 04:41):

In which calls is the TestScript resource discussed?

view this post on Zulip Jose Costa Teixeira (May 29 2020 at 04:42):

I would like to open the few topics aove but I would like to learn more about the current design.

view this post on Zulip Jason Walonoski (May 29 2020 at 12:28):

I'm not certain about the current design, because it evolved after I was involved. The link can be anything, which is why it is a uri -- you can point to a profile or IG. Actually, the TestScript.profile is meant to specify a profile to validate returned resources against. Use metadata.link to point to any references (and I use that term generically, as in citation) that you want, and use metadata.capability to point to capability statements that go along with IGs.

view this post on Zulip Jason Walonoski (May 29 2020 at 12:29):

TestScript is also only FMM2, so it has a way to go.

view this post on Zulip Jason Walonoski (May 29 2020 at 12:30):

Regarding "which calls" -- FHIR Infrastructure. Each resource page tells you which work group owns it.

view this post on Zulip Richard Ettema (May 30 2020 at 01:48):

@Jose Costa Teixeira,

Apologies for the lengthy response but I'm trying to catch up and cover a lot of ground. Hope this help...

I understand the reason to test the FHIR spec itself, but we should be able to test the systems and profiles.

The TestScript resource type is not designed to "test the FHIR spec itself". The purpose of TestScript is to test the implemented systems and profiles.

TestScript is "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification." see http://hl7.org/fhir/testscript.html#7.3

TestScript(s) are executed by a FHIR Test Engine as defined by the FHIR spec. see http://hl7.org/fhir/testing.html#execution

TestScript.metadata

Agreed. The name is can be confused with Resource.meta and needs to be re-examined as to its usefulness.

The reality is that, based on our experience with authoring and executing TestScripts against many different testing scenarios, the TestScript.metadata is something we just don't use. We have found that the rest of the TestScript elements provide this information; fixtures (test data), profiles (StructureDefinitions from the base spec to IGs), operations (FHIR interactions that also define the Resource Types) and so on. We parse all of this information within the TestScript to provide appropriate mappings to and recording of this information against the test execution results. This information is then collected, collated and made available for analytics and reporting back to the user.

I've created a ticket to check whether this is correct - that the TestScript.profile is "the thing that this TestScript intends to cover". The description could be improved and the name is misleading.

Based on the previous point and my response, I would have to say the the TestScript.profile does indicate what the TestScript intends to cover in so much as FHIR profiles are concerned.

The TestScript.profile element, as Ryan has described, is used to declare an Id Alias for assert.validateProfileId. This profile id then refers to the canonical url (identifier) of the FHIR Profile so that it can be used in an assert that calls the FHIR validation engine to evaluate/validate the resource payload of an operation request or response against that FHIR Profile.

what I'm lookin for is the system under test or capability under test

Our implementation of the FHIR Test Engine provides an interface for pre-test setup where the destination or target System Under Test (FHIR Server) is selected. The FHIR Test Engine in this case then acts as the client constructing and sending the defined FHIR operation(s) in the TestScript(s). This follows the FHIR spec for testing as defined under the "Operation Execution" - see http://hl7.org/fhir/testing.html#op.

A TestScript can also explicitly define what actors, FHIR Client(s) and Server(s), are needed through the declaration of the TestScript.origin and TestScript.destination elements. When present, the FHIR Test Engine then needs to accept as input the actual System(s) Under Test that match these declarations.

Our testing platform provides our users the ability to register their systems, FHIR Client(s) and Server(s). These registered systems are then made available for selection against the declared TestScript actors. This also provides us with the ability to get and cache a system's CapabilityStatement. We then use the system's CapabilityStatement in our test result reporting where we can let the user filter their results to either include all results or exclude results that do not correspond to the system's declared capabilities.

view this post on Zulip Jose Costa Teixeira (May 30 2020 at 04:16):

Thanks @Richard Ettema for this comprehensive response. Just to see if you agree and if I understand correctly:

  1. TestScript.metadata should be renamed to be less likely to confuse with .meta.
  2. The place to indicate "system under test" IS TestScript.profile, at least for profiles. This should be clear
  3. What about CapabilityStatements, Operations, PlanDefinitions? I suggest renaming or restructuring TestScript.profile
  4. TestScript.profile declares an alias for assert.ProfileId. - I don't understand the implications of this, but then it may be an alias to something else, not only a profile, right?

view this post on Zulip Jose Costa Teixeira (May 30 2020 at 04:21):

I am looking at test design, more than test execution, so I am not looking at .
Concretely, what we want: with every specification that we make (a StructureDefinition, a PlanDefinition...) we want to provide a set of TestScripts to say "This is the PlanDefinition, and this is how you test it".
For this, the TestScripts should have a link to the specification that is going to be tested - not the system, because we are not fixing it to one system yet. We are just saying "whatever system you implement this on, these are the test scripts to see if it was well implemented".

view this post on Zulip Jose Costa Teixeira (May 30 2020 at 04:26):

With this, I suggest to follow that ticket I created and perhaps do something like :

  1. Rename .profile to .conformanceArtifact or .featureForTesting or any other name to say what we mean.
  2. If we want to separate between operations, plandefinitions, capabilityStatements etc, we could make this element more complex, but I believe a Reference(Any) Is good
  3. Fix "metadata"
  4. Work on documenting all of this

view this post on Zulip Jose Costa Teixeira (Jun 01 2020 at 20:50):

Can we rename TestScript.profile to TestScript.scope? I think it is clearer and I cannot think of a concise name (english-speakers: help appreciated)

view this post on Zulip Jose Costa Teixeira (Jun 01 2020 at 20:53):

As for the text, I'd use this:

"short" : "The conformance artifact(s) that this test script is meant to cover",
"definition" : "The artifacts that the TestScript is intended to cover - i.e. the features under test for this TestScript. Can be a conformance artifact like StructureDefinition (in which case the TestScript can support testing the implementation of the StructureDefinition in a given system) or a definitional artifact like PlanDefinition ( in which case the TestScripts supports testing the execution of a plan definition).",

view this post on Zulip Jose Costa Teixeira (Jun 01 2020 at 20:58):

For types of resources, I'd leave as Reference(Any). I'm looking at these resources:

  • StructureDefinition
  • OperationDefinition
  • CapabilityStatement
  • ImplementationGuide
  • SearchParameter
  • CompartmentDefinition
  • ElementDefinition
  • PlanDefinition
  • MeasureDefinition
    Someone else may want other resources, so I would not constrain here. We can add a valueset for resource type but I don't see the gain

view this post on Zulip Jose Costa Teixeira (Jun 01 2020 at 20:59):

(I will give my input to J#27533 with the above or any comment in this thread)

view this post on Zulip Richard Ettema (Jun 02 2020 at 13:37):

TestScript.profile is used to specifically define a FHIR Profile, StructureDefinition's canonical url, for use in asserts that call the FHIR validation engine. Changing the name and definition to something else breaks the current use.

Instead, I would be in favor of proposing TestScript.scope as a new element as described above.

view this post on Zulip Jose Costa Teixeira (Jun 02 2020 at 20:04):

Added to ticket

view this post on Zulip Jose Costa Teixeira (Jun 02 2020 at 20:06):

I'm also wondering - don't we have test types/categories?
For the same conformance artefact, one TestScript could be classified as "smoke"/"basic" the other one as "official", the other as "full"

view this post on Zulip Vassil Peytchev (Jun 03 2020 at 17:34):

Richard Ettema said:

TestScript.profile is used to specifically define a FHIR Profile, StructureDefinition's canonical url, for use in asserts that call the FHIR validation engine.

I am glad that is clarified. The Jira issue got an initial look last Monday, but those of us present did not know if indeed this was the intended use.

view this post on Zulip Richard Ettema (Jun 03 2020 at 19:45):

@Jose Costa Teixeira regarding

I'm also wondering - don't we have test types/categories?

TestScript follows the conformance related resource types with its initial set of elements. What you suggest could potentially be defined in some of those elements, like:

  • TestScript.status - the current codes could be expanded
  • TestScript.experimental - boolean so somewhat limited and specific
  • TestScript.useContext - this is the most likely existing element that may provide this type of definition

Although, I do like the introduction of

  • TestScript.type - code from potential following values: "smoke", "official", "basic", "full", etc.

Just some thoughts...

view this post on Zulip Jose Costa Teixeira (Jun 03 2020 at 19:47):

status is about the status of the test script itself, so I don't see how it could be used for "this is smoke test" vs "this is regulatory testing"

view this post on Zulip Jose Costa Teixeira (Jun 03 2020 at 19:47):

same as experimental

view this post on Zulip Jose Costa Teixeira (Jun 03 2020 at 19:49):

usageContext says "Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care)."
could work, but in that case would be interesting to enlarge the scope a bit (not only population and context of care)

view this post on Zulip Richard Ettema (Jun 03 2020 at 19:50):

Agreed. That's why I said useContext is the most likely existing element. I think TestScript.type is the better approach.


Last updated: Apr 12 2022 at 19:14 UTC