Class: TestProf::Autopilot::TagProf::Writer

Inherits:
ReportWriter show all
Defined in:
lib/test_prof/autopilot/tag_prof/writer.rb

Overview

Class is used for writing :tag_prof report in different formats

Constant Summary collapse

ARTIFACT_FILE =
"tag_prof_report"

Instance Attribute Summary

Attributes inherited from ReportWriter

#report

Instance Method Summary collapse

Methods inherited from ReportWriter

#initialize, #write, write_report

Methods included from Logging

log

Constructor Details

This class inherits a constructor from TestProf::Autopilot::ReportWriter

Instance Method Details

#generate_htmlObject



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/test_prof/autopilot/tag_prof/writer.rb', line 19

def generate_html
  path = TestProf::Utils::HTMLBuilder.generate(
    data: report.result,
    template: TestProf::TagProf::Printers::HTML::TEMPLATE,
    output: TestProf::TagProf::Printers::HTML::OUTPUT_NAME
  )

  File.read(path).tap do
    FileUtils.rm(path)
  end
end

#generate_jsonObject



15
16
17
# File 'lib/test_prof/autopilot/tag_prof/writer.rb', line 15

def generate_json
  report.result.to_json
end