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

Use automated tests for any software where the probability of you working on it in the future is > 0.

Any testing is better than none.

Good testing is better than bad.

Good tests;

* Are relatively simple to write if the design is decent

* Make clear what is being tested

* Do not break if something unrelated changes

* Run quickly

Understand the difference between unit testing, and integration testing. Chances are, you're doing the latter, thinking you're doing the former, and wondering why it's so much work.

Lastly, know when TDD and BDD is appropriate.

For me, it is around the 25% mark; earlier, and I spend too much time fixing the tests as the design goalposts change, later, and I spend too much time fixing bugs that could have been prevented by tests.



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

Search: