Class: Inferno::Entities::TestGroup
- Inherits:
- 
      Object
      
        - Object
- Inferno::Entities::TestGroup
 
- Extended by:
- Forwardable, DSL::FHIRClient::ClassMethods, DSL::HTTPClient::ClassMethods, DSL::Runnable
- Includes:
- DSL::Assertions, DSL::FHIRValidation, DSL::FhirpathEvaluation, DSL::Messages, DSL::Results
- Defined in:
- lib/inferno/entities/test_group.rb
Instance Attribute Summary collapse
- 
  
    
      #result_message  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute result_message. 
- 
  
    
      #results  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute results. 
Attributes included from DSL::Runnable
#parent, #suite_option_requirements
Class Method Summary collapse
- 
  
    
      .group  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Add a child group. 
- 
  
    
      .groups(options = nil)  ⇒ Array<Inferno::Entities::TestGroup> 
    
    
  
  
  
  
  
  
  
  
  
    Get this group’s child groups, filtered by suite options, if provided. 
- 
  
    
      .run_as_group(value = true)  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    When true, this group’s children can not be run individually in the UI, and this group must be run as a group. 
- 
  
    
      .run_as_group?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    
- 
  
    
      .short_id(new_short_id = nil)  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    A short numeric id which is displayed in the UI. 
- 
  
    
      .test  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Add a test. 
- 
  
    
      .tests(options = nil)  ⇒ Array<Inferno::Entities::Test> 
    
    
  
  
  
  
  
  
  
  
  
    Get this group’s child tests, filtered by suite options, if provided. 
Methods included from DSL::FHIRClient::ClassMethods
fhir_client, find_fhir_client_definition
Methods included from DSL::HTTPClient::ClassMethods
find_http_client_definition, http_client
Methods included from DSL::Runnable
block, database_id, deep_dup, description, id, input_instructions, optional, optional?, remove, reorder, replace, required, required?, required_suite_options, resume_test_route, route, short_description, short_title, suite_endpoint, title, verifies_requirements
Methods included from DSL::Messages
Methods included from DSL::Assertions
#assert, #assert_must_support_elements_present, #assert_resource_type, #assert_response_content_type, #assert_response_status, #assert_valid_bundle_entries, #assert_valid_http_uri, #assert_valid_json, #assert_valid_resource
Methods included from DSL::Results
#omit, #omit_if, #pass, #pass_if, #skip, #skip_if, #wait
Methods included from DSL::FhirpathEvaluation
Methods included from DSL::FHIRValidation
#find_validator, #resource_is_valid?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
| 28 29 30 31 32 33 34 35 | # File 'lib/inferno/entities/test_group.rb', line 28 def method_missing(name, ...) parent_instance = self.class.parent&.new if parent_instance.respond_to?(name) parent_instance.send(name, ...) else super end end | 
Instance Attribute Details
#result_message ⇒ Object
Returns the value of attribute result_message.
| 20 21 22 | # File 'lib/inferno/entities/test_group.rb', line 20 def @result_message end | 
#results ⇒ Object
Returns the value of attribute results.
| 20 21 22 | # File 'lib/inferno/entities/test_group.rb', line 20 def results @results end | 
Class Method Details
.group ⇒ void
This method returns an undefined value.
Add a child group
| 70 71 72 73 | # File 'lib/inferno/entities/test_group.rb', line 70 def group(...) () define_child(...) end | 
.groups(options = nil) ⇒ Array<Inferno::Entities::TestGroup>
Get this group’s child groups, filtered by suite options, if provided.
| 53 54 55 | # File 'lib/inferno/entities/test_group.rb', line 53 def groups( = nil) children().select { |child| child < Inferno::Entities::TestGroup } end | 
.run_as_group(value = true) ⇒ void
This method returns an undefined value.
When true, this group’s children can not be run individually in the UI, and this group must be run as a group.
| 129 130 131 | # File 'lib/inferno/entities/test_group.rb', line 129 def run_as_group(value = true) # rubocop:disable Style/OptionalBooleanParameter @run_as_group = value end | 
.run_as_group? ⇒ Boolean
| 134 135 136 | # File 'lib/inferno/entities/test_group.rb', line 134 def run_as_group? @run_as_group || false end | 
.short_id(new_short_id = nil) ⇒ String
Returns A short numeric id which is displayed in the UI.
| 99 100 101 102 103 104 105 106 107 | # File 'lib/inferno/entities/test_group.rb', line 99 def short_id(new_short_id = nil) return @short_id = new_short_id if new_short_id @short_id ||= begin prefix = parent.respond_to?(:short_id) ? "#{parent.short_id}." : '' suffix = parent ? (parent.groups.find_index(self) + 1).to_s : 'X' "#{prefix}#{suffix}" end end | 
.test ⇒ void
This method returns an undefined value.
Add a test
| 77 78 79 80 | # File 'lib/inferno/entities/test_group.rb', line 77 def test(...) () define_child(...) end | 
.tests(options = nil) ⇒ Array<Inferno::Entities::Test>
Get this group’s child tests, filtered by suite options, if provided.
| 62 63 64 | # File 'lib/inferno/entities/test_group.rb', line 62 def tests( = nil) children().select { |child| child < Inferno::Entities::Test } end |