Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^6: Self Testing Modules

by BrowserUk (Pope)
on Dec 18, 2005 at 23:57 UTC ( #517636=note: print w/replies, xml ) Need Help??


in reply to Re^5: Self Testing Modules
in thread Self Testing Modules

... if your code is 100 lines, and your tests 1000 (a not unreasonably ratio IMO) ...

If you are writing 1000 lines of tests to verify 100 lines of code, your code is testing your tests, and not the other way around.

And frankly if you are using the test framework to get a pretty number telling you "XX.X% passed" then you aren't using the test framework properly.

It isn't a case of what I'm doing, it's what they do--and the reason I don't use them!

Anyway, i dont expect youll change your views..,

Nor do I expect others to eshew de rigueur based upon my rejection of it, but counterpoint is a goood thing wouldn't you agree?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^7: Self Testing Modules
by demerphq (Chancellor) on Dec 19, 2005 at 00:20 UTC

    If you are writing 1000 lines of tests to verify 100 lines of code, your code is testing your tests, and not the other way around.

    Heh, well, ok, maybe thats a bit high. :-) OTOH, A hundred lines of code can involve an awful lot of behaviour that needs testing, especially in perl, and IME test code tends to be quite chunky anyway. Maybe stating a hard and fast ratio is not so easy, but i believe the point is still sound.

    ---
    $world=~s/war/peace/g

Re^7: Self Testing Modules
by adrianh (Chancellor) on Dec 19, 2005 at 15:12 UTC
    It isn't a case of what I'm doing, it's what they do--and the reason I don't use them!

    XX.X% passed is not the only information you get out of a T::B based test suite. It's certainly not the information I'm focused on when I'm developing.

    All I'm looking for is whether the last test I wrote passed or failed. Personally I find that the existing tools give me this info pretty easily. Especially now that Test::Builder displays the test description so that it can be read without dropping into verbose mode.

    The only place I find this information more tricky to find, sad to say, is with my own Test::Class - and I'm working on fixing that :-)

    This isn't to say the pretty numbers and statistical summaries are completely useless. While it's not of much relevance during development, it can be a useful diagnostic tool at install/distribution time.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-08-05 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (44 votes). Check out past polls.

    Notices?