First, thanks for the feedback on part I. As I wait for Perl Medic to arrive, I've been reading some other documentation.
Things seem to be clicking a bit. Along with keeping my POD up-to-date, I've also been writing tests. I've slowly been finding it easier to write tests into proper test files for my modules, but there are some things I still find easier to write one-offs for. I'd like to eliminate this behavior completely.
Some of my processes have a high number of levels in it's stack trace. Some methods delete entries from an external DB, and create another record with updated data. Some rely on external information that the program doesn't know at runtime. The side-effect of this is having to manually edit test vars frequently.
My questions are as such: does it make sense to use Storable to store() known data in a sub-directory in the t/ dir, in order to 'simulate' results, so I don't have to manually edit test files? Theoretically, if my database schema doesn't change, then loading test data should be ok. This way, I don't have to code db access into all of my test files, and so long as I use known good data, I can be confident when I write a test before I write the sub. Does this sound reasonable? Leaving the test data in the distribution in such a fashion?
Steve
In reply to Help with design philosophy II: Testing by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |