Class: DaVinciCRDTestKit::V221::ClientPrefetchCompleteAndSubsetTest
- Inherits:
-
Inferno::Test
- Object
- Inferno::Test
- DaVinciCRDTestKit::V221::ClientPrefetchCompleteAndSubsetTest
- Includes:
- TaggedRequestLoadHelper
- Defined in:
- lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_prefetch_complete_and_subset_test.rb
Constant Summary
Constants included from TaggedRequestLoadHelper
TaggedRequestLoadHelper::ALL_HOOKS
Instance Method Summary collapse
- #check_for_demonstration(requests, completeness_tests, target_name) ⇒ Object
- #find_completeness_tests ⇒ Object
Methods included from TaggedRequestLoadHelper
#crd_test_group, #hook_name, #load_hook_requests, #requests_to_analyze, #tags_to_load
Instance Method Details
#check_for_demonstration(requests, completeness_tests, target_name) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_prefetch_complete_and_subset_test.rb', line 73 def check_for_demonstration(requests, completeness_tests, target_name) unless requests.present? ('error', "No requests made to the service endpoint requesting #{target_name} prefetch data.") return end results_repo = Inferno::Repositories::Results.new results = results_repo.current_results_for_test_session_and_runnables(test_session_id, completeness_tests) output_name = if target_name == :subset 'demonstrates_prefetch_subset_distinct_from_complete' else 'demonstrates_prefetch_complete_distinct_from_subset' end demonstrated = results.any? do |result| result.outputs.any? do |output| output['name'] == output_name && output['value'] == 'true' end end return if demonstrated ('error', "Requests made to the service endpoint requesting #{target_name} prefetch data " \ 'did not demonstrate a difference between the two levels of prefetch data.') end |
#find_completeness_tests ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/davinci_crd_test_kit/client/v2.2.1/cross_hook/client_prefetch_complete_and_subset_test.rb', line 62 def find_completeness_tests hooks_group = self.class.parent.parent.groups.find do |group| group.id.to_s.include?('crd_v221_client_hooks') end hooks_group.groups.map do |group| group.groups.flat_map(&:tests).find do |test| test.id.to_s.include?('crd_v221_hook_request_prefetch_complete') end end.compact end |