class TestCenter::Helper::XcodeJunit::Report

Public Class Methods

new(junit_report_filepath) click to toggle source
# 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

Public Instance Methods

testables() click to toggle source
# File lib/fastlane/plugin/test_center/helper/junit_helper.rb, line 20
def testables
  return @testables
end