Class: JunitModel::TestSuite

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/junit_model/models.rb

Overview

A TestSuite belongs to a TestGroup and has an array of TestCase

Instance Method Summary collapse

Instance Method Details

#failed_test_casesObject



46
47
48
# File 'lib/junit_model/models.rb', line 46

def failed_test_cases
  test_cases.reject(&:passed?)
end

#failures_countObject Also known as: failure_count



34
35
36
# File 'lib/junit_model/models.rb', line 34

def failures_count
  failures.to_i
end

#passed?Boolean Also known as: passed

Returns:

  • (Boolean)


38
39
40
# File 'lib/junit_model/models.rb', line 38

def passed?
  failures == '0'
end

#passed_test_casesObject



50
51
52
# File 'lib/junit_model/models.rb', line 50

def passed_test_cases
  test_cases.select(&:passed?)
end

#test_casesObject



42
43
44
# File 'lib/junit_model/models.rb', line 42

def test_cases
  testcase
end

#test_countObject



30
31
32
# File 'lib/junit_model/models.rb', line 30

def test_count
  tests.to_i
end