Hopefully, most of your core functionality is in modules and abstracted from the presentation. If so, you can do a lot of testing without worring about pretending you're a browser.
As far as adding tests to an existing codebase, In addition to the book mentioned above, Perl Medic has a decent section.
When I've been in a similar situation, I've tried to add the simplest test(s) possible without changing the existing code at all, and then slowly re-factored the code to make it more test friendly (if needed) while keeping the original tests in place to verify nothing's been broken. Usually when I'm up against code without tests, I didn't write it, so you may be a step ahead in that regard.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.