Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Foundations of TDD in Swift and XCTest: The Principles

via CodeSignal

Overview

This course introduces Test-Driven Development (TDD) for Swift projects, covering the Red-Green-Refactor workflow, TDD mindset, and setup with XCTest. Learn best practices like SOLID principles and dependency injection, and explore TDD's impact on code quality and speed compared to traditional approaches.

Syllabus

  • Unit 1: Introduction to Test-Driven Development with Swift and XCTest
    • Writing the First Test in TDD with Swift
    • Making the Test Pass in TDD with Swift
    • Refactoring the Sum Function in TDD with Swift
  • Unit 2: Generalization in Test-Driven Development with Swift and XCTest
    • Writing a Failing Test for the Sum Function in Swift
    • Turning Red into Green: Implementing the Sum Function
    • Refactoring Unit Tests for Sum Function Using Parameterized Tests in XCTest
  • Unit 3: Adopting a Test-Driven Development Mindset with Swift and XCTest
    • Writing a Failing Test for calculateTotal Function
    • Implementing the calculateTotal Function in Swift
    • Creating a Failing Test for Single Item in calculateTotal Function
    • Implementing Initial Functionality for calculateTotal Function
    • Refactoring the calculateTotal Function in Swift
    • Creating a Failing Test for Multiple Items in calculateTotal Function
    • Implementing the calculateTotal Function in Swift
    • Refactoring calculateTotal Function Using Reduce in Swift
  • Unit 4: Setting Up a Swift Testing Environment with XCTest on Ubuntu
    • Exploring XCTest with User Class and Asynchronous Testing
    • Testing User Creation with XCTest
    • Refactoring Test Setup with setUp in XCTest
    • Grouping Email Tests with Separate Classes in XCTest
    • Testing Invalid Email Exception with XCTest
    • Testing Asynchronous User Fetching with XCTest
  • Unit 5: Managing Dependencies in TDD with Swift and XCTest
    • Testing UserManager with Dependency Injection in Swift
    • Testing UserManager with Dependency Injection in Swift
    • Refactoring UserManager Tests for Clarity
    • Testing UserManager with Dependency Injection in Swift
    • Implementing Logging in UserManager with Dependency Injection
    • Refactoring UserManager Tests for Clarity in Swift
  • Unit 6: Introduction to the AAA Pattern in TDD with Swift and XCTest
    • Refactor TaskList Test Suite Using AAA Pattern

Reviews

Start your review of Foundations of TDD in Swift and XCTest: The Principles

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.