When should we test a Database
Testing of databases involves initial testing of database and database refactoring. This strategy can be applied concurrently to both the application code and the database schema. Testing of databases is done not only during the release but also during the development.
New software developers follow Test-First Approach wherein a test case is first written and then code is written which will fulfill this test.
A) Step by step approach is as under:
Step – 1: A test is added for just enough code to fail.
Step – 2: Tests are then run to make sure
that the new tests does in fact fail.
Step – 3: Functional code is then updated so that it passes the new tests.
Step – 4: Tests are run again.
Step – 5: If tests fail, update functional code again and retest.
Step – 6: Once the tests pass, next step is start again.
B) Test First Approach: TFA is also known as initial testing of database.
Test Driven Development: TDD is a progressive approach. It comprises TFA and refactoring (Regression testing).
This can be expressed in form of a equation:
TDD = TFA + Refactoring
When should we test a Database
The process of refactoring here means a small change to a database schema, which improves its design without changing its semantics. It is an evolutionary improvement of our database schema, which will further support following three things:
1) New needs of our customers.
2) Evolutionary software development.
3) Fix legacy database design problem.
Many More Articles & Tutorials on Databse Testing
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.