Tuesday, June 06, 2006
Unit Testing in Production
There are some unit tests that should be run in a production environment. Sounds heretical, but wait a moment.
fsck is the Unix file system checker. It checks the file system and reports on errors. At heart it is just a unit test that looks for faults in the file system.
Quite a few unit tests can be written to do the same. For example, read a database and check that it is consistent.
Take a collection of bonds, price them and check the prices against an external source.
All of these tests work on large data sets and should be available in a system. They are particularly useful after an upgrade has been installed.
I have even written tests to check that a system has been configured in the correct way.
fsck is the Unix file system checker. It checks the file system and reports on errors. At heart it is just a unit test that looks for faults in the file system.
Quite a few unit tests can be written to do the same. For example, read a database and check that it is consistent.
Take a collection of bonds, price them and check the prices against an external source.
All of these tests work on large data sets and should be available in a system. They are particularly useful after an upgrade has been installed.
I have even written tests to check that a system has been configured in the correct way.
Subscribe to Posts [Atom]