
Why iOS developers don't write unit tests - jtbrown
https://roadfiresoftware.com/2018/03/why-ios-developers-dont-write-unit-tests/
======
cpt1138
"The majority of responses fell into this category; lots of developers don’t
see the benefit of writing unit tests or even believe they’re harmful."

If the majority see no benefit, how do you come up with "a lot of people said
they should write tests but either don’t know how or don’t feel like they have
enough time."

In a response cohort of 30 I doubt you have much to go on, but consider that
in practice, formal code reviews, baseline acceptance testing and large scale
beta testing are far easier to manage and are far more useful for finding
issues. I personally have experienced that often testing is harder and more
time consuming that the actual code. The benefit is marginal at best. Testing
code is objectively MORE code to maintain and debug.

------
eberkund
Personally I have found that structuring my code so that I am able to write
unit tests has been far more useful than any unit tests themselves. For your
code to be testable it requires a certain structure and decoupling of
dependencies that was not natural to me at all when I first starting doing
projects. Now that I know that I might one day want to write a suite of tests
with full coverage, I write my code much differently.

~~~
jtbrown
I agree — I think testable code is generally just better code because it
requires the decoupling of dependencies.

