| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 00:39:23 GMT
X-Served-By: cache-dfw-kdfw8210084-DFW, cache-bom-vanm7210064-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768610363.441028,VS0,VE297
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
tasty-bdd: BDD tests language and tasty provider
tasty-bdd: BDD tests language and tasty provider
Downloads
- tasty-bdd-0.1.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.0, 0.1.0.1 |
|---|---|
| Dependencies | base (>=4.7 && <5), exceptions, free, HUnit, microlens, microlens-th, mtl, pretty, pretty-show, tagged, tasty, tasty-fail-fast, tasty-hunit, temporary, text, transformers, tree-diff [details] |
| License | BSD-3-Clause |
| Copyright | 2017 Paolo Veronelli |
| Author | Paolo Veronelli, Pavlo Kerestey |
| Maintainer | paolo.veronelli@gmail.com |
| Uploaded | by PaoloVeronelli at 2020-08-05T10:20:39Z |
| Category | Test |
| Home page | https://gitlab.com/devs.global.de/tasty-bdd |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 413 total (9 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2020-08-05 [all 1 reports] |
Readme for tasty-bdd-0.1.0.1
[back to package description]Behavior-driven development
A Haskell Behavior Driven Development framework featuring:
- A type constrained language to express
- Given as ordered preconditions or
- GivenAndAfter as oredered preconditions with reversed order of teardown actions (sort of resource management)
- One only When to introduce a last precondition and catch it's output to be fed to
- Some Then tests that will receive the output of When
- Support for do notation via free monad for composing givens and thens
- One monad independent pure interpreter
- One driver for the great tasty test library, monad parametrized
- Support for tasty-fail-fast strategy flag which will not execute the teardown actions of the failed test
- A sophisticated form of value introspection to show the differences on equality failure from tree-diff package
- Recursive test decorators to prepend or append action to all the tests inside a test tree
Background
Behavior Driven Development is a software development process that emerged from test-driven development (TDD) and is based on principles of Hoare Logic. The process requires a strict structure of the tests - {Given} When {Then} - to make them understandable.
Example
import Test.Tasty.Bdd
tests :: TestTree
tests = testBdd "Test sequence"
$ Given (print "Some effect")
$ Given (print "Another effect")
$ GivenAndAfter (print "Aquiring resource" >> return "Resource 1")
(print . ("Release "++))
$ GivenAndAfter (print "Aquiring resource" >> return "Resource 2")
(print . ("Release "++))
$ When (print "Action returning" >> return ([1..10]++[100..106]) :: IO [Int])
$ Then (@?= ([1..10]++[700..706]))
$ End