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

I like spec based testing because I think the tests you end up producing with it are seriously useful and can actually help guide your programming if you think of the test names (not the actual test code) before you start coding, but I've never been able to actually write tests in full before coding.

I try to think about how I'll test something when I'm coding it (so that it's easy to test), I try to consider what I'd actually be testing in a given piece of code (so the concerns are separated), and I try to stick pieces near each other that are coherent (so they can use similar setup/teardown for a testing context as needed). But I don't have the actual test code down.

I'll fight anyone that says automated tests aren't wortwhile though.



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

Search: