Serenity BDD Report
Home > Requirements > Stufe5 > Medikation > Create a resource of type medicationadministration (@medicationadministration-create)
Report generated 01-09-2026 06:58

Feature: Create a resource of type medicationadministration (@medicationadministration-create)

Scenarios

Given the Test Description: "The system under test MUST create the resource internally."

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

For the execution of this test case, the following resources must exist in the system under test:

  • Medication: a valid ISiKMedikament resource - the Id can be customised with the variable 'medication-read-id'
  • Patient: a valid ISiKPatient resource - the Id can be customised with the variable 'medication-patient-id'
  • Encounter: a valid ISiKKontaktGesundheitseinrichtung resource - the Id can be customised with the variable 'medication-encounter-id'
  • Practitioner: a valid ISiKPersonImGesundheitsberuf resource - the Id can be customised with the variable 'medication-practitioner-id'

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

And CapabilityStatement contains interaction "create" for resource "MedicationAdministration"

Given TGR set default header "Content-Type" to "application/fhir+json"

When TGR send POST request to "http://fhirserver/MedicationAdministration" with body "!{file('src/test/resources/features/Stufe5/Medikation/fixtures/MedicationAdministration-Create-Fixture.json')}"

And TGR find the last request

Then TGR current response with attribute "$.responseCode" matches "20\d"

And FHIR current response body evaluates the FHIRPath '($this is MedicationAdministration) or ($this is Parameters)' with error message 'The response contains neither a MedicationAdministration nor a Parameters resource'

And FHIR current response body evaluates the FHIRPath '($this is MedicationAdministration) implies id.exists()' with error message 'No ID was assigned to the MedicationAdministration'

And FHIR current response body evaluates the FHIRPath "($this is MedicationAdministration) implies status.toString().matches('^completed')" with error message 'MedicationAdministration status does not have the value "completed"'

And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationAdministration).resource.id.exists()" with error message 'No ID was assigned to the MedicationAdministration'

And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationAdministration).resource.status.toString().matches('^completed')" with error message 'MedicationAdministration status does not have the value "completed"'

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 3 Total Duration 10s
Total Number of Test Cases 3 Fastest Test 419ms
Number of Manual Test Cases 0 Slowest Test 8s
Tests Started Sep 01, 2026 06:58:39 Average Execution Time 3s
Tests Finished Sep 01, 2026 06:58:50 Cumulative Test Time
(sum of all individual test durations)
10s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Create a resource of type MedicationAdministration (@MedicationAdministration-Create) Precondition 2 06:58:39 419ms SUCCESS
Create a resource of type MedicationAdministration (@MedicationAdministration-Create) Read and Validation of the CapabilityStatement 2 06:58:40 8s 097ms SUCCESS
Create a resource of type MedicationAdministration (@MedicationAdministration-Create) Create a MedicationAdministration resource via POST 9 06:58:48 2s 187ms 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 = 'MedicationAdministration' and interaction.where(code = 'create').exists()).exists()  Details
Read and Validation of the CapabilityStatement RBellog 0  Download Evidence
Read and Validation of the CapabilityStatement Evidence Report  Download Evidence
Create a MedicationAdministration resource via POST INFO - ($this is MedicationAdministration) or ($this is Parameters)  Details
Create a MedicationAdministration resource via POST INFO - ($this is MedicationAdministration) implies id.exists()  Details
Create a MedicationAdministration resource via POST INFO - ($this is MedicationAdministration) implies status.toString().matches('^completed')  Details
Create a MedicationAdministration resource via POST INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationAdministration).resource.id.exists()  Details
Create a MedicationAdministration resource via POST INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationAdministration).resource.status.toString().matches('^completed')  Details
Create a MedicationAdministration resource via POST RBellog 0  Download Evidence
Create a MedicationAdministration resource via POST Evidence Report  Download Evidence
Serenity BDD version 5.3.10