Class: GitlabQuality::TestTooling::TestResults::BaseTestResults

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/gitlab_quality/test_tooling/test_results/base_test_results.rb

Direct Known Subclasses

JUnitTestResults, JsonTestResults

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, token: nil, project: nil, ref: 'master') ⇒ BaseTestResults

Returns a new instance of BaseTestResults.



11
12
13
14
15
16
17
18
# File 'lib/gitlab_quality/test_tooling/test_results/base_test_results.rb', line 11

def initialize(path:, token: nil, project: nil, ref: 'master')
  @path = path
  @token = token
  @project = project
  @ref = ref
  @results = parse
  @testcases = process
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/gitlab_quality/test_tooling/test_results/base_test_results.rb', line 9

def path
  @path
end

Instance Method Details

#each(&block) ⇒ Object



20
21
22
# File 'lib/gitlab_quality/test_tooling/test_results/base_test_results.rb', line 20

def each(&block)
  testcases.each(&block)
end

#writeObject

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/gitlab_quality/test_tooling/test_results/base_test_results.rb', line 24

def write
  raise NotImplementedError
end