tasty-bdd: BDD tests language and tasty provider

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

https://gitlab.com/devs.global.de/tasty-bdd/-/blob/master/README.md


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0, 0.1.0.1
Change log None available
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
Category Test
Home page https://gitlab.com/devs.global.de/tasty-bdd
Uploaded by PaoloVeronelli at 2020-08-05T07:54:18Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for tasty-bdd-0.1.0.0

[back to package description]

CircleCI

Behavior-driven development

A Haskell Behavior Driven Development framework featuring:

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