Serenity BDD Report
Home > Requirements > Stufe5 > Medikation > Read information from a resource of type medication (@medication-read)
Report generated 01-09-2026 07:06

Feature: Read information from a resource of type medication (@medication-read)

Scenarios

Given the Test Description: "The system under test MUST return the complete resource in response to an HTTP GET request to its URL (READ)."

Given the Preconditions: - The test data set must have been recorded in the system under test according to the specifications (manually).

  • The ID of the corresponding FHIR resource for this test data set must be stored in the configuration variable 'medication-read-id'.

Create a Medication resource in your system with the following values:

  • Id: The value of the configuration variable 'medication-read-id'
  • A single ATC Code:
    • code: V03AB23
    • display: Acetylcystein
    • system: http://fhir.de/CodeSystem/bfarm/atc
    • version: any (the value of the configuration variable 'atc-code-version')
  • Status: active
  • Batch lot number: 123
  • Amount: 20 effervescent tablets per package
  • Ingredient: Reference to a valid ingredient with ATC code V03AB23 (the Id can be stored in the variable 'medication-read-referenced-ingredient').

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

And CapabilityStatement contains interaction "read" for resource "Medication"

Then Get FHIR resource at "http://fhirserver/Medication/${data.medication-read-id}" with content type "xml"

And resource has ID "${data.medication-read-id}"

And FHIR current response body is a valid isik5 resource and conforms to profile "https://gematik.de/fhir/isik/StructureDefinition/ISiKMedikament"

And TGR current response with attribute "$..Medication.status.value" matches "active"

And TGR current response with attribute "$..batch.lotNumber.value" matches "123"

And FHIR current response body evaluates the FHIRPath "code.coding.where(code = 'V03AB23' and system = 'http://fhir.de/CodeSystem/bfarm/atc' and display = 'Acetylcystein' and version.hasValue()).exists()" with error message 'The code does not match the expected value'

And FHIR current response body evaluates the FHIRPath "amount.where(numerator.value = 20 and numerator.system = 'http://unitsofmeasure.org' and numerator.unit.exists() and numerator.code = '1' and denominator.value = 1 and denominator.system = 'http://unitsofmeasure.org' and denominator.unit.exists() and denominator.code = '1').exists()" with error message 'The amount does not match the expected value'

And FHIR current response body evaluates the FHIRPath "ingredient.item.exists()" with error message 'No reference to the ingredient exists'

And element "ingredient.item" references resource with ID "${data.medication-read-referenced-ingredient}" with error message "The ingredient reference does not match the expected value."

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 424ms
Number of Manual Test Cases 0 Slowest Test 8s
Tests Started Sep 01, 2026 07:06:11 Average Execution Time 3s
Tests Finished Sep 01, 2026 07:06:21 Cumulative Test Time
(sum of all individual test durations)
10s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Read Information from a resource of type Medication (@Medication-Read) Precondition 2 07:06:11 424ms SUCCESS
Read Information from a resource of type Medication (@Medication-Read) Read and Validation of the CapabilityStatement 2 07:06:11 8s 099ms SUCCESS
Read Information from a resource of type Medication (@Medication-Read) Read and Validate the Medication by its ID 9 07:06:19 1s 999ms 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 = 'Medication' and interaction.where(code = 'read').exists()).exists()  Details
Read and Validation of the CapabilityStatement RBellog 0  Download Evidence
Read and Validation of the CapabilityStatement Evidence Report  Download Evidence
Read and Validate the Medication by its ID INFO - id.replaceMatches('/_history/.+','').matches('\\bMedication-Read-Example$')  Details
Read and Validate the Medication by its ID INFO - Code system definition is missing for 'http://fhir.de/CodeSystem/bfarm/atc#V03AB23'  Details
Read and Validate the Medication by its ID INFO - code.coding.where(code = 'V03AB23' and system = 'http://fhir.de/CodeSystem/bfarm/atc' and display = 'Acetylcystein' and version.hasValue()).exists()  Details
Read and Validate the Medication by its ID INFO - amount.where(numerator.value = 20 and numerator.system = 'http://unitsofmeasure.org' and numerator.unit.exists() and numerator.code = '1' and denominator.value = 1 and denominator.system = 'http://unitsofmeasure.org' and denominator.unit.exists() and denominator.code = '1').exists()  Details
Read and Validate the Medication by its ID INFO - ingredient.item.exists()  Details
Read and Validate the Medication by its ID INFO - ingredient.item.reference.replaceMatches('/_history/.+','').matches('\\bMedication-Read-Referenced-Ingredient-Example$')  Details
Read and Validate the Medication by its ID RBellog 0  Download Evidence
Read and Validate the Medication by its ID Evidence Report  Download Evidence
Serenity BDD version 5.3.10