Class: Rubotium::TestResult

Inherits:
Object
  • Object
show all
Defined in:
lib/rubotium/test_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test_results_parser, runnable_test) ⇒ TestResult

Returns a new instance of TestResult.



6
7
8
9
10
# File 'lib/rubotium/test_result.rb', line 6

def initialize(test_results_parser, runnable_test)
  @parsed_result  = test_results_parser
  @class_name     = runnable_test.package_name
  @test_name      = runnable_test.test_name
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



4
5
6
# File 'lib/rubotium/test_result.rb', line 4

def class_name
  @class_name
end

#deviceObject (readonly)

Returns the value of attribute device.



4
5
6
# File 'lib/rubotium/test_result.rb', line 4

def device
  @device
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



4
5
6
# File 'lib/rubotium/test_result.rb', line 4

def error_message
  @error_message
end

#stack_traceObject (readonly)

Returns the value of attribute stack_trace.



4
5
6
# File 'lib/rubotium/test_result.rb', line 4

def stack_trace
  @stack_trace
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/rubotium/test_result.rb', line 4

def status
  @status
end

#test_nameObject (readonly)

Returns the value of attribute test_name.



4
5
6
# File 'lib/rubotium/test_result.rb', line 4

def test_name
  @test_name
end

#timeObject (readonly)

Returns the value of attribute time.



4
5
6
# File 'lib/rubotium/test_result.rb', line 4

def time
  @time
end

Instance Method Details

#errored?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/rubotium/test_result.rb', line 32

def errored?
  failed_run? || test_case.errored?
end

#failed?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/rubotium/test_result.rb', line 24

def failed?
  failed_run? || test_case.failed?
end

#nameObject



12
13
14
# File 'lib/rubotium/test_result.rb', line 12

def name
  "#{class_name}##{test_name}"
end

#passed?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/rubotium/test_result.rb', line 28

def passed?
  not failed_run? and test_case.passed?
end