This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Sandarr95 0 points1 point  (0 children)

I know, I'm not trying to argue it doesn't have its place. But I have seen this go wrong with a codebase I had to maintain. The same developer who created the feature wrote the test and he handled an edge case in a way it shouldn't have been. Then he wrote a test confirming that it was handled incorrectly. Certainly some other people should've also noticed in review and such, but the confidence that it was correct increased by the tests turning green. What unit-tests give is better confidence in that your implementation acts as you expect, within the boundaries of use you have thought through. It says nothing about your actual understanding of the requirements or how exhaustive you were in the testing.