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

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

Scenarios

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

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

  • Condition: a valid ISiKDiagnose resource - the Id can be customised with the variable 'riskassessment-condition-id'
  • Encounter: a valid ISiKKontaktGesundheitseinrichtung resource - the Id can be customised with the variable 'riskassessment-encounter-id'
  • Observation: a valid ISiKKoerpergewicht resource - the Id can be customised with the variable 'riskassessment-observation-id'
  • Patient: a valid ISiKPatient resource - the Id can be customised with the variable 'riskassessment-patient-id'

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

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

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

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

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

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

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

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

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 3 Total Duration 5s
Total Number of Test Cases 3 Fastest Test 425ms
Number of Manual Test Cases 0 Slowest Test 2s
Tests Started Sep 01, 2026 07:07:06 Average Execution Time 1s
Tests Finished Sep 01, 2026 07:07:11 Cumulative Test Time
(sum of all individual test durations)
5s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Create a resource of type RiskAssessment (@RiskAssessment-Create) Precondition 2 07:07:06 425ms SUCCESS
Create a resource of type RiskAssessment (@RiskAssessment-Create) Read and Validation of the CapabilityStatement 2 07:07:06 2s 490ms SUCCESS
Create a resource of type RiskAssessment (@RiskAssessment-Create) Create a RiskAssessment resource via POST 9 07:07:09 2s 212ms 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 = 'RiskAssessment' 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 RiskAssessment resource via POST INFO - ($this is RiskAssessment) or ($this is Parameters)  Details
Create a RiskAssessment resource via POST INFO - ($this is RiskAssessment) implies id.exists()  Details
Create a RiskAssessment resource via POST INFO - ($this is RiskAssessment) implies status.toString().matches('^final')  Details
Create a RiskAssessment resource via POST INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is RiskAssessment).resource.id.exists()  Details
Create a RiskAssessment resource via POST INFO - ($this is Parameters) implies parameter.where(name = 'return' and resource is RiskAssessment).resource.status.toString().matches('^final')  Details
Create a RiskAssessment resource via POST RBellog 0  Download Evidence
Create a RiskAssessment resource via POST Evidence Report  Download Evidence
Serenity BDD version 5.3.10