Getting Started With Unit Testing in Swift (XCTest, Test Cases, Code Coverage)

Опубликовано: 09 Май 2021
на канале: tundsdev
9,931
214

In this Swift tutorial, we’ll be building on top of our Onboarding App that we built in our previous video and add in some unit testing. We’ll also discuss what is unit testing and how iOS unit testing works by breaking down our onboarding app’s logic. We’ll also discuss the what is included in XCTests and how to assert expressions to make sure our swift unit testing code works and validates our test cases, finally we’ll touch Xcode code coverage and see how we can use this to make sure we have applied unit testing in core areas of our app.

Timestamps

00:00 Introduction
00:13 Brief introduction to Unit Testing
01:48 How to add Unit Tests into an existing Xcode project
02:52 Adding XCTests & Unit Testing our Plist Manager
08:29 Adding XCTests & Unit Testing our Onboarding Content Manager
09:35 Creating Mocks
14:21 Enabling Code Coverage in Xcode
16:44 Wrap up

Build Onboarding Screens in SwiftUI (TabView, PageTabViewStyle, SwiftUI Tutorial, @AppStorage)
   • Build Onboarding Screens in SwiftUI (...  

Getting Started with Combine (Practical Combine Framework Examples in UIKit & SwiftUI)
   • Master The Combine Framework: From Be...  

Build a news app in SwiftUI tutorial series
   • SwiftUI News App (Beginner Level | MV...  

Build Clubhouse in SwiftUI 2.0 and Dark Mode (SwiftUI Tutorial, SwiftUI 2.0, Clubhouse App Clone)
   • Build Clubhouse in SwiftUI 2.0 and Da...  

#iosdev #unittesting #iosunitesting #iosunittestingswift #codecoverage #testcases