[erlang-bugs] EUnit discards all output

Richard Carlsson <>
Fri Jan 2 17:47:39 CET 2009


John Hughes wrote:
> From the eunit Users' Guide:
> 
> *EUnit captures standard output*
> 
> If your test code writes to the standard output, you may be surprised to
> see that the text does not appear on the console when the tests are
> running. This is because EUnit captures all standard output from test
> functions (this also includes setup and cleanup functions, but not
> generator functions), so that it can be included in the test report if
> errors occur.
> 
> OK, it says the output CAN be included in the test report if errors
> occur, not that it WILL be--but I nevertheless expected the latter to
> happen. When I run EUnit, however, ALL output is discarded, even output
> from failing tests. Is that really the intention? Maybe I'm just doing
> something wrong here--but I have not found any documented way to turn ON
> reporting of output from failed tests.

Ah, it seems I didn't remember to actually present that information.
I.e., the presentation layer has always received the data, but didn't
bother to ever print it.

I just checked in a fix in the repository at
https://svn.process-one.net/contribs/trunk/eunit, that prints the output
(truncated if it gets too long) if there is any.

In general, EUnit bug reports can be filed at
https://support.process-one.net/browse/EUNIT.

    /Richard

-- 
 "Having users is like optimization: the wise course is to delay it."
   -- Paul Graham



More information about the erlang-bugs mailing list