Module: Henitai::Reporter
- Defined in:
- lib/henitai/reporter.rb
Overview
Namespace for result reporters.
Each reporter receives a Result object and writes output in its specific format. Reporters are selected via ‘reporters:` in .henitai.yml.
Built-in reporters:
terminal — coloured summary table to STDOUT
json — mutation-testing-report-schema JSON file
html — self-contained HTML using mutation-testing-elements web component
dashboard — POST to Stryker Dashboard REST API
Defined Under Namespace
Classes: Base, Dashboard, Html, Json, Terminal
Class Method Summary collapse
Class Method Details
.reporter_class(name) ⇒ Object
31 32 33 34 35 |
# File 'lib/henitai/reporter.rb', line 31 def self.reporter_class(name) const_get(name.capitalize) rescue NameError raise ArgumentError, "Unknown reporter: #{name}. Valid reporters: terminal, json, html, dashboard" end |
.run_all(names:, result:, config:) ⇒ Object
25 26 27 28 29 |
# File 'lib/henitai/reporter.rb', line 25 def self.run_all(names:, result:, config:) names.each do |name| reporter_class(name).new(config:).report(result) end end |