Skip to content

Commit 709d388

Browse files
committed
Add simulation flags to groups
1 parent b9f4998 commit 709d388

12 files changed

Lines changed: 68 additions & 39 deletions

lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_inquire_response_bundle_validation_test.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class PasClientInquireResponseBundleValidationTest < Inferno::Test
1010
include ResponseGenerator
1111

1212
id :pas_client_v201_inquire_response_bundle_validation_test
13-
title '[USER INPUT VERIFICATION] Inquire Response Bundle is valid'
13+
title 'Inquire Response Bundle is valid'
1414
description %(
15-
**USER INPUT VERIFICATION**: This test verifies input provided by the tester instead of the system under test.
16-
Errors encountered will be treated as a skip instead of a failure.
15+
**USER INPUT VERIFICATION**: This test verifies input provided by the tester instead of
16+
the system under test. Errors encountered will be treated as a skip instead of a failure.
1717
1818
This test verifies the conformity of the inquire response sent by Inferno, which will have been
1919
either:
@@ -44,6 +44,7 @@ class PasClientInquireResponseBundleValidationTest < Inferno::Test
4444
issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
4545
for additional details.
4646
)
47+
simulation_verification
4748

4849
def request_type
4950
'inquire'

lib/davinci_pas_test_kit/custom_groups/v2.0.1/client_tests/pas_client_response_bundle_validation_test.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class PasClientResponseBundleValidationTest < Inferno::Test
1010
include ResponseGenerator
1111

1212
id :pas_client_v201_response_bundle_validation_test
13-
title '[USER INPUT VERIFICATION] Submit Response Bundle is valid'
13+
title 'Submit Response Bundle is valid'
1414
description %(
15-
**USER INPUT VERIFICATION**: This test verifies input provided by the tester instead of the system under test.
16-
Errors encountered will be treated as a skip instead of a failure.
15+
**USER INPUT VERIFICATION**: This test verifies input provided by the tester instead
16+
of the system under test. Errors encountered will be treated as a skip instead of a failure.
1717
1818
This test verifies the conformity of the submit response sent by Inferno, which will have been
1919
either:
@@ -44,6 +44,7 @@ class PasClientResponseBundleValidationTest < Inferno::Test
4444
issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
4545
for additional details.
4646
)
47+
simulation_verification
4748

4849
def request_type
4950
'submit'

lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_client_pended_group.rb

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,29 @@ class PASClientPendedGroup < Inferno::TestGroup
7070
title 'Verify notification interaction'
7171

7272
test from: :subscriptions_r4_client_notification_input_verification,
73-
title: '[USER INPUT VERIFICATION] Tester-provided event notification Bundle is conformant',
73+
title: 'Tester-provided event notification Bundle is conformant',
7474
description: %(
75-
This test checks that the notification Bundle sent to the client, which will be either
76-
the tester-provided notification Bundle in the **Claim updated notification JSON** input
77-
or mocked by Inferno based on details in the Subscription and submitted Claim, is conformant
78-
to Subscription Backport IG requirements.
75+
**USER INPUT VERIFICATION**: This test checks that the notification Bundle sent to the
76+
client, which will be either the tester-provided notification Bundle in the **Claim
77+
updated notification JSON** input or mocked by Inferno based on details in the Subscription
78+
and submitted Claim, is conformant to Subscription Backport IG requirements.
7979
),
80+
simulation_verification: true,
8081
config: {
8182
inputs: {
8283
notification_bundle: { optional: true } # doesn't use the input (bug in Subscriptions)
8384
}
8485
}
8586
test from: :subscriptions_r4_client_notification_input_payload_verification,
86-
title: '[USER INPUT VERIFICATION] Tester-provided event notification Bundle matches the Subscription',
87+
title: 'Tester-provided event notification Bundle matches the Subscription',
8788
description: %(
88-
This test checks that the notification Bundle sent to the client, which will be either
89-
the tester-provided notification Bundle in the **Claim updated notification JSON** input
90-
or mocked by Inferno based on details in the Subscription and submitted Claim, matches the details
91-
requested in the Subscription provided during the **2.1** "PAS Subscription Setup" tests.
89+
**USER INPUT VERIFICATION**: This test checks that the notification Bundle sent to the client,
90+
which will be either the tester-provided notification Bundle in the **Claim updated notification
91+
JSON** input or mocked by Inferno based on details in the Subscription and submitted Claim,
92+
matches the details requested in the Subscription provided during the **2.1** "PAS Subscription
93+
Setup" tests.
9294
),
95+
simulation_verification: true,
9396
config: {
9497
inputs: {
9598
notification_bundle: { optional: true } # doesn't use the input (bug in Subscriptions)

lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_server_subscription_input_conformance.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ module DaVinciPASV201
55
class PASServerSubscriptionInputConformance < Inferno::Test
66
include PASSubscriptionVerification
77
id :pas_server_subscription_input_conformance
8-
title '[USER INPUT VERIFICATION] Verify Subscription PAS conformance'
8+
title 'Verify Subscription PAS conformance'
99
description %(
10-
This test accepts a Subscription resource as an input and verifies that it is conformant to PAS requirements on
11-
the Subscriptions, including:
10+
**USER INPUT VERIFICATION**: This test accepts a Subscription resource as an input and
11+
verifies that it is conformant to PAS requirements on the Subscriptions, including:
1212
- The payload content type must be `id-only`
1313
- The use of the [PAS-defined Subscription
1414
Topic](https://hl7.org/fhir/us/davinci-pas/STU2/SubscriptionTopic-PASSubscriptionTopic.html), and
1515
- Inclusion of filter criteria for the client's organization.
1616
)
1717
input :subscription_resource
18+
simulation_verification
1819

1920
run do
2021
omit_if subscription_resource.blank?, 'Did not input a Subscription resource of this type.'

lib/davinci_pas_test_kit/custom_groups/v2.0.1/pas_server_subscription_setup.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ class PASServerSubscriptionSetup < Inferno::TestGroup
1616
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@141'
1717
run_as_group
1818

19-
test from: :subscriptions_r4_server_subscription_conformance do
19+
test from: :subscriptions_r4_server_subscription_conformance,
20+
title: 'Verify Subscription to Send to Server',
21+
simulation_verification: true do
2022
input :subscription_resource,
2123
title: 'Pended Prior Authorization Subscription',
2224
description: %(

lib/davinci_pas_test_kit/generated/v2.0.1/pas_inquiry_request_bundle/server_pas_inquiry_request_bundle_validation_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class ServerPasInquiryRequestBundleValidationTest < Inferno::Test
66
include DaVinciPASTestKit::PasBundleValidation
77

88
id :pas_server_v201_pas_inquiry_request_bundle_validation_test
9-
title '[USER INPUT VALIDATION] Inquiry Request Bundle is valid'
9+
title 'Inquiry Request Bundle is valid'
1010
description %(
1111
**USER INPUT VALIDATION**: This test validates input provided by the user instead of the system under test.
1212
Errors encountered will be treated as a skip instead of a failure.
@@ -39,6 +39,7 @@ class ServerPasInquiryRequestBundleValidationTest < Inferno::Test
3939
issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
4040
for additional details.
4141
)
42+
simulation_verification
4243

4344
input :pa_inquire_request_payload,
4445
title: 'PAS Inquire Request Payload',

lib/davinci_pas_test_kit/generated/v2.0.1/pas_request_bundle/server_pas_request_bundle_validation_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class ServerPasRequestBundleValidationTest < Inferno::Test
66
include DaVinciPASTestKit::PasBundleValidation
77

88
id :pas_server_v201_pas_request_bundle_validation_test
9-
title '[USER INPUT VALIDATION] Request Bundle is valid'
9+
title 'Request Bundle is valid'
1010
description %(
1111
**USER INPUT VALIDATION**: This test validates input provided by the user instead of the system under test.
1212
Errors encountered will be treated as a skip instead of a failure.
@@ -39,6 +39,7 @@ class ServerPasRequestBundleValidationTest < Inferno::Test
3939
issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
4040
for additional details.
4141
)
42+
simulation_verification
4243

4344
input :pa_submit_request_payload,
4445
title: 'PAS Submit Request Payload',

lib/davinci_pas_test_kit/generated/v2.0.1/pas_server_must_support_use_case_group.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def use_case
112112
- [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
113113
)
114114
run_as_group
115-
115+
116116
group do
117117
title 'Submission of claims to the $submit operation for must support validation'
118118

@@ -143,8 +143,9 @@ def use_case
143143
test from: :pas_server_v201_pas_response_bundle_validation_test
144144
end
145145
group do
146-
title '[USER INPUT VALIDATION] Submit Request Must Support'
146+
title 'Submit Request Must Support'
147147
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@35'
148+
simulation_verification
148149

149150
test from: :pas_server_submit_v201_must_support_requirement
150151
test from: :pas_server_submit_request_v201_pas_request_bundle_must_support_test
@@ -205,7 +206,7 @@ def use_case
205206
- [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
206207
)
207208
run_as_group
208-
209+
209210
group do
210211
title 'Submission of claims to the $inquire operation for must support validation'
211212

@@ -236,8 +237,9 @@ def use_case
236237
test from: :pas_server_v201_pas_inquiry_response_bundle_validation_test
237238
end
238239
group do
239-
title '[USER INPUT VALIDATION] Inquiry Request Must Support'
240+
title 'Inquiry Request Must Support'
240241
verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@36'
242+
simulation_verification
241243

242244
test from: :pas_server_inquire_request_v201_pas_inquiry_request_bundle_must_support_test
243245
test from: :pas_server_inquire_request_v201_claim_inquiry_must_support_test

lib/davinci_pas_test_kit/generator/group_generator.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,12 @@ def grouped_must_support_test_ids
222222
{
223223
'$submit Element Support' => {
224224
'Submission of claims to the $submit operation for must support validation' => submit_tests,
225-
"[USER INPUT VALIDATION] Submit Request Must Support'" \
226-
"\n#{' ' * 10}verifies_requirements " \
227-
"'hl7.fhir.us.davinci-pas_2.0.1@35" => submit_request_must_support_test_ids,
225+
"Submit Request Must Support\n#{' ' * 10}verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@35'\n#{' ' * 10}simulation_verification" => submit_request_must_support_test_ids,
228226
'Submit Response Must Support' => submit_response_must_support_test_ids
229227
},
230228
'$inquire Element Support' => {
231229
'Submission of claims to the $inquire operation for must support validation' => inquiry_operation,
232-
"[USER INPUT VALIDATION] Inquiry Request Must Support'" \
233-
"\n#{' ' * 10}verifies_requirements " \
234-
"'hl7.fhir.us.davinci-pas_2.0.1@36" => inquiry_request_must_support_test_ids,
230+
"Inquiry Request Must Support\n#{' ' * 10}verifies_requirements 'hl7.fhir.us.davinci-pas_2.0.1@36'\n#{' ' * 10}simulation_verification" => inquiry_request_must_support_test_ids,
235231
'Inquiry Response Must Support' => inquiry_response_must_support_test_ids
236232
}
237233
}

lib/davinci_pas_test_kit/generator/templates/group.rb.erb

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,24 @@ module DaVinciPASTestKit
112112
- [PAS PractitionerRole](https://hl7.org/fhir/us/davinci-pas/STU2/StructureDefinition-profile-practitionerrole.html)
113113
)<% end %>
114114
run_as_group
115-
<% subgroup.each do |category, id_list| %>
116-
group do
117-
title '<%= category%>'
115+
<%- subgroup.each do |category, id_list| -%>
116+
<%-
117+
title_lines = category.to_s.split("\n").map(&:strip)
118+
s = " group do\n"
119+
s << " title '#{title_lines.shift.gsub("'","\\\\'")}'\n"
120+
title_lines.each do |extra|
121+
if extra.start_with?("verifies_requirements")
122+
s << " #{extra}\n"
123+
elsif extra == 'simulation_verification'
124+
s << " simulation_verification\n"
125+
else
126+
s << " #{extra}\n"
127+
end
128+
end
129+
s.rstrip!
130+
s << "\n"
131+
-%>
132+
<%= "\n" + s -%>
118133
<% id_list.each do |id|%>
119134
test from: :<%= id%><% if must_support_rename_input?(id) %> do
120135
id :<%= alt_test_id(id, use_case) %>

0 commit comments

Comments
 (0)