Renders evaluation reports for people and CI systems.
The built-in reporter names are :console, :json, :junit, and
:github. A custom module can also be passed directly when it implements
this module's callback.
{:ok, output} = Aludel.Evals.Reporter.render(suite_run, :junit)Reporter options are passed to the selected implementation. The JSON
reporter, for example, accepts pretty: true.
Summary
Types
A stable error returned before or while rendering a report.
A built-in reporter name or a custom reporter module.
Functions
Renders a suite run with a built-in or custom reporter.
Renders a report and raises ArgumentError when rendering fails.
Types
@type error() :: :unknown_reporter | :invalid_reporter_output
A stable error returned before or while rendering a report.
@type reporter() :: :console | :json | :junit | :github | module()
A built-in reporter name or a custom reporter module.
Callbacks
@callback render( Aludel.Evals.Report.t(), keyword() ) :: {:ok, iodata()} | {:error, term()}
Functions
@spec render( Aludel.Evals.SuiteRun.t() | Aludel.Evals.Report.t(), reporter(), keyword() ) :: {:ok, String.t()} | {:error, error() | term()}
Renders a suite run with a built-in or custom reporter.
@spec render!( Aludel.Evals.SuiteRun.t() | Aludel.Evals.Report.t(), reporter(), keyword() ) :: String.t()
Renders a report and raises ArgumentError when rendering fails.