Serenity BDD Report
Home > Requirements > Stufe5 > Basis > Testing search parameters against a resource of type codesystem (@codesystem-search)
Report generated 01-09-2026 07:16

Feature: Testing search parameters against a resource of type codesystem (@codesystem-search)

Scenarios

Given the Test Description: "The system under test MUST find a previously created resource when searched using the parameter and return it in the search results (SEARCH)."

Given the Preconditions: - The CodeSystem-Read test case must have been executed successfully beforehand.

When Get FHIR resource at "http://fhirserver/metadata" with content type "json"

And CapabilityStatement contains interaction "search-type" for resource "Account"

And CapabilityStatement contains definition of search parameter "{searchParamValue}" of type "{searchParamType}" for resource "CodeSystem"

Examples:

searchParamValuesearchParamType
_idtoken
_countnumber
urluri

Examples:

searchParamValuesearchParamType
_tagtoken

When Get FHIR resource at "http://fhirserver/CodeSystem/?_id=${data.codesystem-read-id}" with content type "xml"

And FHIR current response body is a valid CORE resource and conforms to profile "https://hl7.org/fhir/StructureDefinition/Bundle"

And response bundle contains resource with ID "${data.codesystem-read-id}" with error message "The requested CodeSystem ${data.codesystem-read-id} is not contained in the response bundle."

When Get FHIR resource at "http://fhirserver/CodeSystem/?_tag=${data.tag-system}%7C${data.tag-value}&_id=${data.codesystem-read-id}" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(meta.tag.where(code='${data.tag-value}').exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/CodeSystem/?_count=1" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0 and entry.resource.count() {= 1' with error message 'The _count parameter was not applied as expected'

When Get FHIR resource at "http://fhirserver/CodeSystem/?url=http%3A%2F%2Fexample.org%2Ffhir%2FCodeSystem%2FTestKatalog" with content type "xml"

And FHIR current response body evaluates the FHIRPath "entry.resource.count() } 0" with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.where(url = 'http://example.org/fhir/CodeSystem/TestKatalog').exists()" with error message 'There are search results, but they do not fully match the search criteria..'

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 7 Total Duration 8m 9s
Total Number of Test Cases 10 Fastest Test 459ms
Number of Manual Test Cases 0 Slowest Test 4m 24s
Tests Started Sep 01, 2026 07:16:53 Average Execution Time 48s
Tests Finished Sep 01, 2026 07:25:02 Cumulative Test Time
(sum of all individual test durations)
8m 3s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against a resource of type CodeSystem (@CodeSystem-Search) Precondition 2 07:16:53 459ms SUCCESS
Testing search parameters against a resource of type CodeSystem (@CodeSystem-Search) Read and Validation of the CapabilityStatement 2 07:16:53 4m 24s SUCCESS
Testing search parameters against a resource of type CodeSystem (@CodeSystem-Search) Validation of the search parameter definitions in the CapabilityStatement
4 passing test cases
1 07:21:18 1m 28s SUCCESS
Testing search parameters against a resource of type CodeSystem (@CodeSystem-Search) Search for the CodeSystem by ID 3 07:22:49 36s 183ms SUCCESS
Testing search parameters against a resource of type CodeSystem (@CodeSystem-Search) Optional Search for the CodeSystem by Tag and ID 3 07:23:25 24s 775ms SUCCESS
Testing search parameters against a resource of type CodeSystem (@CodeSystem-Search) Search for the CodeSystem by Count 2 07:23:53 30s 603ms SUCCESS
Testing search parameters against a resource of type CodeSystem (@CodeSystem-Search) Search for the CodeSystem by URL 3 07:24:23 38s 823ms SUCCESS

Manual Tests

No manual tests were recorded

Evidence

Scenario Title Details
Precondition RBellog 0  Download Evidence
Read and Validation of the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Account' and interaction.where(code = 'search-type').exists()).exists()  Details
Read and Validation of the CapabilityStatement RBellog 0  Download Evidence
Read and Validation of the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'CodeSystem' and searchParam.where(name = '_id' and type = 'token').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 1  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'CodeSystem' and searchParam.where(name = '_count' and type = 'number').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 2  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'CodeSystem' and searchParam.where(name = 'url' and type = 'uri').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 3  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'CodeSystem' and searchParam.where(name = '_tag' and type = 'token').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 4  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Search for the CodeSystem by ID WARN - Rule csd-0: 'Name should be usable as an identifier for the module by machine processing applications such as code generation' Failed  Details
Search for the CodeSystem by ID INFO - CodeSystems SHOULD have a stated value for the caseSensitive element so that users know the status and meaning of the code system clearly  Details
Search for the CodeSystem by ID WARN - Profile reference 'https://gematik.de/fhir/isik/StructureDefinition/ISiKCodeSystem' has not been checked because it is unknown  Details
Search for the CodeSystem by ID WARN - Resource meta.profile differs from the passed profile for validation: meta.profile=[]; passed=https://hl7.org/fhir/StructureDefinition/Bundle  Details
Search for the CodeSystem by ID INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bCodeSystem-Read-Example$')).count() = 1  Details
Search for the CodeSystem by ID RBellog 0  Download Evidence
Search for the CodeSystem by ID Evidence Report  Download Evidence
Optional Search for the CodeSystem by Tag and ID INFO - entry.resource.count() > 0  Details
Optional Search for the CodeSystem by Tag and ID INFO - entry.resource.all(meta.tag.where(code='external').exists())  Details
Optional Search for the CodeSystem by Tag and ID RBellog 0  Download Evidence
Optional Search for the CodeSystem by Tag and ID Evidence Report  Download Evidence
Search for the CodeSystem by Count INFO - entry.resource.count() > 0 and entry.resource.count() <= 1  Details
Search for the CodeSystem by Count RBellog 0  Download Evidence
Search for the CodeSystem by Count Evidence Report  Download Evidence
Search for the CodeSystem by URL INFO - entry.resource.count() > 0  Details
Search for the CodeSystem by URL INFO - entry.resource.where(url = 'http://example.org/fhir/CodeSystem/TestKatalog').exists()  Details
Search for the CodeSystem by URL RBellog 0  Download Evidence
Search for the CodeSystem by URL Evidence Report  Download Evidence
Serenity BDD version 5.3.10