Class: QAT::Reporter::Xray::Tests::Report

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/qat/reporter/xray/tasks/tests/report.rb

Overview

the test id report wrapper

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#tag_untagged

Constructor Details

#initialize(path) ⇒ Report

Returns a new instance of Report.



14
15
16
17
# File 'lib/qat/reporter/xray/tasks/tests/report.rb', line 14

def initialize(path)
  @path    = path
  @content = JSON.parse(File.read(path))
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



12
13
14
# File 'lib/qat/reporter/xray/tasks/tests/report.rb', line 12

def content
  @content
end

#pathObject (readonly)

Returns the value of attribute path.



12
13
14
# File 'lib/qat/reporter/xray/tasks/tests/report.rb', line 12

def path
  @path
end

Instance Method Details

#duplicateObject

Returns the report duplicate test id information



35
36
37
# File 'lib/qat/reporter/xray/tasks/tests/report.rb', line 35

def duplicate
  @duplicate ||= @content['duplicate']
end

#mappingObject

Returns the report test id mapping to scenarios information



30
31
32
# File 'lib/qat/reporter/xray/tasks/tests/report.rb', line 30

def mapping
  @mapping ||= @content['mapping']
end

#max_idObject

Returns the report max test id



20
21
22
# File 'lib/qat/reporter/xray/tasks/tests/report.rb', line 20

def max_id
  @max_id ||= @content['max']
end

#tag_untagged!Object

Tags all untagged scenario with a test id



40
41
42
# File 'lib/qat/reporter/xray/tasks/tests/report.rb', line 40

def tag_untagged!
  tag_untagged(self)
end

#untaggedObject

Returns the report untagged tests information



25
26
27
# File 'lib/qat/reporter/xray/tasks/tests/report.rb', line 25

def untagged
  @untagged ||= @content['untagged']
end