Serenity BDD Report
Home > Requirements > Stufe5 > Medikation > Create a resource of type medication list (@list-create)
Report generated 01-09-2026 07:14

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

Scenarios

Given the Test Description: "The system under test MUST be able to resolve the MedicationStatement, Patient and Encounter referenced by their literal reference (e.g. [ResourceType]/[id])."

Given the Preconditions: - The MedicationStatement-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:

  • MedicationStatement: a valid ISiKMedikationsInformation resource - the Id can be customised with the variable 'medicationstatement-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'

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

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

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

When TGR send POST request to "http://fhirserver/List" with body "!{file('src/test/resources/features/Stufe5/Medikation/fixtures/List-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 List) or ($this is Parameters)' with error message 'The response contains neither a List nor a Parameters resource'

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

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

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

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

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

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

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 3 Total Duration 11s
Total Number of Test Cases 3 Fastest Test 499ms
Number of Manual Test Cases 0 Slowest Test 8s
Tests Started Sep 01, 2026 07:14:07 Average Execution Time 3s
Tests Finished Sep 01, 2026 07:14:19 Cumulative Test Time
(sum of all individual test durations)
11s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Create a resource of type Medication List (@List-Create) Precondition 2 07:14:07 499ms SUCCESS
Create a resource of type Medication List (@List-Create) Read and Validation of the CapabilityStatement 2 07:14:08 8s 737ms SUCCESS
Create a resource of type Medication List (@List-Create) Create a Medication List via POST 11 07:14:16 2s 586ms 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 = 'List' 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 Medication List via POST INFO - ($this is List) or ($this is Parameters)  Details
Create a Medication List via POST INFO - ($this is List) implies id.exists()  Details
Create a Medication List via POST INFO - ($this is List) implies status.toString().matches('^current$')  Details
Create a Medication List via POST INFO - ($this is List) implies mode.toString().matches('^working')  Details
Create a Medication List via POST INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is List).resource.id.exists()  Details
Create a Medication List via POST INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is List).resource.status.toString().matches('^current$')  Details
Create a Medication List via POST INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is List).resource.mode.toString().matches('^working$')  Details
Create a Medication List via POST RBellog 0  Download Evidence
Create a Medication List via POST Evidence Report  Download Evidence
Serenity BDD version 5.3.10