Back-end Engineering
Foundations of TDD in Swift and XCTest: The Principles
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.
Swift
6 lessons
27 practices
4 hours
Programming, Algorithms, and Data Structures
Lessons and practices
Writing the First Test in TDD with Swift
Making the Test Pass in TDD with Swift
Refactoring the Sum Function in TDD with Swift
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
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
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
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
Refactor TaskList Test Suite Using AAA Pattern
Meet Cosmo:
The smartest AI guide in the universe
Our built-in AI guide and tutor, Cosmo, prompts you with challenges that are built just for you and unblocks you when you get stuck.

Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal