Mark implements a couple of UI tests in the sample project. Learn how to deal with various UI elements when writing a UI test. Discover the Xcode built-in record tool that helps make writing UI tests easier.
- [Instructor] Let's head over to our UI…test section and start implementing some tests.…We're going to run two tests on our app.…The first one will be when the user…denies the location permission for our app.…The second one will be when we accept it,…and then we set a max speed.…Let's start with the accepting one.…We'll use the same naming scheme as our unit tests.…We'll start with test, then underscore maximumSpeed.…And in this case we're going to be setting the maximum speed.…
We can interact with the UI in our app using queries.…Let's create a query to get the location authorization…alert that has popped up at the start of our app.…We'll create a variable called locationAlert,…and we'll set it equal to app.alerts.…This is a list of alerts that are visible.…We'll provide the title of the alert.…Since we're using our mock object,…we know that the title will be "Location Authorization."…Now because the UI tests are running on a real app…we need to wait for the existence…of this alert before we interact with it.…
- 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
Core Data for iOS and macOS Enterprise Developerswith Jon Bott1h 46m Intermediate
Learning Server-Side Swift with Vaporwith Ron Buencamino1h 30m Intermediate
Swift 3 Essential Training: Beyond the Basicswith Scott Gardner2h 58m 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.