Class: Gitlab::QA::Report::TestResult::JsonTestResult

Inherits:
Gitlab::QA::Report::TestResult show all
Defined in:
lib/gitlab/qa/report/test_result.rb

Instance Attribute Summary

Attributes inherited from Gitlab::QA::Report::TestResult

#failures, #report

Instance Method Summary collapse

Methods inherited from Gitlab::QA::Report::TestResult

from_json, from_junit, #initialize, #stage

Constructor Details

This class inherits a constructor from Gitlab::QA::Report::TestResult

Instance Method Details

#ci_job_urlObject



59
60
61
# File 'lib/gitlab/qa/report/test_result.rb', line 59

def ci_job_url
  report['ci_job_url']
end

#failure_issueObject



75
76
77
# File 'lib/gitlab/qa/report/test_result.rb', line 75

def failure_issue
  report['failure_issue']
end

#failure_issue=(new_failure_issue) ⇒ Object



79
80
81
# File 'lib/gitlab/qa/report/test_result.rb', line 79

def failure_issue=(new_failure_issue)
  report['failure_issue'] = new_failure_issue
end

#fileObject



51
52
53
# File 'lib/gitlab/qa/report/test_result.rb', line 51

def file
  report['file_path']
end

#nameObject



47
48
49
# File 'lib/gitlab/qa/report/test_result.rb', line 47

def name
  report['full_description']
end

#quarantine?Boolean

Returns:

  • (Boolean)


83
84
85
86
87
88
# File 'lib/gitlab/qa/report/test_result.rb', line 83

def quarantine?
  # The value for 'quarantine' could be nil, a hash, a string,
  # or true (if the test just has the :quarantine tag)
  # But any non-nil or false value should means the test is in quarantine
  report['quarantine'].present?
end

#skippedObject



63
64
65
# File 'lib/gitlab/qa/report/test_result.rb', line 63

def skipped
  status == 'pending'
end

#statusObject



55
56
57
# File 'lib/gitlab/qa/report/test_result.rb', line 55

def status
  report['status']
end

#testcaseObject



67
68
69
# File 'lib/gitlab/qa/report/test_result.rb', line 67

def testcase
  report['testcase']
end

#testcase=(new_testcase) ⇒ Object



71
72
73
# File 'lib/gitlab/qa/report/test_result.rb', line 71

def testcase=(new_testcase)
  report['testcase'] = new_testcase
end