All posts

Posts tagged with: Testing

4 posts found

A hand holding a hotel key card up to a door lock
Swift Testing Swift Concurrency

Swift Testing Runs Your Suite in Parallel. That Static Var You Swap for DI Is a Race Condition.

Swift Testing parallelizes tests by default, in the same process. A huge number of Swift codebases — BrewLog's AppIntents suite included — still inject test dependencies by mutating a global static var. ST-0026 proposes a .taskLocal trait to fix it properly. Here's the real bug, the real code, and where the proposal stands.

7 min read
A black digital clock display against a dark background, evoking a countdown running out
Swift Swift Concurrency

Swift Just Got a Real Timeout API. Here's What We've All Been Duct-Taping Instead.

SE-0526 withDeadline was accepted into Swift on July 30, 2026 — a real, composable, absolute-time-limit API for async operations. I found the exact gap it fills in a real app's networking layer, fixed it today's way with a TaskGroup race, and lined it up against what withDeadline will let me delete once it ships.

10 min read
A red traffic light glowing above an unlit green light on a city street — the stop-then-go cycle that gives test-driven development its name.
Swift TDD

TDD for SwiftUI: A Red-Green-Refactor Workflow That Isn't Academic

Day 21 of the 30-day iOS series. I went looking for a BrewLog feature to drive test-first and found a real bug already shipped: the Streak stat has been hardcoded to zero since day one. Here's the actual red-green-refactor session that fixed it.

10 min read
Developer writing code with testing tools visible — a clean coding environment representing software quality and unit testing.
Swift Swift Testing

Swift Testing Framework: Why You Should Migrate from XCTest

Day 20 of the 30-day iOS series. @Test, #expect, parametrized tests, traits, and a side-by-side comparison on a real BrewLog test file. Plus: the one thing XCTest still does that Swift Testing doesn't.

11 min read