tasty-flaky: Handle flaky Tasty-based tests

[ bsd3, library, testing ] [ Propose Tags ] [ Report a vulnerability ]

Handle flaky Tasty-based tests, with configuration retry policies.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.3.0
Change log CHANGELOG.md
Dependencies base (>=4.14 && <4.22), retry (>=0.7 && <0.10), tagged (>=0.5 && <0.9), tasty (>=1.5 && <1.6) [details]
Tested with ghc ==9.12.1 || ==9.10.1 || ==9.8.4 || ==9.6.6 || ==9.4.8 || ==9.2.8 || ==9.0.2 || ==8.10.7
License BSD-3-Clause
Copyright (c) Laurent René de Cotret
Author Laurent René de Cotret
Maintainer Laurent René de Cotret
Category Testing
Home page https://github.com/LaurentRDC/tasty-flaky
Source repo head: git clone https://github.com/LaurentRDC/tasty-flaky.git
Uploaded by LaurentRDC at 2025-12-13T14:09:04Z
Distributions NixOS:0.1.2.0
Downloads 136 total (8 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2025-12-13 [all 1 reports]

Readme for tasty-flaky-0.1.3.0

[back to package description]

tasty-flaky

This provides tasty integration for flaky tests, which are tests that are known to fail intermittently. tasty-flaky can be installed from Hackage.

Example usage

This package provides functions, like flakyTest, which can attach retrying logic to any test. For example, you can retry test cases from tasty-hunit like so:

import Test.Tasty.HUnit ( testCase ) -- from tasty-hunit

myFlakyTest :: TestTree
myFlakyTest 
    = flakyTest (limitRetries 5 <> constantDelay 1000) 
    $ testCase "some test case" 
    $ do ... 

In the example above, the test will be retried up to 5 times, with a delay of 1000 microseconds between tries, if a failure occurs.