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

on testing

Thread Next
From:
Hugo
Date:
June 2, 2001 20:40
Subject:
on testing
Message ID:
200106030243.DAA17967@crypt.compulink.co.uk
As someone who regularly tries to put in the effort to add test cases,
I find there is little difference in the effort involved in adding a
test case whether or not I have to encode the test number in the test
case.

As someone who regularly tries to investigate test failures, the lack
of test numbers makes life _much_ more difficult. It isn't just the
time it takes to discover which test failed, but also the fact that
it diverts my concentration from the code I want to be thinking about,
so that the debugging process becomes that much more difficult.

I'd like to encourage all test writers to take this issue into account,
and I'd particularly like to see this issue accounted for by the Test
module. I appreciate that it seems like an obvious improvement to save
the test writer from having to add 1, but I suggest that it is a false
economy.

The difficulty comes when you want to insert a new test in the logical
place, which could involve renumbering all the subsequent tests. My
suggestion for avoiding this is: don't; just add the new test at the
end. Occasionally we may want to look at the wider picture of what is
getting tested, and that is the time to consider reordering the tests;
that is the only point, as I see it, that the renumbering price has
to be paid. I rate that cheap, compared to the alternatives.

Comments, as always, welcome. :)

Hugo

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