Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Automated testing of database classes

by dragonchild (Archbishop)
on Dec 27, 2004 at 11:16 UTC ( [id://417568]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Automated testing of database classes
in thread Automated testing of database classes

Well, you obviously are doing something more than just Class::DBI is doing, otherwise you wouldn't have subclassed it!

Maybe you could test that the My::DBI::Foo class does or doesn't have a bar() method or a 'baz' column. Maybe you need to test your collections to make sure the right thing comes back? has_a()/has_many()/might_have() all need tested to make sure you're returning the right class.

These tests are going to be very simple and should run very quickly. But, they provide some sort of safety net for you to program against. Remember - most safety nets are built with twine. :-)

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

  • Comment on Re^3: Automated testing of database classes

Replies are listed 'Best First'.
Re^4: Automated testing of database classes
by MrCromeDome (Deacon) on Dec 27, 2004 at 11:42 UTC

    Never thought about checking the the has_a/has_many relationships. Excellent idea! As are the other suggestions. I don't mean to seem dense - this is just uncharted ground for me.

    Thanks!
    MrCromeDome

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://417568]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.