Class: Jenkins::Build::TestReport::Case

Inherits:
Object
  • Object
show all
Defined in:
lib/jenkins/build/test_report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test, status, stack_trace) ⇒ Case

Returns a new instance of Case.



60
61
62
63
64
# File 'lib/jenkins/build/test_report.rb', line 60

def initialize(test, status, stack_trace)
  @test = test
  @status = status
  @stack_trace = stack_trace
end

Instance Attribute Details

#stack_traceObject (readonly)

Returns the value of attribute stack_trace.



58
59
60
# File 'lib/jenkins/build/test_report.rb', line 58

def stack_trace
  @stack_trace
end

#statusObject (readonly)

Returns the value of attribute status.



58
59
60
# File 'lib/jenkins/build/test_report.rb', line 58

def status
  @status
end

Instance Method Details

#cause(path) ⇒ Object



70
71
72
# File 'lib/jenkins/build/test_report.rb', line 70

def cause(path)
  stack_trace.cause(path)
end

#failure?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/jenkins/build/test_report.rb', line 66

def failure?
  status.failure?
end

#project_pathObject



74
75
76
77
# File 'lib/jenkins/build/test_report.rb', line 74

def project_path
  path = stack_trace.root_path
  path.empty? ? nil : path
end