Visualizing test results

Keyboard Shortcuts

In this video, explore how to keep track on the results of your unit tests. Mark DiFranco shows you where to look in Xcode for the test results, and shows how you can use these interfaces to help decide where to add more tests.

- [Instructor] Now that we've taken the time…to write unit tests for our code, we need to make sure…to monitor them, and ensure that they all continue to pass.…Xcode has several features that can help us do this.…There's a section in the navigator panel…on the left side of Xcode.…We can click on the diamond icon, which is the fifth icon…from the left, or hit command five to open it.…Here we can see the results of every single test,…and every single test case.…We can highlight over the diamonds to run a single test,…or a test case.…We can also take a look at detailed test results…for a specific run of tests.…

For that we'll head over to the report navigator,…which is the last icon…on the right side of the left navigator panel.…We can expand the Speedometer section.…And we'll select one of the test lines.…Here we can see the results…of all of our tests and test cases once again.…There's also a section called Coverage.…This section gives us detailed results…on how much of our code is covered by tests.…We can sort by Coverage…

Resume Transcript Auto-Scroll

Author

Released

5/24/2017

Bugs are nearly inevitable in modern day app development. As a result, it's important to write your apps in testable ways. In this course, learn how to architect your Swift app to make testing a breeze. Mark DiFranco covers dependency injection, how to use protocols to help with tests, best practices for organizing your tests, and working with UI tests. He helps to illustrate the different concepts covered in this course by building a speedometer app.