What is Self-Testing Codeand?

  • by David Spuler, Ph.D.

What is Self-Testing Code?

Instead of doing work yourself, get a machine to do it. Who would have ever thought of that?

Getting your code to test itself means you can go get a cup of coffee and still be billing hours. The basic techniques include:

  • Unit tests
  • Regression tests
  • Assertions
  • Self-testing code blocks
  • Debug wrapper functions

The simplest of these is unit tests, which aim to build quality brick-by-brick from the bottom of the code hierarchy.