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

Feature: Testing search parameters against a resource of type valueset (@valueset-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 ValueSet-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 "ValueSet"

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

Examples:

searchParamValuesearchParamType
_idtoken
_countnumber
urluri
versiontoken
namestring
statustoken

Examples:

searchParamValuesearchParamType
_tagtoken 
context-type-valuecomposite 

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

Then TGR find the last request

And TGR current response with attribute "$.header.[~'content-type']" matches "application/fhir+xml;\s*charset=(?i)UTF-8"

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.valueset-read-id}" with error message "The requested ValueSet ${data.valueset-read-id} is not contained in the response bundle"

When Get FHIR resource at "http://fhirserver/ValueSet/?_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/ValueSet/?_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/ValueSet/?{searchParameter}={searchValue}" 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({searchParameter} = '{searchValue}')" with error message 'There are search results, but they do not fully match the search criteria'

Examples:

contentTypesearchParametersearchValue
xmlurlhttp://example.org/fhir/ValueSet/TestValueSet
jsonnameTestValueSet
jsonstatusactive
jsonversion1.0.0

When Get FHIR resource at "http://fhirserver/ValueSet/?context-type-value=focus%24http%3A%2F%2Fhl7.org%2Ffhir%2Fresource-types%7CEncounter" with content type "xml"

Then TGR find the last request

Then TGR current response with attribute "$.responseCode" matches "200"

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

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 6 Total Duration 8s
Total Number of Test Cases 14 Fastest Test 218ms
Number of Manual Test Cases 0 Slowest Test 1s
Tests Started März 23, 2026 09:41:36 Average Execution Time 626ms
Tests Finished März 23, 2026 09:41:45 Total Execution Time 8s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Testing search parameters against a resource of type ValueSet (@ValueSet-Search) Precondition 2 09:41:36 424ms SUCCESS
Testing search parameters against a resource of type ValueSet (@ValueSet-Search) Read and Validation of the CapabilityStatement 2 09:41:37 748ms SUCCESS
Testing search parameters against a resource of type ValueSet (@ValueSet-Search) Validation of the search parameter definitions in the CapabilityStatement
6 passing test cases
1 09:41:37 1s 347ms SUCCESS
Testing search parameters against a resource of type ValueSet (@ValueSet-Search) Search for ValueSet by ID 5 09:41:39 1s 546ms SUCCESS
Testing search parameters against a resource of type ValueSet (@ValueSet-Search) Search for ValueSet resource by Tag 3 UNDEFINED
Testing search parameters against a resource of type ValueSet (@ValueSet-Search) Search for ValueSet resource by Count 2 09:41:40 686ms SUCCESS
Testing search parameters against a resource of type ValueSet (@ValueSet-Search) Search for ValueSet by additional search parameters
4 passing test cases
3 09:41:41 4s 061ms SUCCESS
Testing search parameters against a resource of type ValueSet (@ValueSet-Search) Search for ValueSet by context type 4 UNDEFINED

Manual Tests

No manual tests were recorded
Serenity BDD version 4.3.2