tasty-rerun: Run tests by filtering the test tree depending on the result of previous test runs

[ bsd3, library, testing ] [ Propose Tags ]

This ingredient adds the ability to run tests by first filtering the test tree based on the result of a previous test run. For example, you can use this to run only those tests that failed in the last run, or to run only tests that have been added since tests were last ran.

This ingredient is specifically an ingredient *transformer* - given a list of Tasty.Ingredients, rerunningTests adds the ability for all of these ingredients to run against a filtered test tree. This transformer can be applied as follows:

import Test.Tasty
import Test.Tasty.Runners

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

tests :: TestTree
tests = undefined

This ingredient adds three command line parameters:

If specified the results of this test run will be saved to the log file at --rerun-log-file. If the ingredient does not execute tests (for example, --list-tests is used) then the log file will not be updated. This option is not enabled by default. This option does not require a value.
The path to the log file to read previous test information from, and where to write new information to (if --rerun-update is specified). This option defaults to .tasty-rerun-log.
Which filters to apply to the Tasty.TestTree based on previous test runs. The value of this option is a comma separated list of the following options:

Multiple options can be combined and will be taken under disjunction - so --rerun-filter=failures,exceptions will run only tests that failed *or* threw an exception on the last run.

Defaults to all filters, which means all tests will be ran.

Versions [faq] 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 1.1.11, 1.1.12, 1.1.13, 1.1.14, 1.1.15, 1.1.16, 1.1.17 (info)
Change log Changelog.md
Dependencies base (>=4.6 && <4.11), containers (>=, mtl (>=2.1.2), optparse-applicative (>=0.6), reducers (>=3.10.1), split (>=0.1 && <0.3), stm (>=2.4.2), tagged (>=0.7 && <0.9), tasty (>=0.10 && <0.13), transformers (>= [details]
License BSD-3-Clause
Copyright Oliver Charles (c) 2014
Author Oliver Charles
Maintainer ollie@ocharles.org.uk
Category Testing
Home page http://github.com/ocharles/tasty-rerun
Uploaded by OliverCharles at 2017-12-06T11:42:41Z
Distributions Arch:1.1.17, Debian:1.1.12, Fedora:1.1.17, NixOS:1.1.17
Downloads 21255 total (272 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-12-06 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees