Quick note: I’m moving this list to be every weekday rather than weekdays plus Saturday. That’ll keep the content fresher.
Another quick note: I helped supervise a youth camping trip yesterday and thought I had properly queued this to go out. It didn’t. My mistake.
Don’t pursue vanity metrics like 100% test coverage.
If you use TDD, you’ll just get it anyway because you only write code that a test “pulls” into existence. So, it’s not even that impressive.
Second, just because 100% of your code is exercised during your tests, doesn’t mean you have the tests that you need.
For example, you may have a data object that has a couple of methods on it. You’d develop that object by writing tests that exercise those methods and that verify they work correctly.
For the parts of your system that use this data object, you’d write tests that exercise their code that also uses the data object.
You wouldn’t skip the tests for the data object just because they happen to get used by some other test. Those other tests are testing their modules and not your data object. Just because your data object’s code got covered by a test doesn’t mean that your data object’s code is tested.
You only get that by writing tests specifically for it.