description: A standard format for test cases used throughout the FHIR ecosystem package_name: hl7.fhir.uv.tools derivation: specialization name: TestCases type: http://hl7.org/fhir/tools/StructureDefinition/TestCases elements: description: {isModifier: false, short: General Description of these tests, type: markdown, isSummary: true, index: 3} dependency: type: Base short: Test cases that must be passed before these test cases are meaningful to execute array: true index: 7 elements: reference: {type: canonical, short: The Test Cases, index: 8} description: {type: string, short: Description of what the dependency exists / why it was defined, index: 9} required: [reference] name: {isModifier: false, short: Name for these tests, type: string, isSummary: true, index: 2} mode: type: Base short: A mode that can be passed to runner - affects test content array: true index: 11 elements: code: {type: string, short: The code that identifies the mode, index: 12} description: {type: string, short: Description of what this mode exists / why it was defined, index: 13} required: [code] scope: type: Base short: The scope - what these test cases are testing array: true index: 4 elements: reference: {type: canonical, short: A reference to what is being tested, index: 5} description: {type: string, short: Description of what the scope is exists / what is being tested, index: 6} url: constraint: cnl-1: {human: 'URL should not contain | or # - these characters make processing canonical references problematic', severity: warning, expression: 'exists() implies matches(''^[^|# ]+$'')'} isModifier: false short: Canonical identifier for these tests, represented as a URI (globally unique) type: uri isSummary: true index: 0 suite: type: Base short: A suite of tests that share a common set up array: true index: 28 elements: description: {type: string, short: Description of what this suite does / why it was defined, index: 30} name: {type: string, short: The name of this suite - unique in the TestCases resource, index: 29} mode: {type: code, short: mode required to run this suite, meaningWhenMissing: 'If no modes are listed, the suite is always executed', index: 31} casesReference: short: A nested set of test cases refers: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases'] type: Reference array: true choiceOf: cases index: 55 casesCanonical: {type: canonical, short: A nested set of test cases, choiceOf: cases, array: true, index: 56} suite: short: A nested suite of tests elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases', elements, org/fhir/tools/StructureDefinition/TestCases#TestCases, elements, suite] array: true index: 52 cases: short: A nested set of test cases choices: [casesReference, casesCanonical] array: true index: 54 parameter: short: Parameter passed to the runner elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases', elements, org/fhir/tools/StructureDefinition/TestCases#TestCases, elements, parameter] array: true index: 37 test: type: Base short: A test in the test suite array: true index: 38 elements: name: {type: string, short: The name of this test - unique in the suite, index: 39} description: {type: string, short: Description of what this test does / why it was defined, index: 40} operation: {type: code, short: Operation that is executed during this test (per definition of runner), index: 41} mode: {type: string, short: mode required to run this test, meaningWhenMissing: 'If no modes are listed, the test is always executed', index: 42} parameter: elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases', elements, org/fhir/tools/StructureDefinition/TestCases#TestCases, elements, parameter] array: true index: 43 input: short: Resources used when executing this test (per runner definition) elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases', elements, org/fhir/tools/StructureDefinition/TestCases#TestCases, elements, suite, elements, data] array: true index: 44 output: short: Resources expected as output from this test (per runner definition, often Matchetypes) elementReference: ['http://hl7.org/fhir/tools/StructureDefinition/TestCases', elements, org/fhir/tools/StructureDefinition/TestCases#TestCases, elements, suite, elements, data] array: true index: 45 assertion: type: Base short: Assertions that can be executed against the output of the tests array: true index: 46 elements: focus: {type: string, short: 'Which output the assertion is tested on (by name, if there is more than one)', index: 47} severity: type: code short: Error | Warning | Information; only errors are considered to cause a test to fail binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/issue-severity|5.0.0'} index: 48 expression: {type: Expression, short: Technical Expression of the assertion, index: 49} human: {type: string, short: Human readable description of the assertion, index: 50} mode: {type: code, short: A mode that must be true for this assertion to apply, meaningWhenMissing: 'If no modes are listed, the assertion is always used, unless there is another assertion with the same name that is selected by mode', index: 51} required: [name] data: type: Base short: Resources used in the tests in this suite constraint: ts-2: {human: 'Either a file, or a resource, but not both', severity: error, expression: file xor resource} array: true index: 32 elements: name: {type: string, short: A name for this resource (per runner definition), index: 33} file: {type: string, short: A file containing a resource used in the tests, index: 34} resource: {type: Resource, short: An inline resource used in the tests, index: 35} mode: {type: code, short: A mode that must be true for this resource to be used, meaningWhenMissing: 'If no modes are listed, the resource is always used, unless there is another entry with the same name that is selected by mode', index: 36} required: [name] runner: {type: url, short: URL Documentation for a runner that executes these tests, index: 10} version: {isModifier: false, short: Business version of the test set (semver), type: string, isSummary: true, index: 1} parameter: type: Base short: Parameter passed to the runner array: true index: 14 elements: valueUri: {type: uri, short: Value of this parameter, choiceOf: value, index: 23} valueDecimal: {type: decimal, short: Value of this parameter, choiceOf: value, index: 21} name: {type: string, short: Name of parameter, index: 15} valueQuantity: {type: Quantity, short: Value of this parameter, choiceOf: value, index: 25} value: short: Value of this parameter choices: [valueString, valueBoolean, valueInteger, valueDecimal, valueDateTime, valueUri, valueCoding, valueQuantity, valueExpression] index: 17 valueString: {type: string, short: Value of this parameter, choiceOf: value, index: 18} mode: {type: code, short: A mode that must be true for this parameter to be used, meaningWhenMissing: 'If no modes are listed, the parameter is always used, unless there is a parameter with the same name that is selected by mode', index: 27} valueBoolean: {type: boolean, short: Value of this parameter, choiceOf: value, index: 19} valueDateTime: {type: dateTime, short: Value of this parameter, choiceOf: value, index: 22} valueCoding: {type: Coding, short: Value of this parameter, choiceOf: value, index: 24} valueExpression: {type: Expression, short: Value of this parameter, choiceOf: value, index: 26} valueInteger: {type: integer, short: Value of this parameter, choiceOf: value, index: 20} required: [name, value, valueBoolean, valueCoding, valueDateTime, valueDecimal, valueExpression, valueInteger, valueQuantity, valueString, valueUri] package_version: 0.6.0 class: logical kind: logical url: http://hl7.org/fhir/tools/StructureDefinition/TestCases base: http://hl7.org/fhir/StructureDefinition/Resource version: 0.6.0 required: [runner]