dragonchild has asked for the wisdom of the Perl Monks concerning the following question:
With the controllers, I'm pretty comfortable with the idea of mocking up the appropriate model and view classes so that I know what I'm testing. So, that's not a big issue.
With respect to CDBI, Catalyst uses Class::DBI::Loader to auto-generate the CDBI classes for you, based on your schema. My CDBI classes literally look like:
I've looked at Automated testing of database classes, but then I realized that since I'm not modifying the classes, any additional tests I write beyond the use_ok()-type tests will be testing CDBI::Loader, and so they shouldn't be in my application's test suite. So, should I write any tests here? I'm comfortable without any, but am I missing something?package MyApp::M::CDBI::MyTable; use strict; 1; __END__
With respect to TT, I've got a lot of .tt files that get PROCESS'ed into my templates, where appropriate. I also have a lot of BLOCKs, WRAPPERs, and the like. Catalyst provides a MyApp::V::TT, but that's the place where Catalyst ends and TT begins. I've got my TT configuration options and some every-page values (like my menubar), but I'm not testing any of the actual TT code. Ideally, I'd like testing the actual TT snippets, but I'm at a loss for where to begin. An additional facet is that a lot of these snippets are probably going to be used in other projects, so I'd ideally like for them to have their own test suites ... ?
Basically, I'm literally asking for wisdom here. Catalyst, CDBI, and TT are all amazing infrastructures, but they're very daunting and I'm at a loss for where to begin when it comes to a test suite.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Testing TT and CDBI under Catalyst
by Corion (Patriarch) on Jun 27, 2005 at 13:44 UTC | |
Re: Testing TT and CDBI under Catalyst
by sri (Vicar) on Jun 28, 2005 at 01:47 UTC | |
by dragonchild (Archbishop) on Jun 28, 2005 at 03:55 UTC | |
by sri (Vicar) on Jun 29, 2005 at 13:24 UTC |