Test-Unit reviews

RSS | Module Info | Add a review of Test-Unit

Test-Unit (0.25)

If you are considering what module to use for testing your Perl code, please consider using Test::More rather than this. Test::More is currently maintained and is a standard module for testing Perl.

Test::Unit has been abandoned for more than ten years. Sadly this also means that all the other modules which depend on Test::Unit often don't install any more:

metacpan.org/requires/module/Test::Un...

This failure doesn't show up in the CPAN testers' results for the dependent modules because, since Test::Unit fails to install, a module which is dependent on it never even gets to the point of being tested, because the installation bails out after failing to install this.

Unfortunately the only review here on CPAN ratings which is still accurate in 2017, the one which says Test::Unit doesn't install on many systems, is the one which is downvoted so that it has disappeared.

There is a file AUTHORS with ten people in it; have all of these people stopped using the thing? The presence of a development version on CPAN dating from 2011 seems like a bit of tumbleweed blowing through this ghost town.

Test-Unit (0.25) *

Good API but this distribution is too old, I swith to Test-Unit-Lite and recommand all people to switch too.

Test-Unit (0.25) ****

Test::Unit is of course a fine module. But if you are shopping around for testing framework, I recommend you try Test::Class instead, which combines the best of two worlds. First, you get xUnit style, but I think with a slightly simpler interface. Second, you get to use all the standard Perl testing stuffs like Test::Simple, Test::More and Test::Harness. This is better because it's what most Perl modules use (so you might be more familiar with it if you're a Perl programmer), plus there are more kinds of "assert" functions in Test::More and friends compared to Test::Unit::Assert.

Test-Unit (0.25) ****

This is the perl testing library to use if you are going to build out tests for large perl applications and libraries. I definitely recommend it. It provides a lot more control than the standard Test::Simple and Test::More libraries. Tests are more maintainable and readable.

Test-Unit (0.25) ****

I like Test::Unit - it makes it much easier to create tests that are isolated from each other.

One annoyance: Unless you specify a list of tests to run, the tests arerun in random order. It would be nicer if the default was to run tests in the order in which they appear - maybe doing a simple search through the file for the 'sub' declarations could help fix this. I'll have a look...

See also, my blog posting: twoalpha.blogspot.com/2005/11/unit-te...

Test-Unit (0.24) *

This module fails to install on FreeBSD 4.9 with Perl 5.8.3.

It also fails to install on Slackware 9.0 with Perl 5.8.0, with an identical error.

It appears this module is being neglected. For example, there is a message on the perlunit-users mailing list (sourceforge.net/mailarchive/forum.php... reporting the same install problem back in 2002. No reply to that message has ever been posted; nor has the module been updated since then.

Here is the error:

Running make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl5.8.3 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/all_tests.......ok
t/assert..........ok
t/try_examples....NOK 1# Test 1 got: 'Suite setup
# ..FSuite teardown
#
# TIME-SUMMARY
#
# !!!FAILURES!!!
# Test Results:
# Run: 2, Failures: 1, Errors: 0
#
# There was 1 failure:
# 1) examples/fail_example.pm:19 - test_fail(fail_example)
# Born to lose ...
#
# Test was not successful.
# ' (t/try_examples.t at line 103)
# Expected: 'Suite setup
# .F.Suite teardown
#
# TIME-SUMMARY
#
# !!!FAILURES!!!
# Test Results:
# Run: 2, Failures: 1, Errors: 0
#
# There was 1 failure:
# 1) examples/fail_example.pm:19 - test_fail(fail_example)
# Born to lose ...
#
# Test was not successful.
# '
# t/try_examples.t line 103 is: ok($out, $guru_checked{$e});
t/try_examples....FAILED test 1

Failed 1/4 tests, 75.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/try_examples.t 4 1 25.00% 1
Failed 1/3 test scripts, 66.67% okay. 1/83 subtests failed, 98.80% okay.
*** Error code 2

Stop in /root/.cpan/build/Test-Unit-0.24.

/usr/bin/make test -- NOT OK
Running make install

make test had returned bad status, won't install without force