Mark DiFranco explains how debugging an app with unit tests is much easier. First, learn how to isolate a bug with the core logic. Then, learn how to identify an issue with the user interface.
- [Instructor] Now that we've added test cases…for all of our classes, and we've fixed a few bugs…along the way, let's run the simulator again…to make sure everything is working.…Again, we'll go to the Debug menu, go to Location,…and select Freeway Drive…to make sure that we're getting location updates.…It looks like our UI is still not updating.…Because we've written tests for most of our core logic,…the problem likely lies in our proxy…that's wrapping our external dependency on location manager.…Let's head back over to our project and open up that file.…
We'll open up the Speedometer group…and then the Location group.…The SPDLocationManager is located at the bottom.…This class is very easy to debug,…since we've gone out of our way to make sure…there's no logic in the class.…We tried to push all the logic into the upper classes…where we can test them.…All we need to do is look over the class…and make sure nothing is out of line.…We have our delegate method set up,…but are we setting delegate on the location manager?…
- Why write unit tests?
- What is dependency injection?
- Using protocols to help with tests
- Handling external dependencies
- Anatomy of a test case
- Writing tests
- Analyzing code coverage
- Visualizing test results
- Writing and extending UI tests
Skill Level Intermediate
1. Dependency Injection
2. Using Protocols
3. Writing Tests
4. UI Tests
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.