Based on the info you provided, I suggest starting with some interface testing. At this point, your work/reward ratio will be quite high because you are already experiencing "fix one, break two" and some regression.

Most of the suggestions so far have focussed on standard Perl testing, which is generally unit testing. I'll offer a different option. You mention CGI scripts, so you could build tests to excercise the interface. Take notes on how you have found previous bugs through the browser. Then you can look into automating that sequence using WWW::Mechanize and Test::WWW:Mechanize.

We did this for a large amount of existing web code because in addition to not having tests, much of our older code wasn't very 'testable.' Creating new unit tests would have involved a lot of refactoring because the code wasn't modular. Building tests of the interface was much easier and effective.

Then, moving forward, consider all of the advice above. Each time you add code or fix a bug, make the code very modular and testable and write tests for it. That way you will be in good shape moving forward. If you take this approach when you fix bugs, your 'buggy' code will start to have much better coverage and you'll experience many fewer bugs.


In reply to Re: Testing a already built application by cbrandtbuffalo
in thread Testing a already built application by ropey

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.