Class: Allure::Config
- Inherits:
-
Object
- Object
- Allure::Config
- Includes:
- Singleton
- Defined in:
- lib/allure_ruby_commons/config.rb
Overview
Allure configuration class
Constant Summary collapse
- LOGLEVELS =
Returns valid log levels.
%w[DEBUG INFO WARN ERROR FATAL UNKNOWN].freeze
- TESTPLAN_PATH =
Returns test plan path env var name.
"ALLURE_TESTPLAN_PATH"
Instance Attribute Summary collapse
-
#clean_results_directory ⇒ Object
Returns the value of attribute clean_results_directory.
-
#link_issue_pattern ⇒ Object
Returns the value of attribute link_issue_pattern.
-
#link_tms_pattern ⇒ Object
Returns the value of attribute link_tms_pattern.
-
#logging_level ⇒ Object
Returns the value of attribute logging_level.
-
#results_directory ⇒ Object
Returns the value of attribute results_directory.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#test_ids ⇒ Array
Allure id’s of executable tests.
-
#test_names ⇒ Array
Test names of executable tests.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
18 19 20 21 |
# File 'lib/allure_ruby_commons/config.rb', line 18 def initialize @results_directory = "reports/allure-results" @logging_level = LOGLEVELS.index(ENV.fetch("ALLURE_LOG_LEVEL", "INFO")) || Logger::INFO end |
Instance Attribute Details
#clean_results_directory ⇒ Object
Returns the value of attribute clean_results_directory.
16 17 18 |
# File 'lib/allure_ruby_commons/config.rb', line 16 def clean_results_directory @clean_results_directory end |
#link_issue_pattern ⇒ Object
Returns the value of attribute link_issue_pattern.
16 17 18 |
# File 'lib/allure_ruby_commons/config.rb', line 16 def link_issue_pattern @link_issue_pattern end |
#link_tms_pattern ⇒ Object
Returns the value of attribute link_tms_pattern.
16 17 18 |
# File 'lib/allure_ruby_commons/config.rb', line 16 def link_tms_pattern @link_tms_pattern end |
#logging_level ⇒ Object
Returns the value of attribute logging_level.
16 17 18 |
# File 'lib/allure_ruby_commons/config.rb', line 16 def logging_level @logging_level end |
#results_directory ⇒ Object
Returns the value of attribute results_directory.
16 17 18 |
# File 'lib/allure_ruby_commons/config.rb', line 16 def results_directory @results_directory end |
Instance Method Details
#test_ids ⇒ Array
Allure id’s of executable tests
26 27 28 |
# File 'lib/allure_ruby_commons/config.rb', line 26 def test_ids @test_ids ||= tests&.map { |test| test[:id] } end |
#test_names ⇒ Array
Test names of executable tests
33 34 35 |
# File 'lib/allure_ruby_commons/config.rb', line 33 def test_names @test_names ||= tests&.map { |test| test[:selector] } end |