Re:Code reviews don't usually find bugs
by organsnyder on Tuesday May 14, 2024 @03:32PM
(#40359174)
I review the tests as much (or more) as the code. If the tests are set up to test the right business rules, then I can be reasonably sure that the code will behave as expected.
I don't know of anyone that regularly does this during code reviews.
In my experience, automated tests help to catch regressions, i.e., they help catch error cases that people have already anticipated. If the system fails in some brand new unexpected way, you won't have tests for it by definition.
Similarly, static analysis can help catch certain classes of bugs, but there's plenty of things they won't be able to spot.
Yes, they're both useful, but neither of these is a replacement for code review. They're all complementary.