Evaluates one test case and classifies its outcome.
This module contains the evaluation semantics shared by the Mix task and
Tribunal.ExUnit. It does not invoke providers, aggregate a suite, format
reports, or interact with ExUnit.
Summary
Functions
Builds a failed case result when execution fails before assertions can run.
Evaluates all configured assertions for one populated test case.
Types
@type result() :: %{ input: term(), metadata: map() | nil, actual_output: term(), status: :passed | :failed, failures: [{atom() | String.t(), String.t()}], results: map(), evaluations: [assertion_result()], execution_error: boolean(), duration_ms: non_neg_integer() }
Functions
@spec error(Tribunal.TestCase.t(), term(), keyword()) :: result()
Builds a failed case result when execution fails before assertions can run.
@spec evaluate(Tribunal.TestCase.t(), list() | map(), keyword()) :: result()
Evaluates all configured assertions for one populated test case.
Default options are merged into each assertion, with assertion-specific options taking precedence. Missing output, missing assertions, assertion errors, and unexpected assertion results fail closed.