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

proving see's more tests the more i run

by Cagao (Monk)
on Oct 06, 2010 at 15:53 UTC ( #863824=perlquestion: print w/ replies, xml ) Need Help??
Cagao has asked for the wisdom of the Perl Monks concerning the following question:

I've got a nice collection of test scripts, just using Test::More and Test::Exception, split into 20-odd directories, about 3-4 files in each.

when i run prove, i see these last lines when running them just a few minutes apart...

All tests successful. Files=95, Tests=3264, 90 wallclock secs ( 4.04 usr 0.13 sys + 75.52 c +usr 4.66 csys = 84.35 CPU) All tests successful. Files=95, Tests=3284, 90 wallclock secs ( 4.03 usr 0.14 sys + 75.59 c +usr 4.64 csys = 84.40 CPU) All tests successful. Files=95, Tests=3304, 89 wallclock secs ( 4.11 usr 0.14 sys + 76.06 c +usr 4.42 csys = 84.73 CPU)

Interesting to see the number of tests gradually increase!

any ideas, thoughts, suggestions?

Comment on proving see's more tests the more i run
Download Code
Re: proving see's more tests the more i run
by chromatic (Archbishop) on Oct 06, 2010 at 15:58 UTC

    You have assertions in a loop somewhere, and the loop iteration condition relies on an increasing resource.

Re: proving see's more tests the more i run
by sundialsvc4 (Monsignor) on Oct 06, 2010 at 18:06 UTC

    It is possible to inform the Test library that “exactly so-many tests will be performed.”   If this has been done, you will be told if the actual counts differ.   However, you are not under any obligation to do so.

    My personal feeling, of course, is that you probably do want to avail yourself of this facility as much as possible, even if you calculate the expected count.   This gives you a cross-check on the test itself (which, of course, will inevitably contain bugs, just as surely as the code that you are testing).   When it makes sense to do this, it’s usually a good idea, IMHO.   (The computer is always the best one to detect when you have mispeled something, or accidentally something out.)   ;-)

      >>The computer is always the best one to detect when you have mispeled something, or accidentally something out.

      vote++ for that :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2014-08-20 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (114 votes), past polls