Sha256: cbbf77c1573b8cd9c2ea20d687589b45af80ffac1e50752193b4f2e010277c51

Contents?: true

Size: 815 Bytes

Versions: 247

Compression:

Stored size: 815 Bytes

Contents

module Fastlane
  class JUnitGenerator
    def self.generate(results)
      # JUnit file documentation: http://llg.cubic.org/docs/junit/
      # And http://nelsonwells.net/2012/09/how-jenkins-ci-parses-and-displays-junit-output/
      # And http://windyroad.com.au/dl/Open%20Source/JUnit.xsd

      containing_folder = ENV['FL_REPORT_PATH'] || FastlaneCore::FastlaneFolder.path || Dir.pwd
      path = File.join(containing_folder, 'report.xml')

      @steps = results
      xml_path = File.join(Fastlane::ROOT, "lib/assets/report_template.xml.erb")
      xml = ERB.new(File.read(xml_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system

      xml = xml.gsub('system_', 'system-').delete("\e") # Jenkins can not parse 'ESC' symbol

      File.write(path, xml)

      return path
    end
  end
end

Version data entries

247 entries across 247 versions & 1 rubygems

Version Path
fastlane-2.48.0.beta.20170724010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.48.0.beta.20170723010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.48.0.beta.20170722010002 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.48.0.beta.20170721010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.48.0.beta.20170720010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.48.0.beta.20170719010002 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.48.0.beta.20170718010002 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.47.0 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.47.0.beta.20170717010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.47.0.beta.20170716010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.47.0.beta.20170715010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.47.0.beta.20170714010002 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.47.0.beta.20170713010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.46.1 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.47.0.beta.20170712010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.47.0.beta.20170711010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.46.0 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.46.0.beta.20170710010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.46.0.beta.20170709010003 fastlane/lib/fastlane/junit_generator.rb
fastlane-2.46.0.beta.20170708010003 fastlane/lib/fastlane/junit_generator.rb