Re:Learn iOS development by building apps
by gurkendoktor on Wednesday May 21, 2014 @03:28PM
(#7780222)
I don't think it's a community thing. I would absolutely use tests if I was writing any interesting, algorithmic code. Compilers, data structures, pathfinding, whatever.
But most iOS apps are one half glue code that interacts with a JSON backend, and one half GUI code. Neither half is fun to test. And from my experience with coders who insist on tests, they never catch the interesting bugs anyway - session expiry in the wrong screen, animations that break if you interact with them too fast, using APIs that are not available on $(previous iOS), etc.
Unit Tests are becoming more popular in iOS as the Rails community strengthens and influences other developers, but I agree there are some aspects in which integration tests using something like KIF can be far more valuable in making sure that the code is working as intended.
Unit testing is not exclusive to Rails nor are its origins with the Rails community. JUnit (Java) was written in the '90s by Kent Beck of Smalltalk fame and still figures prominently in the Java community today.
Re:Learn iOS development by building apps
by kocheez75 on Wednesday May 21, 2014 @03:36PM
(#7780277)
In the past, I worked for a firm that had a fairly strict testing culture, and that applied to ios as well. We used kiwi specs, which have more-or-less the same syntax as rspec. In the end though, I think it was probably more trouble than it was worth, due to the ridiculous stubs and mocks you need to accomplish testing certain things (stubbing alloc, for instance).
Is this common on iOS?
I talked with someone, and he said his experience were that specs was rarely done by iOS developers. He said it wasn't a tooling issue, but more a community issue.