Test.Framework.Runners.API

test-framework-0.8.0.3: Framework for running and organising tests, with HUnit and QuickCheck support

Safe Haskell | None
Language | Haskell98

Test.Framework.Runners.API

Description

This module exports everything that you need to be able to create your own test runner.

Synopsis

- module Test.Framework.Runners.Options
- class TestRunner b where
  - runSimpleTest :: (Testlike i r t, Typeable t) => TestOptions -> TestName -> t -> b
  - skipTest :: b
  - runIOTest :: IO (b, IO ()) -> b
  - runGroup :: TestName -> [b] -> b
- runTestTree :: TestRunner b => TestOptions -> [TestPattern] -> Test -> b

# Documentation

module Test.Framework.Runners.Options

class TestRunner b where

`TestRunner` class simplifies folding a `Test`. You need to specify the important semantic actions by instantiating this class, and `runTestTree` will take care of recursion and test filtering.

Methods

runSimpleTest :: (Testlike i r t, Typeable t) => TestOptions -> TestName -> t -> b

How to handle a single test

skipTest :: b

How to skip a test that doesn't satisfy the pattern

runIOTest :: IO (b, IO ()) -> b

How to handle an IO test (created with `buildTestBracketed`)

runGroup :: TestName -> [b] -> b

How to run a test group

runTestTree

Arguments

:: TestRunner b |
=> TestOptions |
-> [TestPattern] | skip the tests that do not match any of these patterns, unless the list is empty
-> Test |
-> b |

Run the test tree using a `TestRunner`