The Logic of Testing and the Testing of Logic
melbourne.co.uk
melbourne.co.uk
In reality I see quite a few successful approaches of reaching the goal of protecting code from regression and giving us the confidence to change it.
From the viewpoint of a maintenance programmer, every artifact (file, class, method, function, test, etc.) is like a puppy you've adopted. It costs something to make, it will cost much more to maintain, and if you don't really need it, it does more harm than good.
Per the Pareto principle, 20% of the tests deliver 80% of the benefits.
Focus attention on: (i) tricky things (string parsing), (ii) security sensitive things, and (iii) fragile things (add tests when you fix a bug)
Business logic should always be the dominating force. This is often forgotten and the time you have 'real' users using the system it is too late to make sweeping changes.
Great use of the word "assert" here - pun intended?