integrated testing using type "detailed" and test-framework

Thomas Tuegel ttuegel at
Sat Aug 4 21:02:49 CEST 2012

On Thu, Aug 2, 2012 at 9:18 AM, Malthe Borch <mborch at> wrote:
> What glue is necessary to use the "detailed-0.9" test-suite type with
> the test-framework (and its HUnit-integration)?
> I have tried to find documentation online, but much of it seems
> somewhat outdated or relatively obscure. Ideally, I'd like to follow
> the guide:
>   $ cabal configure --enable-tests
>   $ cabal build
>   $ cabal test
> But there seems to be an interface issue between these different test
> frameworks.

I don't think any of the available test frameworks [1] implement the
'detailed' interface. That interface is defined in the
Distribution.TestSuite module; the latest version is unreleased, but
you can see it on Github [2]. To use the detailed interface, the test
framework you are using needs to provide 'TestInstance' values for its
tests; as far as I know, none of them do (due largely to the
inadequacy of my efforts post-GSoC2010).

Have you tried the 'exitcode-stdio-1.0' interface? I think it will
meet your needs, and it's ready to use today. To use it, just write a
normal executable in Haskell using test-framework and include it in
your package description as a test suite with the aforementioned
interface. The current version of the Cabal User Guide correctly, if
briefly, documents how to include test suites in your package
description [3]. Test suites written this way can be run using exactly
the sequence of commands you described.

Hope this helps! If you have other questions, please don't hesitate.
Thomas Tuegel

[1] By "test frameworks" I mean libraries such as test-framework,
HUnit, or QuickCheck. Basically, any library that provides some kind
of test. The test-framework library is, of course, really only a
wrapper, but from Cabal's perspective, they're all just test



More information about the cabal-devel mailing list