I have wanted to get better at unit testing and the tooling around it for some time. I usually start out determined to get a good amount of the code covered by unit tests, and to possibly get some UI tests built around user interactions. Unfortunately, deadlines intervene, and the tests get abandoned. With my most recent project, I decided to put all of these practices in place. This is going to require learning as I go, and I intend to document my progress here for my own learning and hopefully to help anyone else who is researching the same thing.
Continue reading

I’m in the process of adding OCUnit tests to an existing iOS code base. Throughout this process, the biggest pain point I have encountered has been the simulator taking over the screen after an application test suite has run. This behavior completely breaks the flow of red/green/refactor, especially when you are on a roll. Here is a typical round trip for me when testing using the default behavior: Make a code change Hit ⌘ + U to run the test suite Simulator appears and takes over the screen Tests complete in Xcode, which is now behind the simulator ⌘ + ⇥ back to Xcode to check the results, or ⌘ + ⇥ to the simulator, then ⌘ + Q to quit it I solved this problem by running a script to close the simulator.
Continue reading

Author's picture

Mark Struzinski

iOS dev @ Lowe’s Home Improvement

North Carolina, USA