Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: tests & logging

by andreas1234567 (Vicar)
on Oct 16, 2007 at 13:39 UTC ( #645169=note: print w/ replies, xml ) Need Help??


in reply to Re: tests & logging
in thread tests & logging

Are all 40k tests in one file?
In that case I would seriously consider splitting the tests into smaller sets (i.e. files). Current modules on CPAN could serve as examples, e.g. a simple and easily understood one such as Number::Bytes::Human. Some test files contain just a handful tests/lines each:
[Number-Bytes-Human-0.07]# wc -l t/* 7 t/01use.t 42 t/02basic.t 27 t/03large.t 31 t/04base1000.t 14 t/05zero.t 15 t/06si.t 9 t/07unit.t 29 t/08base1M.t 137 t/10parse_args.t 17 t/20oo.t 8 t/90pod.t 8 t/98pod-coverage.t 344 total
Run all tests:
[Number-Bytes-Human-0.07]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/01use.............ok 1/1# Testing Number::Bytes::Human 0.07, Perl 5. +008005, /usr/bin/perl t/01use.............ok t/02basic...........ok t/03large...........ok 1/4number too large (>= 1024**10) at t/03large. +t line 26 t/03large...........ok t/04base1000........ok t/05zero............ok t/06si..............ok t/07unit............ok t/08base1M..........ok t/10parse_args......ok t/20oo..............ok t/90pod.............ok t/98pod-coverage....ok All tests successful. Files=12, Tests=128, 1 wallclock secs ( 0.89 cusr + 0.10 csys = 0.9 +9 CPU)
Run a single test:
[Number-Bytes-Human-0.07]# prove t/05zero.t t/05zero....ok All tests successful. Files=1, Tests=6, 0 wallclock secs ( 0.05 cusr + 0.00 csys = 0.05 C +PU)
--
Andreas


Comment on Re^2: tests & logging
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://645169]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2015-07-06 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls