Unit testing is an important step in the development process and a great way to efficiently debug your code. In this brief tutorial, see how to create and execute unit tests in Xcode.
- [Instructor] Another important skill you'll need…as an iOS developer is unit testing.…Unit testing allows you to test…functionality of a small amount of code…so that you can make sure that it works on its own.…Let's take a look at how to create a testing target.…Select your Xcode project and then, in this area…right here, which you can show or hide with this button.…Click the plus button to add a new target and in the menu…filter for unit test,…just type unit out and you should…see iOS Unit Testing Bundle.…
Hit Next, you can give the product a custom name…if you want or just leave the default name…and then hit Finish.…And once you've created that you're going to see…this group over here on the left.…So we have Testing Tests.…Click in there and you're going to see some existing code.…This allows you to perform a test for your application.…So there's a set up method in here…that runs before each test.…
There's a tear down method that runs after each test.…And here is an example test and then you have…a test performance example here.…
- Installing and using Xcode
- Working with storyboards
- Working with UI objects and events
- Resizing objects and layouts dynamically
- Coding UI objects such as buttons
- Loading and displaying data in table views
- Testing your iOS app
Skill Level Beginner
1. Xcode Fundamentals
2. Core Skills
3. Responsive UI Design
4. Coding UI Objects
5. Table Views
6. App Flow and Testing
Next steps1m 8s
- 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.