Re:Ask HN: What made you change your mind about a programmin...
by shittydeveloper on Monday March 11, 2019 @08:11AM
(#19358309)
Apologies sir...! When I said unit tests, I mean a specific unit of code (in TDD manner).
I mistunderstood your Integration tests. I understand them as something like checking from the end user contract. If so, without TDD, it won't be possible to track down the bug easily as with TDD.
Unit tests on the other hand are useless at identifying complex issues like race conditions; they're only good at detecting issues that are already obvious to a skilled developer.
* I restart the system from scratch between each test case but if that's too time-consuming (I.e. more than a few milliseconds), I just clear the entire system state between each test case. If the system is truly massive and clearing the mock state between each test case takes too long, then I break it up into smaller microservices; each with their own integration tests.