Class: TestIds::Report

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/qat/tasks/tags/test_ids/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.



11
12
13
14
# File 'lib/qat/tasks/tags/test_ids/report.rb', line 11

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

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



9
10
11
# File 'lib/qat/tasks/tags/test_ids/report.rb', line 9

def content
  @content
end

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/qat/tasks/tags/test_ids/report.rb', line 9

def path
  @path
end

Instance Method Details

#duplicateObject

Returns the report duplicate test id information



32
33
34
# File 'lib/qat/tasks/tags/test_ids/report.rb', line 32

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

#mappingObject

Returns the report test id mapping to scenarios information



27
28
29
# File 'lib/qat/tasks/tags/test_ids/report.rb', line 27

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

#max_idObject

Returns the report max test id



17
18
19
# File 'lib/qat/tasks/tags/test_ids/report.rb', line 17

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

#tag_untagged!Object

Tags all untagged scenario with a test id



37
38
39
# File 'lib/qat/tasks/tags/test_ids/report.rb', line 37

def tag_untagged!
  tag_untagged(self)
end

#untaggedObject

Returns the report untagged tests information



22
23
24
# File 'lib/qat/tasks/tags/test_ids/report.rb', line 22

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