Wednesday, September 8, 2010

CI_Reporter - How to add date on result file filename

First, locate report_manager.rb. This is usually located on the installation folder ex. C:\ruby\lib\ruby\gems\1.8\gems\ci_reporter-1.6.0\lib\ci\reporter\report_manager.rb. Then edit this portion of the code.

def write_report(suite)
  File.open("#{@basename}-#{suite.name.gsub(/[^a-zA-Z0-9]+/, '-')}--
  #{Time.now.strftime("%m-%d-%Y--%H-%m")}.xml", "w") do |f|
    f << suite.to_xml
  end
 end


No comments:

Post a Comment