ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

Homepage: https://john-millikin.com/software/chell/ Hackage: http://hackage.haskell.org/package/chell -------- This is just a quick package I whipped up out of frustration with test-framework scrolling an error message out of sight, for the millionth time. Chell has the same general purpose (aggregate your assertions + properties + whatever into a single executable), but only prints when a test fails or aborts. It also has a small built-in test library, similar to HUnit, so you don't need to depend on 2-3 separate libraries if you're just doing simple tests. Cool features thereof: * it reports the line number of failed assertions * you can use $expect instead of $assert, so even if it fails, the test keeps going (all the failures are printed at the end) * you can add "notes" to a test, which are saved in logs and reports. you can put in any sort of metadata you want (nice for figuring out why a test is failing) * assertions for text diffs, so if you're testing two big chunks of text for equality you don't have to copy+paste to see what's different.

On 11 August 2011 05:17, John Millikin
This is just a quick package I whipped up out of frustration with test-framework scrolling an error message out of sight, for the millionth time.
Patches to make test-framework less noisy (either by default or with a flag) will be gratefully accepted, if anyone wants to give it a go :-) Max

I tried, actually, but couldn't figure out how to separate running the
test from printing its output. All the attempted patches turned into
huge refactoring marathons.
When given the choice between sending a huge "replace all your code
with my code" patch, and just releasing a separate package, I prefer
to do the second. There's usually a reason a library behaves as it
does, and this way both behaviors are available to users (even if I
find one frustrating).
On Wed, Aug 10, 2011 at 23:51, Max Bolingbroke
On 11 August 2011 05:17, John Millikin
wrote: This is just a quick package I whipped up out of frustration with test-framework scrolling an error message out of sight, for the millionth time.
Patches to make test-framework less noisy (either by default or with a flag) will be gratefully accepted, if anyone wants to give it a go :-)
Max

On 11 August 2011 15:49, John Millikin
I tried, actually, but couldn't figure out how to separate running the test from printing its output. All the attempted patches turned into huge refactoring marathons.
Just FYI test-framework already has exactly this split between running tests and printing their results. If you had wanted to change this you could have modified showImprovingTestResult in https://github.com/batterseapower/test-framework/blob/master/core/Test/Frame.... However, as someone else has already pointed out, the --hide-successes flag does what you want, and you can even make it the default for your particular testsuite by making your "main" be (do { args <- getArgs; defaultMainWithArgs tests (["--hide-successes"] ++ args) }) Cheers, Max
participants (2)
-
John Millikin
-
Max Bolingbroke