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

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

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

#write(path) ⇒ Object



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

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

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