PragmaticBookshelf

PragmaticBookshelf

Devtalk Sponsor

The Case of the Crimson Test Suite (PragProg)

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

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 website.


Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

Popular Backend topics Top

PragmaticBookshelf
Stop developing web apps with yesterday’s tools. Today, developers are increasingly adopting Clojure as a web-development platform. See f...
New
PragmaticBookshelf
Go from messy, unstructured artifacts stored in SQL and NoSQL databases to a neat, well-organized dataset with this quick reference for t...
New
PragmaticBookshelf
Functional languages have their own patterns that enable you to solve problems with less code than object-oriented programming alone. Thi...
New
PragmaticBookshelf
Modern C++ Programming With Test-Driven Development, the only comprehensive treatment on TDD in C++ provides you with everything you need...
New
lpil
Michael published this video today on the how and why of Gleam’s new try syntax. I thought it would be a good first bit of content to sha...
New
AstonJ
Erlang is the language of choice for programmers who want to write robust, concurrent applications, but its strange syntax and functional...
New
ManningBooks
Spring Quickly teaches you how to build professional-quality applications using Spring and Spring Boot. Author Laurențiu Spilcă draws on ...
New
PragmaticBookshelf
Write Python code that’s faster, safer, more idiomatic, and easier to maintain with one hundred highly-curated and sharply-focused profes...
New
PragmaticBookshelf
Discover the secret Prolog developers have long known. Programs based on pure logic as the primary building block are more elegant, more ...
New
PragmaticBookshelf
Get up to speed with the changes in the Java language from version 9 to 19 and apply the amazing features in your application to improve ...
New

Other popular topics Top

malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
AstonJ
Or looking forward to? :nerd_face:
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1134 25459 753
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New