Cucumberex.Formatter behaviour (cucumberex v0.2.1)

Copy Markdown View Source

Formatter behaviour for Cucumberex.

Formatters are GenServers. The Events.Bus dispatches events via GenServer.cast(pid, {:event, event}). Implement private on_event/2 clauses to handle each event type and update state.

The runner calls GenServer.call(pid, :finish) after TestRunFinished to synchronously drain the formatter before the process exits.

Summary

Callbacks

start_link(opts)

@callback start_link(opts :: keyword()) :: {:ok, pid()} | {:error, any()}