by IanMalcolm · 14y ago · 0 comments
Now, I believe 100% test coverage is plain silly. There are things you don't really have to test, and you are the only one who can tell.
I just started building a new app, and haven't done any testing until I was half-way through the first iteration (what I considered to be my first public alpha). I wrote a few tests to make sure the functionality I'd implemented would still work when I changed the code, then I moved to a more TDD dev style.
I wrote a few (maybe 10) tests for things I wasn't sure how they'd behave, noticed I could fix some of my code.
So, TDD can help you, for sure. But don't get too caught up in writing tests if it's getting in the way of actually writing your code.
Agreed with this for sure. It makes maintaining tests unsustainable and time consuming to write. Cover your bases cases and make sure that important failure cases are covered. Don't try cover every possible iteration under the sun. I find that well written tests should almost read like executable documentation.