We’re all used to unit testing our applications by now. The Extreme and Agile programming movements have done a great deal to promote unit testing, to the extent that many of us are now dependent on tests to assure that our applications work reliably. But how often do we test the database underlying our applications? Given that the database, as the repository for all of the knowledge and data for an application, just might be the single most important part of that application, and that in a busy development environment one developer can change the database in ways unexpected by other developers, the time for standardized database unit testing has come.
This talk promotes the practice of writing and running unit tests that directly test the schema, storage, and functionality of application databases. Following a review of the available PostgreSQL unit testing frameworks, we’ll review examples of testing tables, views, columns, constraints, indexes, triggers, and functions. The idea is to promote complete test coverage of every aspect of a database, independent of application unit tests, to ensure reliably canonical data integrity.
David E. Wheeler is President of Portland-based Kineticode, and former CTO of Values of n, creators of the PostgreSQL-and-Rails-powered iwantsandy.com, home of Sandy, your personal email assistant. David is also maintainer and lead developer of Bricolage, a content management and publishing system powered by Perl and PostgreSQL. For his next trick, he may or may not build a Python or Lisp or BASIC-powered Web application, but whatever it is, it will likely be built on PostgreSQL. Unless it’s a blog, in which case he’ll just use SQLite.
Comments on this page are now closed.
For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at scordesse@oreilly.com
Download the OSCON Sponsor/Exhibitor Prospectus
Download the Media & Promotional Partner Brochure (PDF) for information on trade opportunities with O'Reilly conferences or contact mediapartners@ oreilly.com
For media-related inquiries, contact Maureen Jennings at maureen@oreilly.com
To stay abreast of conference news and to receive email notification when registration opens, please sign up for the OSCON newsletter (login required)
View a complete list of OSCON contacts
Comments
I guess I’m old-fashioned. So take my earlier feedback with a grain of salt as it suits you.
I do agree the topic was important, and your demonstrations were engaging examples of the “show, don’t tell” principle.
Apparently disagreeing with a previous commenter, I found your talk very engaging.
Apart from being interesting I also learned a lot – for those who didn’t attend I’d like to add one lesson that I believe really is the key here: Where there’s code, you should unit test.
You tried too hard to use an irreverent style, and pushed over the line into being unprofessional. You have good content—don’t be such a clown that you spoil your credibility.
Entertaining and informative, and he referenced Perl’s Test::Tutorial. ‘Nuf said.