Haskell Test Framework
Haskell Shell
Switch branches/tags
Nothing to show
Permalink
Failed to load latest commit information.
Test fix showPrec ~> showsPrec May 8, 2016
doc fix to blog article Oct 8, 2011
sample fixed tests under stack Oct 24, 2015
scripts fixed travis May 8, 2016
tests Merge pull request #62 from timjb/repeat-tests May 8, 2016
.gitignore use cpphs as lexer, improve tests Aug 21, 2015
.travis.yml fixed travis May 8, 2016
ChangeLog preparations for 0.13.1.0 Aug 21, 2015
HTF.cabal
HTFPP.hs added --version to the --help output Oct 22, 2014
LICENSE initial version Oct 31, 2005
README.md Link to QuickCheck and HUnit packages on hackage. Nov 13, 2015
TODO.org support for timeouts and test run history Jul 14, 2014
check-dist.sh pimped some scripts for testing Dec 13, 2012
run-all-tests-for-all-compilers.sh re-organized and improved tests Aug 31, 2013
run-all-tests.sh use cpphs as lexer, improve tests Aug 21, 2015
setup.hs Major rewrite Aug 12, 2009
stack.yaml do ci with travis Nov 11, 2015

README.md

HTF - The Haskell Test Framework

Build Status Hackage

Summary

The Haskell Test Framework (HTF for short) lets you define unit tests (http://hackage.haskell.org/package/HUnit), QuickCheck properties (https://hackage.haskell.org/package/QuickCheck), and black box tests in an easy and convenient way. HTF uses a custom preprocessor that collects test definitions automatically. Furthermore, the preprocessor allows HTF to report failing test cases with exact file name and line number information. Additionally, HTF tries to produce highly readable output for failing tests: for example, it colors and pretty prints expected and actual results and provides a diff between the two values.

Look here for a short tutorial on HTF. The following slightly out-dated blog article demonstrates HTF's coloring, pretty-printing and diff functionality.

Installation instructions

  • Install from http://hackage.haskell.org/ using cabal install HTF

  • Install from source:

      $ git clone git@github.com:skogsbaer/HTF.git
      $ cd HTF
      $ cabal install
    

Getting started

  • Read the tutorial.
  • Experiment with the sample project located in the sample directory of HTF's source tree.