Given the Test Description: "The system under test MUST support booking appointments by schedule reference."
Given the Preconditions: A Slot resource must have been created manually with the following properties:
Given TGR set default header "Content-Type" to "application/fhir+json"
And TGR send POST request to "http://fhirserver/Appointment/$book" with body "!{file('src/test/resources/features/Stufe5/Terminplanung/fixtures/Appointment-Appointment-Book-By-Schedule-Parameters-Fixture.json')}"
Then TGR find the last request
And TGR current response with attribute "$.responseCode" matches "20\d"
And FHIR current response body evaluates the FHIRPath '($this is Appointment) or ($this is Parameters)' with error message 'The response contains neither an Appointment nor an OperationOutcome resource nor a Parameters resource'
And FHIR current response body evaluates the FHIRPath '($this is Appointment) implies id.exists()' with error message 'Response variant Appointment: no ID was assigned to the appointment'
And FHIR current response body evaluates the FHIRPath "($this is Appointment) implies status.toString().matches('^booked|pending$')" with error message 'Response variant Appointment: no ID was assigned to the appointment'
And FHIR current response body evaluates the FHIRPath "($this is Appointment) implies slot.exists()" with error message 'Response variant Appointment: no slot assigned'
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is Appointment).resource.id.exists()" with error message 'Response variant Parameters: no ID was assigned to the appointment'
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is Appointment).resource.status.toString().matches('^booked|pending$')" with error message 'Response variant Parameters: the appointment status is neither booked nor pending'
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is Appointment).resource.slot.exists()" with error message 'Response variant Parameters: no slot assigned'
| Number of Scenarios | 2 | Total Duration | 3s |
| Total Number of Test Cases | 2 | Fastest Test | 416ms |
| Number of Manual Test Cases | 0 | Slowest Test | 2s |
| Tests Started | März 23, 2026 09:36:27 | Average Execution Time | 1s |
| Tests Finished | März 23, 2026 09:36:31 | Total Execution Time | 3s |
| feature | Scenario | Context | Steps | Started | Total Duration | Result |
|---|---|---|---|---|---|---|
| Booking an appointment by schedule reference (@Appointment-Book-By-Schedule) | Precondition | 2 | 09:36:27 | 416ms | ||
| Booking an appointment by schedule reference (@Appointment-Book-By-Schedule) | Book an appointment by schedule reference | 11 | 09:36:28 | 2s 825ms |