This is part 2 in a multi-part series on iOS unit testing and integration testing. In the last post, we discussed setting up the project and adding some dependencies with CocoaPods. Today, I’m going to go through setting up some initial code to use the 3rd party libraries to make sure that the libraries are working. Then we’ll set up logic tests and see what breaks with CocoaPods (spoiler: compiler errors ahead!
Continue reading

I’m continuing on my task to get a full project using iOS unit tests and integration tests. My first step is to set up logic tests in Xcode. I recently watched an excellent unit testing course on Lynda. In that course, Ron Lisle goes over the advantages of using logic tests. The most compelling factor in using logic tests over application tests is speed. Application tests actually bootstrap the entire app in order to run.
Continue reading

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 recently switched to ReadKit for reading Instapaper articles on my mac. I switched over from Read Later (no longer available). Read Later was my app of choice for a long time, but it is no longer in active development. The team was hired by Pocket, and they are working solely on the mac app now. Read Later was good, but some much needed updates were never implemented. The display for articles was frequently skewed, and the app had started to crash a lot.
Continue reading

I’m going to try to do a post once per month detailing my current iPhone homescreen. If it works out well, I might also do one a month for the iPad as well. Below is a screenshot of my current homescreen. Some of my favorites Apple folder Not a whole lot to note in here. This is just a quick collection of the stock Apple apps. Mostly, it’s a place to quickly get to SMS, settings, the App Store, and Mobile Safari.
Continue reading

CodePilot

I’ve been using a handy little utility named CodePilot since Xcode 3.x. CodePilot runs as a plugin and does a few things simply. It will open any file that has been indexed in your project, and also allows for searching symbols within a file. I know the native Xcode Open Quickly (⌘ + ⬆ + O) dialog has also been able to do this for a long time, but it has always seemed to me to be a little bit slower and less intuitive than CodePilot.
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