An attribute of a strong framework is in its ability to self-validate, and unit testing should be part and parcel of every development project. In this video, learn about how to unit test your API calls in Combine, via Xcode.
- [Instructor] As a methodical Swift developer, … it is important that you always ship tested code … and this especially holds true … when working with remote services … through frameworks such as Combine. … In this video, … we're going to explore unit testing with Combine. … Let's begin. … As a Swift developer, … you should not only write test cases … for synchronous functions, … but also asynchronous functions such as API calls. … But how do you do unit testing in Combine? … Well surprisingly, it's not that hard. … Testing publishers involves creating subscribers … that observe your publishers … and like with any typical Swift testing approach, … you then use assertion functions like you would normally do. … The easiest way to demonstrate this … would be to jump straight into the code. … In this video's exercise file, … I make use of an existing class called APIService. … But before we look into that, … let's start off first with our tests … as we would like to be test-driven developers. …
- Functional reactive programming techniques
- Transmitting data with publishers
- Consuming data with subscribers
- Publishing data
- Creating a simple Combine data stream
- Calling REST APIs
- Handling errors
- Using testing
- Managing threads with schedulers
- Throttling publisher data
- Leveraging advanced operators
Skill Level Advanced
1. Introduction to Combine
2. Combine Fundamentals
3. Work with REST APIs
4. Advanced Concepts
Go forth and code1m 31s
- 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.