Furthermore, many agile software developers realize that you can test more than just your code, you can in fact validate every work product created on a software development project if you choose to. In this section I discuss the need for various database sandboxes in which people will test: in short, if you want to do database testing then you're going to need test databases (sandboxes) to work in.
I then overview how to write a database test and more importantly describe setup strategies for database tests.
This reflects a penchant for over-specialization and a serial approach towards development by traditionalists, two ideas which have also been shown to be questionable organizational approaches at best.
Figure 1 indicates what you should consider testing when it comes to relational databases. Agile software developers take a test-first approach to development where they write a test before you write just enough production code to fulfill that test.
A significant advantage of writing creation scripts and self-contained test cases is that it is much more likely that the developers of that code will place it under configuration management (CM) control.
Although it is possible to put test data itself under CM control, worst case you generate an export file that you check in, this isn’t a common practice and therefore may not occur as frequently as required.
Many traditional data professionals seem to think that testing is something that other people do, particularly test/quality assurance professionals, do.
In this article I argue for a fully automated, continuous regression testing based approach to database testing.
Just as agile software developers take this approach to their application code, see Agile Testing and Quality Strategies, we should also do the same for our databases.
For details, read the article What To Test in an RDBMS. Next you run your tests, often the complete test suite although for sake of speed you may decide to run only a subset, to ensure that the new test does in fact fail.
You then update your functional code to make it pass the new tests. If they fail you need to update your functional code and retest. Test-driven development (TDD) is an evolutionary approach to development which combines test-first development and refactoring.