develooper Front page | perl.perl5.porters | Postings from June 2001

Re: on testing

Thread Previous | Thread Next
From:
Tony Bowden
Date:
June 4, 2001 10:12
Subject:
Re: on testing
Message ID:
20010604181208.A6238@blackstar.co.uk
On Mon, Jun 04, 2001 at 12:38:45PM -0400, John Peacock wrote:
> If we make it REAL EASY for authors to write tests using Test::Simple,
> then we can deal with converting the old tests to use the T::S framework
> (if that becomes core).

This was the original concept of Test::Simple. All the discussions on
how to properly do skip() and todo() and the like were starting to make
the testing interface way too scary for most people.

The biggest barrier to decent testing in most cases isn't technology,
it's psychology.

Developers hate writing tests.

However, if you make it *really* easy to do so, then once people start
they actually, IME, quite like it.

The first time someone fixes a bug only to have an entirely different
test blow up because they've accidentally re-introduced an old bug is
usually the first time they appreciate the value of a decent test suite!

Currently writing tests in Perl is hard. Or, at least clumsy (which in
my world is pretty much the same thing). It's not really encouraged,
and if you do decide to do so, there's no commonly accepted idiom.
You don't see the tests for most modules - few people install perl
by hand - it's either pre-installed, or they install a linux package;
and CPAN.pm does most of the work for you if you install anything else,
so you're not even in the habit of typing 'make test' (and most CPAN
modules don't have tests anyway).

Getting Test::Simple solidified, and into the core, and educating people
that this is how to write tests (with a small footnote that says "when
you reach the limits of this, then have a look at Test::More"), should
IMO start to improve the quality of testing, slowly but surely...

Dreaming,

Tony
-- 
--------------------------------------------------------------------------
 Tony Bowden | tony@tmtm.com | http://www.tmtm.com/
                        I'd rather walk than crawl but my heels are aching
--------------------------------------------------------------------------

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About