Series: Swift Test Tutorial: Learn to write tests like a boss

This Swift test tutorial will teach you all about writing effective tests in Swift on the iOS platform. It consists of a whole set of lessons to lead you through the process of learning to become a top-notch test writer. This includes learning the basic terminology and what the differences are between unit, integration and functional tests as well as more advanced test topics such as leveling up your tests using a BDD-style approach. Much of the content here is based upon my experience writing tests for nearly 30 years. I began writing tests back in the 1990's using the SUnit test framework for Smalltalk and have continued this exercise throughout my career. Though I've been writing tests for nearly 20 years, my approach was altered significantly after reading "The Art of Unit Testing" by Roy Osherove in 2010. This tutorial is divided into several helpful sections:
  • Definitions
  • How to write tests like a boss
  • How to level up your test writing with a BDD-style approach
The first section contains individual lessons that introduce you to several important testing concepts, including:
  • What is a unit test?
  • What is an integration test?
  • What is a functional test?
  • What is code coverage?
The second section contains lessons on learning how to write effective tests. These are techniques you can use to learn how to write tests quickly. They will help you to understand what makes an effective test. The third section introduces you to the concept of BDD-style (Behavior-Driven-Development) style tests. Using a BDD approach, your tests are expressed using more English-like syntax so they are easier to write and easier to read. If you're really wanting to level-up your test writing skills, this test tutorial series is for you. Like all lessons, each is approximately 5 minutes or less so they are easy to watch and are packed with useful information.