iOS

No image

iOS Code Coverage Redux

In iOS Unit Testing – Part 4 – Code Coverage, I discussed how you can evaluate how well your unit tests are exercising your app’s code by using code coverage techniques. With the advent of iOS 7 and Xcode 5, there is an additional step that needs to be done in order to have all […]

Read More
No image

iOS Unit Testing – Part 8 – Tweaking our Sound Logic

In the previous part of this tutorial, we finished up restructuring and unit testing the on-screen animation code for our sample application. We did still have some issues outstanding with the sound, however, which we will clean up in this part. As always, the source code for this tutorial may be found on GitHub. This […]

Read More
No image

iOS Unit Testing – Part 7 – Finishing our Animation Testing

Before we were so rudely interrupted at the end of Part 6 of this tutorial, we were most of the way through unit testing our SBAnimationManager class. Most of what remains is to test what happens when one of our animations ends. The source code for this tutorial may be found on GitHub. This part’s […]

Read More
No image

iOS Unit Testing – Part 6 – Redesign for Testing

As of Part 5 of this tutorial we have basic unit tests in place, but our original code is too monolithic to be able to easily test. Thus, we’re now going to restructure the SBAnimationManager class to make it more testable and flexible. The source code for this tutorial may be found on GitHub. This […]

Read More
No image

iOS Unit Testing – Part 5 – Testing Animations

As of Part 4 of this tutorial, we have tested our view controller, and added support for measuring unit test code coverage to our project. At this point, we’re going to test the SBAnimationManager class that is driving the on-screen animations.

Read More
No image

iOS Unit Testing – Part 4 – Code Coverage

In Part 3 of this tutorial, we began adding unit tests to our project. So now we know that at least some of our project has been tested. But how much? In order to answer that question, we’re going to add some code coverage measurement to the project. The source code for this tutorial may […]

Read More
No image

iOS Unit Testing – Part 3 – Testing our View Controller

In Part 2 of this tutorial, we examined a simple app we’d like to unit test, and in which there were also some bugs lurking. In this portion of the tutorial, we will begin the process. You will find the code for this portion of the tutorial in the Version2 folder in the GitHub project.

Read More
No image

iOS Unit Testing – Part 2 – Sample App for Testing

In Part 1 of this tutorial, I made some general comments about how I tend to approach unit testing iOS code. Now we’re going to begin applying these techniques to a real application. As we do this, we will make some changes to the application’s structure to make it more testable. The source code for […]

Read More
No image

iOS Unit Testing – Part 1 – Tips

For many years, iOS applications didn’t get the same kind of unit testing attention that other applications do. Part of this was due to the fact that Apple’s tools didn’t make it easy to set up and run unit tests, and part of it was “it’s all UI, and UI is hard to unit test.” […]

Read More