tasty-rerun-1.1.16: Rerun only tests which failed in a previous test run

Safe HaskellNone
LanguageHaskell2010

Test.Tasty.Ingredients.Rerun

Synopsis

Documentation

rerunningTests :: [Ingredient] -> Ingredient Source #

This ingredient for tasty testing framework allows to filter a test tree depending on an outcome of the previous run. This may be useful in many scenarios, especially when a test suite grows large.

The behaviour is controlled by command-line options:

  • --rerun

    Rerun only tests, which failed during the last run. If the last run was successful, execute a full test suite afresh. A shortcut for --rerun-update --rerun-filter failures,exceptions --rerun-all-on-success.

  • --rerun-update

    Update the log file to reflect latest test outcomes.

  • --rerun-filter CATEGORIES

    Read the log file and rerun only tests from a given comma-separated list of categories: failures, exceptions, new, successful. If this option is omitted or the log file is missing, rerun everything.

  • --rerun-all-on-success

    If according to the log file and --rerun-filter there is nothing left to rerun, run all tests. This comes especially handy in stack test --file-watch or ghcid scenarios.

  • --rerun-log-file FILE

    Location of the log file (default: .tasty-rerun-log).

Usage example:

import Test.Tasty
import Test.Tasty.Runners
import Test.Tasty.Ingredients.Rerun

main :: IO ()
main =
  defaultMainWithIngredients
    [ rerunningTests [ listingTests, consoleTestReporter ] ]
    tests

tests :: TestTree
tests = undefined