Class: Publisher::Helpers::Summary
- Inherits:
-
Object
- Object
- Publisher::Helpers::Summary
- Defined in:
- lib/allure_report_publisher/lib/helpers/summary.rb
Overview
Test summary table generator
Constant Summary collapse
- BEHAVIORS =
"behaviors".freeze
- PACKAGES =
"packages".freeze
- SUITES =
"suites".freeze
- TOTAL =
"total".freeze
- MARKDOWN =
"markdown".freeze
- ASCII =
"ascii".freeze
Instance Method Summary collapse
-
#initialize(report_path, summary_type, table_type = ASCII, flaky_warning_status: false) ⇒ Summary
constructor
Summary table generator.
-
#status ⇒ String
Test run status emoji.
-
#table ⇒ String
Summary table.
Constructor Details
#initialize(report_path, summary_type, table_type = ASCII, flaky_warning_status: false) ⇒ Summary
Summary table generator
21 22 23 24 25 26 |
# File 'lib/allure_report_publisher/lib/helpers/summary.rb', line 21 def initialize(report_path, summary_type, table_type = ASCII, flaky_warning_status: false) @report_path = report_path @summary_type = summary_type || TOTAL @table_type = table_type @flaky_warning_status = flaky_warning_status end |
Instance Method Details
#status ⇒ String
Test run status emoji
50 51 52 |
# File 'lib/allure_report_publisher/lib/helpers/summary.rb', line 50 def status short_summary.last end |
#table ⇒ String
Summary table
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/allure_report_publisher/lib/helpers/summary.rb', line 31 def table summary = if summary_type == TOTAL terminal_table { |table| table << short_summary } else terminal_table do |table| .each { |row| table << row } table << :separator table << short_summary end end return summary.to_s if markdown? "```markdown\n#{summary}\n```" end |