3 ms·
Even with 100% coverage, that doesn't mean you've found every bug that can possibly be found with unit tests. Your tests could always cover more inputs, more si
by shawnz 6y ago
Even with 100% coverage, that doesn't mean you've found every bug that can possibly be found with unit tests. Your tests could always cover more inputs, more situations, etc.
- KingOfCoders 6y agoNo, you can't find bugs that you can't think of. Property based testing and random values in unit tests find lots of bugs you didn't think of though.
- brlewis 6y ago> you can't find bugs that you can't think of Rather, you won't find bugs that you choose not to think of because you've let the "100%" number lull you into complacency, even though you know it's 100% of lines/branches, not 100% of inputs.
- KingOfCoders 6y agoYes. My problem in 40y of programming is still making bugs and those I make come from not thinking about edge cases or from wrong assumptions and not from being lulled into writing tests to meet a 100% number. But personalities differ and if being lulled into security by writing towards a 100% number is a problem for you I would be careful, I totally agree here.
- monksy 6y agoI agree that fuzz testing+linting can help you. However from my persective lower level tests help you to build trust about the software you're releasing.