# The Case of the Crimson Test Suite (PragProg)

**URL:** <https://forum.devtalk.com/t/the-case-of-the-crimson-test-suite-pragprog/179677>\
**Category:** Backend Learning Resources\
**Tags:** published-book, swift, pragprog, book-the-case-of-the-crimson-test-suite\
**Created:** [4 December 2024 13:40 UTC](https://forum.devtalk.com/t/the-case-of-the-crimson-test-suite-pragprog/179677 "2024-12-04T13:40:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PragmaticBookshelf](https://forum.devtalk.com/user_avatar/forum.devtalk.com/pragmaticbookshelf/32/463_2.png) [@PragmaticBookshelf](https://forum.devtalk.com/u/PragmaticBookshelf)\
**Post date:** [4 December 2024 13:40 UTC](https://forum.devtalk.com/t/the-case-of-the-crimson-test-suite-pragprog/179677/1 "2024-12-04T13:40:46Z")

</div>

Write and run test for you Swift code with ease with this quick, hands-on introduction to the new Swift Testing Framework.

 ![d-dscrimson-500](https://forum.devtalk.com/uploads/default/original/2X/7/785df24c03e43a3d12469b4662656e8e2c212787.jpeg)

### Daniel H Steinberg

Check out this quick, hands-on introduction to the new Swift Testing Framework. You’ll learn how easy it is to now write and run tests for your Swift code, and the results are so much cleaner and clearer. You’ll collect some tests in a suite and use tags to group others. You’ll write expectations and requirements and learn various techniques to combine and simplify them. You’ll actually look forward to testing your code.

_The Case of the Crimson Test Suite_ is an introduction to the modern Swift Testing framework.

Testing your packages and apps for Apple platforms has never been easier. The new Swift Testing framework makes it easy for you to write tests that are clean and clear with easy-to-read feedback when a test fails. In this book we begin with tests that run as freestanding functions. Later, we gather some of them up into a suite so that we can run a test individually, as part of a suite, or as one of the entire tests in the current test plan.

You’ll write expectations and requirements to test the result of calling your production code and you’ll verify methods that should and do throw an error. You’ll test asynchronous code and, in those rare cases when it’s needed, write serialized tests. By default Swift Testing runs your tests in parallel in random order for both improved performance and to catch hidden dependencies. You’ll create display names and use test description to improve the test output and introduce tags so that you can run a subset of your tests without suites or across many suites.

* * *

**Daniel H Steinberg** is the author of more than a dozen books including the best selling books _A Functional Programming Kickstart_, _A SwiftUI Kickstart_, _A Swift Kickstart, Second Edition_, and _Dear Elena_. He has written apps for the iPhone and the iPad since the SDKs first appeared and has written programs for the Mac all the way back to System 7.

Daniel presents iOS, Functional Programming, SwiftUI, and Swift training and consults through his company Dim Sum Thinking. When he’s not coding or talking about coding for the Mac, the iPhone, and the iPad he’s probably cooking, baking bread, or hanging out with friends. Details on his training and speaking are on the [Dim Sum Thinking](https://dimsumthinking.com/) website.

* * *

- Full details: [The Case of the Crimson Test Suite: An Introduction to Swift Testing by Daniel H Steinberg](https://pragprog.com/titles/d-dscrimson/the-case-of-the-crimson-test-suite/)

_Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “ **devtalk.com**" at checkout 👍_
