[Koha-devel] koha and testing
Ed Summers
ehs at pobox.com
Tue Dec 31 10:34:02 CET 2002
Hi Nathan: thanks for writing.
On Tue, Dec 31, 2002 at 12:44:11PM -0500, Nathan Gray wrote:
> I would prefer to use Test::Debugger over Test::More. I like the
> interface of Test.pm, though it doesn't handle all the scenarios I
> need. I wrote a new version of Test.pm, but Test::More beat me to
> CPAN.
I've use Test::More quite a bit, and have really come to like it. It also comes
standard in Perl 5.8 now. I could adapt to another framework though, as long as
it works :)
> I am uncertain whether it would be better to have a small set of test
> scripts with each module, or to have one large test suite in a
> central location. I'm leaning toward a centralized test suite, but
> haven't grasped Koha enough to know where to start, or where the test
> suite should be kept.
Yes, I'm unclear on this as well. In my current work environment we've adopted
the former approach: to have component tests that are easily paired with the
components they test:
C4/Format.pm
C4/Format.t
Then we have a 'smoking' program which goes and looks for all the *.t files and
runs the tests. Having them split out like this is extremely useful when adding
new functionality: because you know exactly where you have to go to add or
modify a test. It also uses the filesystem to illustrate which components lack
tests.
> Definitely all the modules which interact with the database should
> have tests to make sure selects, updates, deletes, inserts are all
> working correctly.
>
> Likewise, any module which performs searches should have tests to make
> sure that the correct information is returned, in the correct order.
>
> A test should make sure the templating system works, especially for
> the various languages which are going to be supported.
Yes, these are important. I guess a test database will need to be up and running
for alot of these sorts of tests.
> Let me know what your ideas are. Pat Eyler will be overjoyed to have
> another tester on board! We'll hear from him as soon as the holidays
> are past, I am assuming. He is very good about writing.
>
> I hope to have Test::Debugger on CPAN in a day or three.
OK, I look forward to seeing it. I know what you mean about getting bogged down
in work. I feel the same way, but I want to find time to work on this.
//Ed
--
% perl -MData::Dumper -e "print Dumper($me)"
$VAR1 = {
'WEB' => 'http://www.inkdroid.org',
'NAME' => 'Ed Summers',
'AIM' => 'inkdroid',
'EMAIL' => 'ehs at pobox.com'
};
More information about the Koha-devel
mailing list