[Dbix-class] Basic Schema Testing / Sanity Checking

Chisel Wright chisel at herlpacker.co.uk
Sat Mar 29 12:22:34 GMT 2008

I've had my own little module for a while that does basic checks on
column, relation, class and resultset methods for DBIC classes.

I'll be honest - I wrote it without even looking to see if there's
anything similar.

Because I'm "lazy" I boiled these tests down to a smidgen of setup, 4
lists of "stuff to check" and one method call; better explained in the
POD for the module:

This provides me with a basic sanity check that my schema (still)
supports the calls I think it should. It's intended as a complement to
the more thorough "does this do what I think it should" model testing
that we (should) all do.

As I'm now using this idea in two places, I've come to the conclusion
that for my own sanity at least I'd like to promote this to a
Test::SomethingOrOther::* module in CPAN.

Before I run down this route:

 1. have I re-invented any obvious wheels?
    I don't think Test::DBIC (the only close match I can find) does the
	same sort of thing,

 2. it works for me in two separate projects; are there any obvious
    stupidities that I should rethink before inflicting it on the world?

 3. any suggestions for a module name? Test::DBIC::* or
    Test::DBIx::Class::* ?
	T::D::Schema maybe?

Thanks for reading,

Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/

  For this and the answers to many other questions don't ask me.

More information about the DBIx-Class mailing list