garanti/shared/describer

Types

The running totals accumulated while reporting a sequence of suite results.

pub type ReportTotals {
  ReportTotals(
    total_tests: Int,
    total_failures: Int,
    failures: List(#(String, garanti.TestResult)),
  )
}

Constructors

  • ReportTotals(
      total_tests: Int,
      total_failures: Int,
      failures: List(#(String, garanti.TestResult)),
    )

    Arguments

    total_tests

    The total number of tests processed (so far).

    total_failures

    The total number of failures processed (so far).

    failures

    All failures colleted (so far).

Values

pub fn failures_summary(
  failures: List(#(String, garanti.TestResult)),
) -> List(report.Message)

Summarize the failing tests by listing the suite, test and failures. No passing tests is included in the summary.

pub fn run_summary(
  total_tests: Int,
  total_failures: Int,
) -> report.Message
pub fn suite_result_report(
  acc: ReportTotals,
  suite_result: garanti.SuiteResult,
) -> #(List(report.Message), ReportTotals)

Get the messages to report for the given suite result as well as an updated accumulator that tracks the total number of tests and failures.

pub fn suite_results(
  suite_name: String,
  results: List(garanti.TestResult),
) -> List(report.Message)

Describe the test suite results where the first element in the returned list is the suite’s overall results. The remaining lines are the results for each test.

Search Document