Class: TestCenter::Helper::XcodeJunit::TestSuite

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/test_center/helper/junit_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(xml_element) ⇒ TestSuite

Returns a new instance of TestSuite.



44
45
46
47
48
49
50
# File 'lib/fastlane/plugin/test_center/helper/junit_helper.rb', line 44

def initialize(xml_element)
  @root = xml_element
  @testcases = []
  @root.elements.each('testcase') do |testcase_element|
    @testcases << TestCase.new(testcase_element)
  end
end

Instance Method Details

#identifierObject



56
57
58
# File 'lib/fastlane/plugin/test_center/helper/junit_helper.rb', line 56

def identifier
  name.testsuite
end

#is_swift?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/fastlane/plugin/test_center/helper/junit_helper.rb', line 60

def is_swift?
  return name.include?('.')
end

#nameObject



52
53
54
# File 'lib/fastlane/plugin/test_center/helper/junit_helper.rb', line 52

def name
  return @root.attribute('name').value
end

#testcasesObject



64
65
66
# File 'lib/fastlane/plugin/test_center/helper/junit_helper.rb', line 64

def testcases
  return @testcases
end