When diving into a brand-new class, it's a good idea to get to know the template Xcode provides. In this video, get an overview of the functionality and layout of a default test class.
- [Instructor] Our basic data type in this course…is going to be a movie structure.…Now, I've gone with a struct here instead of a class…because our movie objects are really simple,…only having a title…and an optional release date,…and they also need to be value types.…Before we get into all that,…let's take a look at the default test case…that Xcode created for us.…Here in our FilmTests folder,…go down to the FilmFestTest.swift file.…The basic anatomy of an XCTest case…is pretty straightforward.…At the top of the file,…we have the framework import…which gives us access to all the functionality we'll need…to write our tests…and a really important line,…the @testable import.…
This is going to let our test classes communicate…with our actual application code,…so it's crucial that we don't forget to add this…when creating new scripts.…Now, in the body of the class,…you can see that up first,…we have a setUp method.…This is going to run before each test method…in the class is executed.…We also get a tearDown method here…
- What is test-driven development?
- Creating and expanding a data model
- Creating a manager class
- Testing class methods
- Checking for duplicates
- Testing table views
- Mocking cells
- Testing cell selection
- Assembling the app
Skill Level Intermediate
Advanced iOS Development: Working with APIswith Saul Mora1h 59m Intermediate
Designing iOS and Android Appswith Renata Phillippi1h 6m Intermediate
1. Foundation and Theory
2. Getting Started
3. The Manager Class
4. TableView Testing
5. Finishing Touches
- 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.