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

Feature: Testing search parameters against a resource of type account (@account-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 Account-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 "Account"

Examples:

searchParamValuesearchParamType
_idtoken
_countnumber
identifiertoken
statustoken
typetoken
patientreference

Examples:

searchParamValuesearchParamType
_tagtoken

When Get FHIR resource at "http://fhirserver/Account/?_id=${data.account-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.account-read-id}" with error message "The requested Account ${data.account-read-id} is not contained in the response bundle."

When Get FHIR resource at "http://fhirserver/Account/?_id=${data.account-read-id}&_tag=${data.tag-system}%7C${data.tag-value}" 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/Account/?_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'

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

When Get FHIR resource at "http://fhirserver/Account/?patient=Patient/${data.account-read-patient-id}&identifier=${data.account-read-identifier-system}%7C${data.account-read-identifier-value}" 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(identifier.where(value = '${data.account-read-identifier-value}' and system = '${data.account-read-identifier-system}').exists())" with error message 'There are search results, but they do not fully match the search criteria'

And element "subject" in all bundle resources references resource with ID "${data.account-read-patient-id}" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Account/?_id=${data.account-read-id}&patient=Patient/${data.account-read-patient-id}&status=active" with content type "json"

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(status = 'active').exists()" with error message 'There are search results, but they do not fully match the search criteria'

And element "subject" in all bundle resources references resource with ID "${data.account-read-patient-id}" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Account/?_id=${data.account-read-id}&patient=Patient/${data.account-read-patient-id}&type=IMP" with content type "json"

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(type.coding.where(code='IMP').exists())" with error message 'There are search results, but they do not fully match the search criteria'

And element "subject" in all bundle resources references resource with ID "${data.account-read-patient-id}" 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 9 Total Duration 15s
Total Number of Test Cases 15 Fastest Test 282ms
Number of Manual Test Cases 0 Slowest Test 5s
Tests Started Sep 01, 2026 06:59:09 Average Execution Time 1s
Tests Finished Sep 01, 2026 06:59:24 Cumulative Test Time
(sum of all individual test durations)
15s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against a resource of type Account (@Account-Search) Precondition 2 06:59:09 420ms SUCCESS
Testing search parameters against a resource of type Account (@Account-Search) Read and Validation of the CapabilityStatement 2 06:59:10 2s 714ms SUCCESS
Testing search parameters against a resource of type Account (@Account-Search) Validation of the search parameter definitions in the CapabilityStatement
7 passing test cases
1 06:59:12 7s 140ms SUCCESS
Testing search parameters against a resource of type Account (@Account-Search) Search for the Account by ID 3 06:59:19 797ms SUCCESS
Testing search parameters against a resource of type Account (@Account-Search) Optional Search for the Account by Tag and ID 3 06:59:20 725ms SUCCESS
Testing search parameters against a resource of type Account (@Account-Search) Search for the Account by Count 3 06:59:21 711ms SUCCESS
Testing search parameters against a resource of type Account (@Account-Search) Search for the Account by Patient and Identifier 4 06:59:22 926ms SUCCESS
Testing search parameters against a resource of type Account (@Account-Search) Search for the Account by Status, Patient and ID 4 06:59:23 911ms SUCCESS
Testing search parameters against a resource of type Account (@Account-Search) Search for the Account by Type, Patient and ID 4 06:59:23 933ms 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 = 'Account' 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 = 'Account' 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 = 'Account' and searchParam.where(name = 'identifier' and type = 'token').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 = 'Account' and searchParam.where(name = 'status' 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
Validation of the search parameter definitions in the CapabilityStatement INFO - rest.where(mode = 'server').resource.where(type = 'Account' and searchParam.where(name = 'type' and type = 'token').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 5  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 = 'Account' and searchParam.where(name = 'patient' and type = 'reference').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 6  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 = 'Account' and searchParam.where(name = '_tag' and type = 'token').exists()).exists()  Details
Validation of the search parameter definitions in the CapabilityStatement RBellog 7  Download Evidence
Validation of the search parameter definitions in the CapabilityStatement Evidence Report  Download Evidence
Search for the Account by ID INFO - Unknown extension http://fhir.de/StructureDefinition/ExtensionAbrechnungsart  Details
Search for the Account by ID WARN - Profile reference 'https://gematik.de/fhir/isik/StructureDefinition/ISiKAbrechnungsfall' has not been checked because it is unknown  Details
Search for the Account 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 Account by ID INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bAccount-Read-Example$')).count() = 1  Details
Search for the Account by ID RBellog 0  Download Evidence
Search for the Account by ID Evidence Report  Download Evidence
Optional Search for the Account by Tag and ID INFO - entry.resource.count() > 0  Details
Optional Search for the Account by Tag and ID INFO - entry.resource.all(meta.tag.where(code='external').exists())  Details
Optional Search for the Account by Tag and ID RBellog 0  Download Evidence
Optional Search for the Account by Tag and ID Evidence Report  Download Evidence
Search for the Account by Count INFO - entry.resource.count() > 0 and entry.resource.count() <= 1  Details
Search for the Account by Count INFO - entry.resource.all(identifier.where(value = '0123456789' and system = 'https://test.krankenhaus.de/fhir/sid/abrechnungsnummer').exists())  Details
Search for the Account by Count RBellog 0  Download Evidence
Search for the Account by Count Evidence Report  Download Evidence
Search for the Account by Patient and Identifier INFO - entry.resource.count() > 0  Details
Search for the Account by Patient and Identifier INFO - entry.resource.all(identifier.where(value = '0123456789' and system = 'https://test.krankenhaus.de/fhir/sid/abrechnungsnummer').exists())  Details
Search for the Account by Patient and Identifier INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bAccount-Read-Patient-Example$'))  Details
Search for the Account by Patient and Identifier RBellog 0  Download Evidence
Search for the Account by Patient and Identifier Evidence Report  Download Evidence
Search for the Account by Status, Patient and ID INFO - entry.resource.count() > 0  Details
Search for the Account by Status, Patient and ID INFO - entry.resource.where(status = 'active').exists()  Details
Search for the Account by Status, Patient and ID INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bAccount-Read-Patient-Example$'))  Details
Search for the Account by Status, Patient and ID RBellog 0  Download Evidence
Search for the Account by Status, Patient and ID Evidence Report  Download Evidence
Search for the Account by Type, Patient and ID INFO - entry.resource.count() > 0  Details
Search for the Account by Type, Patient and ID INFO - entry.resource.all(type.coding.where(code='IMP').exists())  Details
Search for the Account by Type, Patient and ID INFO - entry.resource.all(subject.reference.replaceMatches('/_history/.+','').matches('\\bAccount-Read-Patient-Example$'))  Details
Search for the Account by Type, Patient and ID RBellog 0  Download Evidence
Search for the Account by Type, Patient and ID Evidence Report  Download Evidence
Serenity BDD version 5.3.10