class Test::Unit::Collector::XML

Public Instance Methods

collect(xml_log_path) click to toggle source
# File test-unit-3.6.2/lib/test/unit/collector/xml.rb, line 21
def collect(xml_log_path)
  listener = Listener.new
  File.open(xml_log_path) do |xml_log|
    parser = REXML::Parsers::StreamParser.new(xml_log, listener)
    parser.parse
  end
  suite = TestSuite.new("tests in #{xml_log_path}")
  suites = listener.test_suites
  sort(suites).each {|s| add_suite(suite, s)}
  suite
end