Serenity BDD Report
Home > Requirements > Stufe5 > Basis > Testing search parameters against a resource of type procedure (@procedure-search)
Report generated 23-03-2026 09:39

Feature: Testing search parameters against a resource of type procedure (@procedure-search)

Scenarios

Given the Test Description: "The system under test MUST find a previously created resource when searched using the parameter and return it in the search results (SEARCH)."

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

When Get FHIR resource at "http://fhirserver/metadata" with content type "xml"

And CapabilityStatement contains interaction "search-type" for resource "Procedure"

And CapabilityStatement contains definition of search parameter "{searchParamValue}" of type "{searchParamType}" for resource "Procedure"

Examples:

searchParamValuesearchParamType
_idtoken
_countnumber
statustoken
categorytoken
codetoken
patientreference
encounterreference
datedate

Examples:

searchParamValuesearchParamType
_tagtoken 
subjectreference 

When Get FHIR resource at "http://fhirserver/Procedure/?_id=${data.procedure-read-id}" with content type "xml"

And FHIR current response body is a valid CORE resource and conforms to profile "https://hl7.org/fhir/StructureDefinition/Bundle"

And response bundle contains resource with ID "${data.procedure-read-id}" with error message "The requested Procedure ${data.procedure-read-id} is not contained in the response bundle"

When Get FHIR resource at "http://fhirserver/Procedure/?_tag=${data.tag-system}%7C${data.tag-value}" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(meta.tag.where(code='${data.tag-value}').exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Procedure/?_count" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'total } 0 and entry.resource.count() } 0' with error message 'No search results were found'

When Get FHIR resource at "http://fhirserver/Procedure/?status=completed" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all((status = 'completed').exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Procedure/?category=http://snomed.info/sct%7C387713003" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all((category.where(coding.code = '387713003' and coding.system = 'http://snomed.info/sct' and coding.version = 'http://snomed.info/sct/11000274103/version/${data.snomed-ct-version}')).exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Procedure/?code=http://fhir.de/CodeSystem/bfarm/ops%7C5-470.11" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all((code.coding.where(code = '5-470.11' and system = 'http://fhir.de/CodeSystem/bfarm/ops')).exists())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Procedure/?date=le2050-01-01" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(performedDateTime.exists().not() or performedDateTime {= @2050-01-01T23:59:59+01:00)" with error message 'There are search results, but they do not fully match the search criteria'

And FHIR current response body evaluates the FHIRPath "entry.resource.all(performedPeriod.start.exists().not() or performedPeriod.start {= @2050-01-01T23:59:59+01:00)" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Procedure/?patient=Patient/${data.patient-read-id}" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And element "subject" in all bundle resources references resource with ID "${data.patient-read-id}"

When Get FHIR resource at "http://fhirserver/Procedure/?{path}={query}{data}" with content type "{contentType}"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And FHIR current response body evaluates the FHIRPath 'entry.resource.all({entrytype}.reference.replaceMatches("/_history/.+","").matches("\b{data}$"))' with error message 'There are search results, but they do not fully match the search criteria'

Examples:

contentTypeentrytypepathquerydata
xmlencounterencounterEncounter/${data.encounter-read-in-progress-id}
jsonsubjectpatientPatient/${data.patient-read-id}

When Get FHIR resource at "http://fhirserver/Procedure/?_id:not=${data.procedure-read-id}&status:not=completed" with content type "xml"

And bundle does not contain resource "Procedure" with ID "${data.procedure-read-id}" with error message "There are search results, but they do not fully match the search criteria"

And FHIR current response body evaluates the FHIRPath "entry.resource.ofType(Procedure).all(status.exists() and (status = 'completed').not())" with error message 'There are search results, but they do not fully match the search criteria'

When Get FHIR resource at "http://fhirserver/Procedure/?subject=Patient/${data.patient-read-id}" with content type "xml"

And FHIR current response body evaluates the FHIRPath 'entry.resource.count() } 0' with error message 'No search results were found'

And element "subject" in all bundle resources references resource with ID "${data.patient-read-id}"

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 12 Total Duration 13s
Total Number of Test Cases 20 Fastest Test 217ms
Number of Manual Test Cases 0 Slowest Test 1s
Tests Started März 23, 2026 09:39:54 Average Execution Time 659ms
Tests Finished März 23, 2026 09:40:08 Total Execution Time 13s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against a resource of type Procedure (@Procedure-Search) Precondition 2 09:39:54 426ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Read and Validation of the CapabilityStatement 2 09:39:55 716ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Validation of the search parameter definitions in the CapabilityStatement
8 passing test cases
1 09:39:55 1s 816ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedure resource by ID 3 09:39:57 956ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedure resource by Tag 3 UNDEFINED
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedure resource by Count 2 09:39:58 921ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedures by Status 3 09:39:59 920ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedures by Category 3 09:40:00 976ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedures by Code (OPS) 3 09:40:01 1s 088ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedures by Performed Date 4 09:40:02 1s 430ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedures by Patient reference 3 09:40:03 932ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedures by references
2 passing test cases
3 09:40:04 1s 967ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Negative search for Procedure by ID and status 3 09:40:06 1s 092ms SUCCESS
Testing search parameters against a resource of type Procedure (@Procedure-Search) Search for Procedures by Subject reference 3 UNDEFINED

Manual Tests

No manual tests were recorded
Serenity BDD version 4.3.2