Class: QAT::Reporter::Xray::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/qat/reporter/xray/issue.rb

Overview

QAT::Reporter::Xray::Issue represents an abstract Xray issue

Direct Known Subclasses

Test, TestExecution

Defined Under Namespace

Classes: InvalidIssueType, PublisherNotKnownError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jira_id = nil) ⇒ Issue

Initializes Xray Publisher url and login information



13
14
15
16
17
18
# File 'lib/qat/reporter/xray/issue.rb', line 13

def initialize(jira_id = nil)
  @jira_id = jira_id
  if jira_id
    raise(InvalidIssueType, "The given issue '#{jira_id}' type does not correspond!") unless valid_test_execution?
  end
end

Instance Attribute Details

#jira_idObject (readonly)

Returns the value of attribute jira_id.



10
11
12
# File 'lib/qat/reporter/xray/issue.rb', line 10

def jira_id
  @jira_id
end

Instance Method Details

#create(data) ⇒ Object

Creates a issue



21
22
23
# File 'lib/qat/reporter/xray/issue.rb', line 21

def create(data)
  QAT::Reporter::Xray::Config.publisher.create_issue(data)
end