Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The main advantage I've found from testing little bits in isolation is that it tells you a lot more about where exactly the bug is. However, there's no reason why you need to write them in advance to get this benefit.

The general workflow I've grown fond of is to write mostly higher-level tests that test the system as a whole, and then only write fiddly unit tests when there actually is a bug to fix. Those unit tests then stick around, but I don't feel bad about blowing them away without replacing them if the thing being tested changes significantly enough to make them useless.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: