Along with Xcode 16, Swift 6, and everything else that was announced in 2024, Apple shipped a new testing framework called Swift Testing. This testing framework is built entirely on the Swift language and works everywhere where Swift also works.
In this workshop, we're going to take a look at this new testing framework, how you can start using it, how it works in existing projects, as well as provide a solid introduction to you about unit testing, how it should work, different kinds of testing, and how you can architect your app to properly work with a testing strategy. So if you're looking for a comprehensive introduction into testing, this workshop is for you.
We'll start off with the very basics. We'll talk about why you want to test, how you can integrate tests into your workflow. And very important, we're also going to talk about how you can actually make sure that you get and have the time to write unit tests while you're working.
After that, we're going to take a look at how testing used to work with XCTest for a very brief amount of time, and then we'll dig into Swift testing. You'll learn the very basics about how you can write tests, how you can do pattern matching, how you can test asynchronous and synchronous code, and how you can build entire test suites, leveraging all the different macros that Swift testing has.
By the end of this workshop, you should be able to start using Swift testing for your own projects, and you'll be able to build test suites quickly and efficiently.