I ran into some code the other day that was running some unit tests. The only problem was that all of the test was using mock objects. None of the test was running actual code.

Yes, the only thing that was being tested is that the Java virtual machine can run Java.

I think I need to make a system that can writing 100% mocked unit tests that will guarantee 100% code coverage based on mocked tests. That will certainly pass all of the code coverage hurdles.

But it does nothing to ensure correct code.

But that the tests that we have.

It’s high code coverage. But little logic coverage.

No amount of brainlessly added code coverage, just to get the icon to turn green, will bring any assurance the code works.