Some time ago, I took the plunge and started to implement auotmated testing of my web applications. I have to admit it's been pretty cool :) Testing has already helped me to uncover problems and inconsistencies with my application's API, and has also helped me uncover and diagnose some really subtle bugs in our applications. Lately, I've been implementing a number of database classes in Class::DBI, and I'm having some difficulty determining what kinds of tests I want to implement, or even should be implementing. I've written test suites for a couple of my classes, and sadly, they look more like test suites for Class::DBI than anything of use to my application. It seems like duplicated effort to me, as Class::DBI comes with its own series of tests.

In the end, my application will have a number of classes, but they will be fall into one of two groups: those that view and update data, and those that only view data. I'm not sure what kinds of tests I should be writing for these instances though. Does anyone have any suggestions for what I can do to test my database classes? For those of you who have implemented testing of database classes, what things have you tested?

As always, thank you for your time and insight!
MrCromeDome

In reply to Automated testing of database classes by MrCromeDome

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.