/ Published in: Ruby
assuming you are standing in$HUDSON_HOME/jobs/job_foo/builds/123
Expand |
Embed | Plain Text
require 'nokogiri' d=Nokogiri::XML(open("#{ARGV[0]}/junitResult.xml")) suite = d.search('suite case') name_for_test = '' slowest = 0 def get_name el el.search('className').text + '::' + el.search('testName').text end def get_duration el el.search('duration').text.to_f end d.search('case').each {|el| t=get_duration(el); t > slowest && slowest = t; t >= slowest && name_for_test = get_name(el)} p name_for_test,slowest
You need to login to post a comment.
