package webtest

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Types and functions for running unit tests.

type output = {
  1. log : string list;
    (*

    The logging produced while running the tests.

    *)
  2. outcomes : Suite.outcome list;
    (*

    The results of running the tests.

    *)
}

The output generated by running a test.

type raw_summary = {
  1. total : int;
  2. errors : int;
  3. failures : int;
  4. passes : int;
  5. passed : bool;
}

Raw summary of test run with the total number of tests, and failed/passed tests.

type summary = {
  1. report : string;
    (*

    A report summarising the test results.

    *)
  2. passed : bool;
    (*

    A flag indicating whether all the tests passed.

    *)
}

A summary of a test run: short description of results plus a flag indicating whether all the tests passed.

val run : Suite.t -> (output -> unit) -> unit

run suite callback runs suite, passes the output to callback.

val summarise_raw : Suite.outcome list -> raw_summary

summarise outcomes converts a list of test outcomes into a raw summary.

val summary_of_raw : raw_summary -> summary

summary_of_raw creates a basic summary from a raw summary.

val summarise : Suite.outcome list -> summary

summarise outcomes converts a list of test outcomes into a summary.

OCaml

Innovation. Community. Security.