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:
Then Get FHIR resource at "http://fhirserver/metadata" with content type "json"
And CapabilityStatement contains interaction "create" for resource "MedicationRequest"
Given TGR set default header "Content-Type" to "application/fhir+json"
When TGR send POST request to "http://fhirserver/MedicationRequest" with body "!{file('src/test/resources/features/Stufe5/Medikation/fixtures/MedicationRequest-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 MedicationRequest) or ($this is Parameters)' with error message 'The response contains neither a MedicationRequest nor a Parameters resource'
And FHIR current response body evaluates the FHIRPath '($this is MedicationRequest) implies id.exists()' with error message 'No ID was assigned to the MedicationRequest'
And FHIR current response body evaluates the FHIRPath "($this is MedicationRequest) implies status.toString().matches('^completed')" with error message 'MedicationRequest status does not have the value "completed"'
And FHIR current response body evaluates the FHIRPath "($this is MedicationRequest) implies authoredOn.hasValue()" with error message 'MedicationRequest authoredOn does not contain a valid value'
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.id.exists()" with error message 'No ID was assigned to the MedicationRequest'
And FHIR current response body evaluates the FHIRPath "($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.status.toString().matches('^completed')" with error message 'MedicationRequest 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 MedicationRequest).resource.authoredOn.hasValue()" with error message 'MedicationRequest authoredOn does not contain a valid value'
| Number of Scenarios | 3 | Total Duration | 11s |
| Total Number of Test Cases | 3 | Fastest Test | 2s |
| Number of Manual Test Cases | 0 | Slowest Test | 5s |
| Tests Started | Sep 01, 2026 07:13:55 | Average Execution Time | 3s |
| Tests Finished | Sep 01, 2026 07:14:07 |
Cumulative Test Time
(sum of all individual test durations) |
11s |
| feature | Scenario | Context | Steps | Started | Total Duration | Result |
|---|---|---|---|---|---|---|
| Create a resource of type MedicationRequest (@MedicationRequest-Create) | Precondition | 2 | 07:13:55 | 5s 456ms | ||
| Create a resource of type MedicationRequest (@MedicationRequest-Create) | Read and Validation of the CapabilityStatement | 2 | 07:14:00 | 3s 549ms | ||
| Create a resource of type MedicationRequest (@MedicationRequest-Create) | Create a MedicationRequest resource via POST | 11 | 07:14:04 | 2s 968ms |
| Scenario | Title | Details |
|---|---|---|
| Precondition | RBellog 0 | Download Evidence |
| Read and Validation of the CapabilityStatement | INFO - rest.where(mode = 'server').resource.where(type = 'MedicationRequest' 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 MedicationRequest resource via POST | INFO - ($this is MedicationRequest) or ($this is Parameters) | Details |
| Create a MedicationRequest resource via POST | INFO - ($this is MedicationRequest) implies id.exists() | Details |
| Create a MedicationRequest resource via POST | INFO - ($this is MedicationRequest) implies status.toString().matches('^completed') | Details |
| Create a MedicationRequest resource via POST | INFO - ($this is MedicationRequest) implies authoredOn.hasValue() | Details |
| Create a MedicationRequest resource via POST | INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.id.exists() | Details |
| Create a MedicationRequest resource via POST | INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.status.toString().matches('^completed') | Details |
| Create a MedicationRequest resource via POST | INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is MedicationRequest).resource.authoredOn.hasValue() | Details |
| Create a MedicationRequest resource via POST | RBellog 0 | Download Evidence |
| Create a MedicationRequest resource via POST | Evidence Report | Download Evidence |