3 ms·
> aim to have 96%-99% code coverage I find this sort of optimism both cute and frustrating. The reality is that almost no company is willing to foot the bill f
by lsaferite 4y ago
> aim to have 96%-99% code coverage
I find this sort of optimism both cute and frustrating. The reality is that almost no company is willing to foot the bill for such a level of code coverage as it makes writing the application take easily 2x as long. Sure, it'll theoretically be more provably correct, but the cost difference isn't easy to swallow. The reality is more like you have good path coverage for a small subset of business critical code with the rest of the code getting tested at a more macro level with integration and functional testing. And that's not even touching on the theory vs reality of how much better the code will be with those unit tests. Writing _good_ tests is harder than most people think. Writing tests that have good path coverage and good input fuzzing is _really_ hard. Writing a test that checks the box for 'code coverage' can be done trivially in many cases, but provide no real value.
- ActorNightly 4y ago>The reality is that almost no company is willing to foot the bill for such a level of code coverage as it makes writing the application take easily 2x as long This is only true if the codebase uses some highly inefficient setup that makes writing/running unit tests a pain. And a general corporate policy for many companies, including big ones like Amazon, is to aim for >90% coverage with strongly typed languages like Java, regardless.