Class: Gitlab::Ci::Reports::TestReportSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/ci/reports/test_report_summary.rb

Instance Method Summary collapse

Constructor Details

#initialize(build_report_results) ⇒ TestReportSummary

Returns a new instance of TestReportSummary.


7
8
9
10
# File 'lib/gitlab/ci/reports/test_report_summary.rb', line 7

def initialize(build_report_results)
  @build_report_results = build_report_results
  @suite_summary = TestSuiteSummary.new(@build_report_results)
end

Instance Method Details

#test_suitesObject


16
17
18
19
20
# File 'lib/gitlab/ci/reports/test_report_summary.rb', line 16

def test_suites
  @build_report_results
    .group_by(&:tests_name)
    .transform_values { |results| TestSuiteSummary.new(results) }
end

#totalObject


12
13
14
# File 'lib/gitlab/ci/reports/test_report_summary.rb', line 12

def total
  @suite_summary.to_h
end