I just switched a codebase from RUNIT to Test::Unit, b/c Test::Unit is
set to be a standard lib. While many of my experiences were positive
(assert_raises == great name!), I discovered some things that I missed
about RUNIT.
The main thread of my discontent is that I think RUNIT’s test runner
makes it easier to get information about where a bug occurs. These
were my issues:
- quick view of the pattern of test results +
In Test::Unit, full error messages interrupt the status of the tests.
In RUNIT, the test suite returns to you information about tests status
as …(passed tests) and …F…E… (failures and errors). Without
having to read, I can often tell what type of problem I’m dealing with
by looking at the pattern of failures / errors. For example, seeing a
result of:
…E.E.E.E.E.E.E…
might quickly clue me on to a broken setup / teardown method. I don’t
think that all output needs to be buffered, but mixing in the detailed
error reports with the pass indications (…) makes it more difficult
to see patterns of failure.
- more emacs friendly error reporting +
I don’t know if this is true for other editors. RUNIT reports an
error with the file name first, something like:
…/foo/somefile.rb:9 Failure blah blah blah
The ./foo/somefile is picked up by emacs and made into a link to the
exact line of the error. This makes it easier for me to get right to
the problem.
···
There were other bumps, for example I prefer teardown to tear_down.
But those I considered less important than the above issues. I’m in
the process of writing extensions to Test::Unit to provide the above
behavior, though I wonder:
Can you run Test::Unit::TestCases with the RUNIT test runners?
if not,
Has anyone else already done this work?
Thanks,
Patrick