The paramtree package

[ Tags: benchmarking, bsd3, development, library, testing ] [ Propose Tags ]

Easily generate a labelled tree of tests/benchmarks from a generation function and sets of parameters to use for each of that functions arguments. Example usecases include criterion benchmark trees or tasty test trees.

[Skip to Readme]


Versions 0.1.0, 0.1.1 (info)
Dependencies base (>=4.6 && <5), containers (>=0.4 && <0.6) [details]
License BSD3
Copyright Copyright © 2017 Merijn Verstraaten
Author Merijn Verstraaten
Maintainer Merijn Verstraaten <>
Category Development, Benchmarking, Testing
Home page
Bug tracker
Source repo head: git clone ssh://
head: hg clone
Uploaded Mon Nov 6 10:07:46 UTC 2017 by MerijnVerstraaten
Distributions NixOS:0.1.1
Downloads 337 total (9 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-11-06 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for paramtree-0.1.1

[back to package description]


BSD3 Hackage Build Status

ParamTree library for generating labelled test/benchmark trees from sets of parameters. Example usecases include criterion benchmark trees or tasty test trees.


import Test.Tasty
import Test.Tasty.HUnit

genTestCase :: Int -> Bool -> Char -> String -> TestTree
genTestCase i b c name = testCase name $ {- your code here -}

params = 'simpleParam' \"Int\" [1,2]
       . 'simpleParam' \"Bool\" [True]
       . 'simpleParam' \"Char\" "xyz"

main :: IO ()
main = defaultMain $ testTree genTestCase params
    testTree = growTree (Just "/") testGroup "my tests"

This generates a tasty TestTree with all combinations of values passed to genTestCase. If the Maybe String argument is provided like in the above example, groups with a single entry, such as "Bool" get collapsed into their parent groups. So instead of a "1 Int" group containing a "True Bool" group they get collapsed into a single "1 Int/True Bool" group, where the "/" separator is the one specified by Just "/".