Latest Edition · Swift 6 Ready

Swift Testing
by Design

Designing Tests from Different Perspectives

Master the transition from BDD to TDD in Swift and SwiftUI. Build resilient, architecturally sound apps through two distinct testing tracks.

Swift Testing by Design Book Cover

Help me decide if this book should exist.

I believe in building things people actually want. To ensure this book is a valuable resource worth the hundreds of hours of writing, I won't finish the manuscript unless at least 100 developers show interest. This is a collaborative effort to validate the demand for modern Swift testing architecture.

Validation Progress0 / 100

Be the first! We need 100 people to commit to making this a reality.

26
Chapters
4
Bonus AI Docs
2
Real-World Apps
1
Live API

Master Testing Through Two Distinct Perspectives.

This book covers both sides of testing TDD and BDD from both perspectives of starting from a new app as well as integrating it into an existing app. The main focus of this book is to cover BDD from the design perspective. SwiftUI Testing is built on TDD so this is the common way it is used this book will show it from the design perspective.

terminal

Track 1: Swift Testing

Focus on the official Swift Testing framework. Learn modern, macro-driven testing that integrates deeply with Swift's concurrency model and standard library.

  • check_circleModern Swift Macros
  • check_circleAsync/Await Testing
  • check_circleNative Integration
type_specimen

Track 2: UserSpec

Dive into Behavior Driven Development (BDD). Use UserSpec to write tests that read like requirements, bridging the gap between business logic and executable code.

  • check_circleBDD Methodology
  • check_circleHuman-Readable Specs
  • check_circleDomain-Centric Testing

SkyTrack (New App)

Architect for testability from the very first line of code in a greenfield SwiftUI project.

SkyBook (Existing App)

Learn how to introduce testing to an existing, complex codebase without breaking production features.

Premium Add-on

The Challenge Companion

Every chapter ends with a challenge. The companion provides the solutions, split for your level of expertise.

code

Section 1 — Code Only

Just the solution code. Designed for experienced developers who want to check their work quickly without the fluff.

list_alt

Section 2 — Step by Step

A full architectural walkthrough of how to think through the solution from scratch.

Rationale: Keeps the main book clean. Covers the 20% of edge cases and deep-dives that advanced readers want to explore further.

What's Inside

  • check26 Challenge Solutions
  • checkHarder Edge Cases & Variants
  • checkInside-Out Testing Patterns
  • check'Review & Pay' Bonus Screen Challenge

Table of Contents

26 chapters. 4 bonus chapters. 2 apps. 1 live API.

Swift 6.0AI Ready
Introduction — Why I Avoided Testing and Why I Wrote This BookNot Started
Chapter 1: The Testing MindsetNot Started
App screenshot 1
App screenshot 2
App screenshot 3
App screenshot 4
App screenshot 5
Part 1

SkyTrack — New App

Built from scratch. Tests from day one.

Part 1ASwift Testing
Chapter 2: SearchNot Started
Chapter 3: Flight ResultsNot Started
Chapter 4: Fare SelectionNot Started
Chapter 5: Passenger DetailsNot Started
Chapter 6: Seat SelectionNot Started
Chapter 7: ConfirmationNot Started
auto_awesomeBonus: AI as a Testing PartnerNot Started
Part 1BUserSpec
Chapter 8: Design-Driven DevelopmentNot Started
Chapter 9: SearchNot Started
Chapter 10: Flight ResultsNot Started
Chapter 11: Fare SelectionNot Started
Chapter 12: Passenger DetailsNot Started
Chapter 13: Seat SelectionNot Started
Chapter 14: ConfirmationNot Started
auto_awesomeBonus: AI and Design-Driven DevelopmentNot Started
App screenshot 1
App screenshot 2
App screenshot 3
App screenshot 4
App screenshot 5
Part 2

SkyBook — Existing App

Already built. Zero tests. More broken than you think.

Part 2ASwift Testing
Chapter 15: Live Flight MapNot Started
Chapter 16: Flight ListNot Started
Chapter 17: Flight DetailNot Started
Chapter 18: Airport DetailNot Started
Chapter 19: Route BrowserNot Started
Chapter 20: StatsNot Started
auto_awesomeBonus: AI and Existing CodebasesNot Started
Part 2BUserSpec
Chapter 21: Live Flight MapNot Started
Chapter 22: Flight ListNot Started
Chapter 23: Flight DetailNot Started
Chapter 24: Airport DetailNot Started
Chapter 25: Route BrowserNot Started
Chapter 26: StatsNot Started
auto_awesomeBonus: AI and UserSpec at ScaleNot Started

Choose Your Edition

Invest in your career as a professional Swift architect.

Early Access

Chapters releasing live

$29
  • checkRead chapters as written
  • checkBeta source code access
  • checkFeedback channel

Full Book

PDF + ePub + Mobi

$39
  • checkAll 26 Chapters
  • checkFull source code for 2 apps
  • check4 AI Bonus Chapters

Need just the companion? Get the Companion alone for $10