“How do you know if the code you have written is being executed
during regression or unit testing? One way is to use a debugger.
Another way is to log every line of code. Yet another way is to
compare the expected results of the test with the actual results.
The latter usually suffices. All three methods are ‘somewhat’
potent, but nonetheless, all three methods are not enough.“The first case will work in a small, non-repeatable test. The
second method clutters your code and the verification process is
labor intensive and ineffective. Only the third method is generally
accepted by the IT and user community. The third method relies on
the test author to cover ALL conditions and prepare test data in
such a way that all test conditions are met. You put your trust
into the test author’s hands…”