How to write a unit test in Swift 5 using Xcode 12

How to write a unit test in Swift 5 using Xcode 12

In this video, I teach you how to write unit tests in Swift 5 using Xcode 12. The best reason to use a test is to protect your future self from making mistakes and creating a mess by breaking a function. A test will help make sure that your function always outputs the right information.

Here are the GitHub links as promised:

Here are the time stamps for the video.

  • 0:00 - Intro
  • 1:40 - How to Add Tests to an Existing App
  • 3:47 - How to Write a Unit Test in Swift
  • 10:18 - What are the different XCTAssert functions?
  • 12:49 - How to Structure a Unit Test in Swift 13:37 - Outro