Class: JmlTestRunner::Suite

Inherits:
Object
  • Object
show all
Defined in:
lib/jml_test_runner/suite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ Suite

Returns a new instance of Suite.



8
9
10
11
12
13
# File 'lib/jml_test_runner/suite.rb', line 8

def initialize(raw)
  @raw_input = Hash.from_xml(raw)
  @tests = []
  return unless @raw_input['testsuites']
  parse_raw_xml
end

Instance Attribute Details

#raw_inputObject (readonly)

Returns the value of attribute raw_input.



7
8
9
# File 'lib/jml_test_runner/suite.rb', line 7

def raw_input
  @raw_input
end

#testsObject (readonly)

Returns the value of attribute tests.



7
8
9
# File 'lib/jml_test_runner/suite.rb', line 7

def tests
  @tests
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



7
8
9
# File 'lib/jml_test_runner/suite.rb', line 7

def timestamp
  @timestamp
end

#titleObject (readonly)

Returns the value of attribute title.



7
8
9
# File 'lib/jml_test_runner/suite.rb', line 7

def title
  @title
end

Instance Method Details

#countObject



27
28
29
# File 'lib/jml_test_runner/suite.rb', line 27

def count
  @tests.count
end

#error_countObject



23
24
25
# File 'lib/jml_test_runner/suite.rb', line 23

def error_count
  @tests.count { |t| t.result == :error }
end

#failure_countObject



15
16
17
# File 'lib/jml_test_runner/suite.rb', line 15

def failure_count
  @tests.count { |t| t.result == :failure }
end

#pass_countObject



19
20
21
# File 'lib/jml_test_runner/suite.rb', line 19

def pass_count
  @tests.count { |t| t.result == :success }
end