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

Couldn't a faulty test be very risky by baking in incorrect behaviour?
 help



I look at each unit test as a sample. Some of these might be bad. In aggregate, I think they provide stronger assurances. A sample (or the sampler itself) being bad doesn't necessarily affect the thing that is being measured.

The incorrect behavior would have to be baked into the actual application at some level. I review this code much more thoroughly than the test code.


Only if the behaviour is wrong. If the test was written against a working system then it either does nothing or is no worse than a snapshot test



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

Search: