loading...

Discussion on: No excuses, write unit tests

Collapse
mortoray profile image
edA‑qa mort‑ora‑y

In a lot of situations writing a test first adds absolutely zero overhead time. As a programmer you need some way to verify your new feature works anyway, so the test code might as well be a unit test.

I'd go further and say that unit testing can even save development time by isolating features. Many features become complex when exposed to higher layers, or by the time they make it into the UI. By isolating the actual new functionality at a lower level you can save effort trying to test the feature.

Note, I draw one big exception to unit testing, and that's the final UI layer. I'm still in favour of structured testing, but find low-level automation is not cost effective.