Sha256: 3ef4dc0d5080a3028c3f6c9c4784fba946ca5bd9d8ef1befea16cedf656fb56b

Contents?: true

Size: 811 Bytes

Versions: 15

Compression:

Stored size: 811 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'] || Fastlane::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

15 entries across 15 versions & 1 rubygems

Version Path
fastlane-1.111.0 lib/fastlane/junit_generator.rb
fastlane-1.110.0 lib/fastlane/junit_generator.rb
fastlane-1.109.0 lib/fastlane/junit_generator.rb
fastlane-1.108.0 lib/fastlane/junit_generator.rb
fastlane-1.107.0 lib/fastlane/junit_generator.rb
fastlane-1.106.2 lib/fastlane/junit_generator.rb
fastlane-1.106.1 lib/fastlane/junit_generator.rb
fastlane-1.106.0 lib/fastlane/junit_generator.rb
fastlane-1.105.3 lib/fastlane/junit_generator.rb
fastlane-1.105.2 lib/fastlane/junit_generator.rb
fastlane-1.105.1 lib/fastlane/junit_generator.rb
fastlane-1.105.0 lib/fastlane/junit_generator.rb
fastlane-1.104.0 lib/fastlane/junit_generator.rb
fastlane-1.103.0 lib/fastlane/junit_generator.rb
fastlane-1.102.0 lib/fastlane/junit_generator.rb