Serenity BDD Report
Home > Requirements > Stufe5 > Terminplanung > Testing search parameters against the schedule resource (@schedule-search)
Report generated 01-09-2026 07:05

Feature: Testing search parameters against the schedule resource (@schedule-search)

Scenarios

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

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

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

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

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

Examples:

searchParamValuesearchParamType
_idtoken
activetoken
service-typetoken
specialtytoken
actorreference

Examples:

searchParamValuesearchParamType
_tagtoken

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

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

And Check if current response of resource "Schedule" is valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKKalender"

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

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

When Get FHIR resource at "http://fhirserver/Schedule/?_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'

Then Get FHIR resource at "http://fhirserver/Schedule/?active=true&actor=Practitioner/${data.appointment-practitioner-id}" with content type "json"

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

And FHIR current response body evaluates the FHIRPath "entry.resource.ofType(Schedule).all(active = 'true')" with error message 'There are search results, but they do not fully match the search criteria.'

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

Then Get FHIR resource at "http://fhirserver/Schedule/?service-type=${data.schedule-read-servicetype-code}&actor=Practitioner/${data.appointment-practitioner-id}" with content type "json"

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

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

Then Get FHIR resource at "http://fhirserver/Schedule/?actor=Practitioner/${data.appointment-practitioner-id}&specialty=urn%3Aoid%3A1.2.276.0.76.5.114%7C142%2Chttp%3A%2F%2Fihe-d.de%2FCodeSystems%2FAerztlicheFachrichtungen%7CNEUR" with content type "json"

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

And FHIR current response body evaluates the FHIRPath "entry.resource.ofType(Schedule).all(specialty.coding.where((code = '142' and system ='urn:oid:1.2.276.0.76.5.114') or (code = 'NEUR' and system ='http://ihe-d.de/CodeSystems/AerztlicheFachrichtungen')).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 9 Total Duration 14s
Total Number of Test Cases 14 Fastest Test 333ms
Number of Manual Test Cases 0 Slowest Test 7s
Tests Started Sep 01, 2026 07:05:24 Average Execution Time 1s
Tests Finished Sep 01, 2026 07:05:38 Cumulative Test Time
(sum of all individual test durations)
14s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against the Schedule resource (@Schedule-Search) Precondition 2 07:05:24 427ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Read and Validation of the CapabilityStatement 2 07:05:24 7s 133ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Validation of the search parameter definitions in the CapabilityStatement
6 passing test cases
1 07:05:31 2s 154ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by ID 3 07:05:33 883ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Optional Search for the Schedule by Tag and ID 4 07:05:34 913ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by Count 2 07:05:35 481ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule that belong to a Practitioner, by Active state 4 07:05:36 900ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule that belong to a Practitioner, by Service Type 3 07:05:37 694ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule that belong to a Practitioner, by Specialty 3 07:05:37 700ms 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 = 'Schedule' 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 = 'Schedule' 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 = 'Schedule' and searchParam.where(name = 'active' and type = 'token').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 = 'Schedule' and searchParam.where(name = 'service-type' 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 = 'Schedule' and searchParam.where(name = 'specialty' 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 = 'Schedule' and searchParam.where(name = 'actor' and type = 'reference').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 = 'Schedule' and searchParam.where(name = '_tag' and type = 'token').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
Search for the Schedule by ID INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bSchedule-Read-Example$')).count() = 1  Details
Search for the Schedule by ID RBellog 0  Download Evidence
Search for the Schedule by ID Evidence Report  Download Evidence
Optional Search for the Schedule by Tag and ID INFO - entry.resource.count() > 0  Details
Optional Search for the Schedule by Tag and ID INFO - entry.resource.all(meta.tag.where(code='external').exists())  Details
Optional Search for the Schedule by Tag and ID INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bSchedule-Read-Example$')).count() = 1  Details
Optional Search for the Schedule by Tag and ID RBellog 0  Download Evidence
Optional Search for the Schedule by Tag and ID Evidence Report  Download Evidence
Search for the Schedule by Count INFO - entry.resource.count() > 0 and entry.resource.count() <= 1  Details
Search for the Schedule by Count RBellog 0  Download Evidence
Search for the Schedule by Count Evidence Report  Download Evidence
Search for the Schedule that belong to a Practitioner, by Active state INFO - entry.resource.ofType(Schedule).count() > 0  Details
Search for the Schedule that belong to a Practitioner, by Active state INFO - entry.resource.ofType(Schedule).all(active = 'true')  Details
Search for the Schedule that belong to a Practitioner, by Active state INFO - entry.resource.where(id.replaceMatches('/_history/.+','').matches('\\bSchedule-Read-Example$')).count() = 1  Details
Search for the Schedule that belong to a Practitioner, by Active state RBellog 0  Download Evidence
Search for the Schedule that belong to a Practitioner, by Active state Evidence Report  Download Evidence
Search for the Schedule that belong to a Practitioner, by Service Type INFO - entry.resource.ofType(Schedule).count() > 0  Details
Search for the Schedule that belong to a Practitioner, by Service Type INFO - entry.resource.ofType(Schedule).all(serviceType.coding.where(code='177').exists())  Details
Search for the Schedule that belong to a Practitioner, by Service Type RBellog 0  Download Evidence
Search for the Schedule that belong to a Practitioner, by Service Type Evidence Report  Download Evidence
Search for the Schedule that belong to a Practitioner, by Specialty INFO - entry.resource.ofType(Schedule).count() > 0  Details
Search for the Schedule that belong to a Practitioner, by Specialty INFO - entry.resource.ofType(Schedule).all(specialty.coding.where((code = '142' and system ='urn:oid:1.2.276.0.76.5.114') or (code = 'NEUR' and system ='http://ihe-d.de/CodeSystems/AerztlicheFachrichtungen')).exists())  Details
Search for the Schedule that belong to a Practitioner, by Specialty RBellog 0  Download Evidence
Search for the Schedule that belong to a Practitioner, by Specialty Evidence Report  Download Evidence
Serenity BDD version 5.3.10