HUnit-Plus-0.3.0: A test framework building on HUnit.

Safe HaskellNone
LanguageHaskell2010

Test.HUnitPlus.Execution

Description

Functions for executing test cases, test paths, and test suites. These functions are provided for the sake of convenience and testing; however, the preferred way of using HUnit-Plus is to use the Test.HUnitPlus.Main to create a test program directly from a list of test suites.

Synopsis

Documentation

performTestCase Source

Arguments

:: Reporter us

Report generator for the test run.

-> State

HUnit-Plus internal state.

-> us

State for the report generator.

-> TestInstance

The test to be executed.

-> IO (State, us) 

Execute an individual test case.

performTest Source

Arguments

:: Reporter us

Report generator for the test run.

-> Selector

The selector to apply to all tests in the suite.

-> State

HUnit-Plus internal state.

-> us

State for the report generator.

-> Test

The test to be executed.

-> IO (State, us) 

Execute a given test (which may be a group), with the specified selector and report generators. Only tests which match the selector will be executed. The rest will be logged as skipped.

performTestSuite Source

Arguments

:: Reporter us

Report generator to use for running the test suite.

-> Map String Selector

The map containing selectors for each suite.

-> us

State for the report generator.

-> TestSuite

Test suite to be run.

-> IO (Counts, us) 

Decide whether to execute a test suite based on a map from suite names to selectors. If the map contains a selector for the test suite, execute all tests matching the selector, and log the rest as skipped. If the map does not contain a selector, do not execute the suite, and do not log its tests as skipped.

performTestSuites Source

Arguments

:: Reporter us

Report generator to use for running the test suite.

-> Map String Selector

The processed filter to use.

-> [TestSuite]

Test suite to be run.

-> IO (Counts, us) 

Top-level function for a test run. Given a set of suites and a map from suite names to selectors, execute all suites that have selectors. For any test suite, only the tests specified by its selector will be executed; the rest will be logged as skipped. Suites that do not have a selector will be omitted entirely, and their tests will not be logged as skipped.