Class: Inferno::Entities::TestSuite
- Inherits:
-
Object
- Object
- Inferno::Entities::TestSuite
- Extended by:
- Forwardable, DSL::FHIRClient::ClassMethods, DSL::HTTPClient::ClassMethods, DSL::Runnable
- Includes:
- DSL::FHIRValidation
- Defined in:
- lib/inferno/entities/test_suite.rb
Overview
A TestSuite
represents a packaged group of tests, usually for a
single Implementation Guide
Instance Attribute Summary
Attributes included from DSL::Runnable
#parent, #suite_option_requirements
Class Method Summary collapse
-
.check_configuration(&block) ⇒ void
Provide a block which will verify any configuration needed for this test suite to operate properly.
-
.group ⇒ void
Add a child group.
-
.groups(options = nil) ⇒ Array<Inferno::Entities::TestGroup>
Get this suite’s child groups, filtered by suite options, if provided.
-
.links(links = nil) ⇒ Array<Hash>?
Set/get a list of links which are displayed in the footer of the UI.
-
.suite_option(identifier, **option_params) ⇒ void
Define an option for this suite.
-
.suite_options ⇒ Array<Inferno::DSL::SuiteOption>
The options defined for this suite.
-
.suite_summary(suite_summary = nil) ⇒ String?
Set/get a description which for this test suite which will be displayed in the UI.
-
.version(version = nil) ⇒ String?
Set/get the version of this test suite.
Methods included from DSL::Runnable
description, id, input_instructions, optional, optional?, required, required?, required_suite_options, resume_test_route, route, short_description, short_title, title
Methods included from DSL::FHIRClient::ClassMethods
Methods included from DSL::HTTPClient::ClassMethods
Methods included from DSL::FHIRValidation
#find_validator, #resource_is_valid?
Class Method Details
.check_configuration(&block) ⇒ void
This method returns an undefined value.
Provide a block which will verify any configuration needed for this test suite to operate properly.
99 100 101 |
# File 'lib/inferno/entities/test_suite.rb', line 99 def check_configuration(&block) @check_configuration_block = block end |
.group ⇒ void
This method returns an undefined value.
Add a child group
49 50 51 52 |
# File 'lib/inferno/entities/test_suite.rb', line 49 def group(...) () define_child(...) end |
.groups(options = nil) ⇒ Array<Inferno::Entities::TestGroup>
Get this suite’s child groups, filtered by suite options, if provided.
41 42 43 |
# File 'lib/inferno/entities/test_suite.rb', line 41 def groups( = nil) children().select { |child| child < Inferno::Entities::TestGroup } end |
.links(links = nil) ⇒ Array<Hash>?
Set/get a list of links which are displayed in the footer of the UI.
169 170 171 172 173 |
# File 'lib/inferno/entities/test_suite.rb', line 169 def links(links = nil) return @links if links.nil? @links = links end |
.suite_option(identifier, **option_params) ⇒ void
This method returns an undefined value.
Define an option for this suite. Options are used to define suite-wide configuration which is selected by a user at the start of a test session. These options can be used to change what tests/groups are run or behavior within particular tests.
141 142 143 |
# File 'lib/inferno/entities/test_suite.rb', line 141 def suite_option(identifier, **option_params) << DSL::SuiteOption.new(option_params.merge(id: identifier)) end |
.suite_options ⇒ Array<Inferno::DSL::SuiteOption>
Returns The options defined for this suite.
147 148 149 |
# File 'lib/inferno/entities/test_suite.rb', line 147 def @suite_options ||= [] end |
.suite_summary(suite_summary = nil) ⇒ String?
Set/get a description which for this test suite which will be displayed in the UI.
181 182 183 184 185 |
# File 'lib/inferno/entities/test_suite.rb', line 181 def suite_summary(suite_summary = nil) return @suite_summary if suite_summary.nil? @suite_summary = format_markdown(suite_summary) end |
.version(version = nil) ⇒ String?
Set/get the version of this test suite.
74 75 76 77 78 |
# File 'lib/inferno/entities/test_suite.rb', line 74 def version(version = nil) return @version if version.nil? @version = version end |