This sounds like a good candidate for some sort of unit testing. If I grok your post (and I'm not sure I do :), it sounds like the problems you're running in to come from trying to test the application as a whole. You might try breaking it down into units, and testing each of them individually.
As a trivial example, take the login function. Your unit test could set up a fake DB, run the function that checks credentials, and check the result. The user creation test could work in a similar way, running the code with some supplied input, and then checking the resulting DB entry. Right now, it sounds like you're trying to create the user, log in, and use the application all in one test (correct me if I'm wrong).
Most unit testing code will allow you to do things like this, starting with a clean environment (FS, DB..), inserting some test data (files, db records), running the code (a few runs of some function with different input), and cleaning up.
I've never done unit testing with /perl/, so I don't know what's out there, but a quick google suggests that there are more than a few frameworks for perl.
Hope that helps.
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.