The Case of the Crimson Test Suite

$30
0 ratings

25% Launch Sale - Get $10 off the $40 price and pay only $30

An Introduction to Swift Testing

"Write code without Swift Testing tests after reading this book? Flummery."

- N. Wolfe

Writing Swift Tests has never been easier or more enjoyable. Whether you've resisted testing before or you currently use XCTest, you're going to love the new Swift Testing framework.

Swift testing relies on macros to make it easy for you to write tests, group them in suites, and customize and collect tests with display names and tags. Your expectations will be simpler to write and the results will be easier to read. By default your tests run in parallel in random order so you'll discover dependencies you didn't know you had. Whether you're testing ordinary methods or methods that throw errors or are async (or both), Swift Testing makes it so much nicer and cleaner.

The Case of the Crimson Test Suite is a comprehensive and fast moving introduction to the Swift Testing framework.

Contents:

  • Chapter 1: Getting Started
    • The Agile Detective
    • A Project with Tests
    • Adding a Test Target to a Project
    • A Package with Tests
    • Adding a Test Target to a Package
    • Road Map
    • Credits

  • Chapter 2: The Basics of Swift Testing
    • A Clean Slate
    • Testing an init()
    • Testing a Computed Property
    • Multiple Expectations
    • Display Names
    • Tags
    • Testing the Public Interface
    • Observable
  • Chapter 3: Test Organization and Flow
    • The Calculator Project
    • Test Driving the Stack
    • Testing Errors
    • #expect(throws: )
    • #require()
    • Group the Tests
    • Suite
    • Suite in a Suite


  • Chapter 4: The Finer Points
    • Serial and Parallel
    • More Serial Tests
    • Cross-Contamination
    • Testing Async Code
    • Unary Operators
    • Binary Operators
    • Parametrized Tests
    • More Parametrized Tests
    • Test Description
I want this!
Pages
302
Xcode
16 beta 5 or later
iOS
18
Swift
6
Copy product URL
$30

The Case of the Crimson Test Suite

0 ratings
I want this!