Class: TestCenter::Helper::XcodeJunit::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/test_center/helper/junit_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(junit_report_filepath) ⇒ Report

Returns a new instance of Report.



9
10
11
12
13
14
15
16
17
18
# File 'lib/fastlane/plugin/test_center/helper/junit_helper.rb', line 9

def initialize(junit_report_filepath)
  report_file = File.open(junit_report_filepath) { |f| REXML::Document.new(f) }
  FastlaneCore::UI.user_error!("Malformed XML test report file given") if report_file.root.nil?
  FastlaneCore::UI.user_error!("Valid XML file is not an Xcode test report") if report_file.get_elements('testsuites').empty?

  @testables = []
  report_file.elements.each('testsuites') do |testsuites_element|
    @testables << Testable.new(testsuites_element)
  end
end

Instance Method Details

#testablesObject



20
21
22
# File 'lib/fastlane/plugin/test_center/helper/junit_helper.rb', line 20

def testables
  return @testables
end