Serenity BDD Report
Home > Requirements > Stufe5 > Terminplanung > Testing search parameters against the schedule resource (@schedule-search)
Report generated 23-03-2026 09:36

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}" 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/Schedule/?_count" with content type "xml"

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

Then Get FHIR resource at "http://fhirserver/Schedule/?active=true" 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.'

Then Get FHIR resource at "http://fhirserver/Schedule/?service-type=${data.schedule-read-servicetype-code}" 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/?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.'

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

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(actor.where(reference.replaceMatches('/_history/.+','').matches('\b${data.appointment-practitioner-id}$') and display.exists()).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 9s
Total Number of Test Cases 13 Fastest Test 209ms
Number of Manual Test Cases 0 Slowest Test 1s
Tests Started März 23, 2026 09:36:56 Average Execution Time 688ms
Tests Finished März 23, 2026 09:37:05 Total Execution Time 8s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against the Schedule resource (@Schedule-Search) Precondition 2 09:36:56 417ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Read and Validation of the CapabilityStatement 2 09:36:57 1s 310ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Validation of the search parameter definitions in the CapabilityStatement
5 passing test cases
1 09:36:58 1s 071ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by ID 3 09:36:59 1s 010ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by Tag 3 UNDEFINED
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by Count 2 09:37:00 822ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by Active state 3 09:37:01 1s 226ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by Service Type 3 09:37:02 983ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by Specialty 3 09:37:03 1s 015ms SUCCESS
Testing search parameters against the Schedule resource (@Schedule-Search) Search for the Schedule by Actor 3 09:37:04 1s 110ms SUCCESS

Manual Tests

No manual tests were recorded
Serenity BDD version 4.3.2