Method: FastlaneCore::TestParser#initialize

Defined in:
fastlane_core/lib/fastlane_core/test_parser.rb

#initialize(path) ⇒ TestParser

Returns a new instance of TestParser.



16
17
18
19
20
21
22
23
24
25
26
# File 'fastlane_core/lib/fastlane_core/test_parser.rb', line 16

def initialize(path)
  path = File.expand_path(path)
  UI.user_error!("File not found at path '#{path}'") unless File.exist?(path)

  self.file_content = File.read(path)
  self.raw_json = Plist.parse_xml(self.file_content)
  return if self.raw_json["FormatVersion"].to_s.length.zero? # maybe that's a useless plist file

  ensure_file_valid!
  parse_content
end