Class: Gitlab::QA::Report::TestResult
- Inherits:
-
Object
- Object
- Gitlab::QA::Report::TestResult
show all
- Defined in:
- lib/gitlab/qa/report/test_result.rb
Defined Under Namespace
Classes: JUnitTestResult, JsonTestResult
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(report) ⇒ TestResult
Returns a new instance of TestResult.
19
20
21
22
|
# File 'lib/gitlab/qa/report/test_result.rb', line 19
def initialize(report)
self.report = report
self.failures = failures_from_exceptions
end
|
Instance Attribute Details
#failures ⇒ Object
Returns the value of attribute failures.
17
18
19
|
# File 'lib/gitlab/qa/report/test_result.rb', line 17
def failures
@failures
end
|
#report ⇒ Object
Returns the value of attribute report.
17
18
19
|
# File 'lib/gitlab/qa/report/test_result.rb', line 17
def report
@report
end
|
Class Method Details
.from_json(report) ⇒ Object
9
10
11
|
# File 'lib/gitlab/qa/report/test_result.rb', line 9
def self.from_json(report)
JsonTestResult.new(report)
end
|
.from_junit(report) ⇒ Object
13
14
15
|
# File 'lib/gitlab/qa/report/test_result.rb', line 13
def self.from_junit(report)
JUnitTestResult.new(report)
end
|
Instance Method Details
#file ⇒ Object
32
33
34
|
# File 'lib/gitlab/qa/report/test_result.rb', line 32
def file
raise NotImplementedError
end
|
#name ⇒ Object
28
29
30
|
# File 'lib/gitlab/qa/report/test_result.rb', line 28
def name
raise NotImplementedError
end
|
#skipped ⇒ Object
36
37
38
|
# File 'lib/gitlab/qa/report/test_result.rb', line 36
def skipped
raise NotImplementedError
end
|
#stage ⇒ Object
24
25
26
|
# File 'lib/gitlab/qa/report/test_result.rb', line 24
def stage
@stage ||= file[%r{(?:api|browser_ui)/(?:(?:\d+_)?(\w+))}, 1]
end
|