Class: Gitlab::QA::Report::JsonTestResults

Inherits:
BaseTestResults show all
Defined in:
lib/gitlab/qa/report/json_test_results.rb

Instance Attribute Summary

Attributes inherited from BaseTestResults

#path

Instance Method Summary collapse

Methods inherited from BaseTestResults

#each, #initialize

Constructor Details

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

Instance Method Details

#writeObject



9
10
11
12
13
# File 'lib/gitlab/qa/report/json_test_results.rb', line 9

def write
  json = results.merge('examples' => testcases.map(&:report))

  File.write(path, JSON.pretty_generate(json))
end