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
Machine learning can be intimidating, with its reliance on math and algorithms that most programmers don't encounter in their regular wor...
New
PragmaticBookshelf
Express is arguably the ubiquitous library for building Node backends. As of mid-2019, it is a dependency of 3.75 million codebases on Gi...
New
PragmaticBookshelf
You don’t have to accept slow Ruby or Rails performance. In this comprehensive guide to Ruby optimization, you’ll discover exactly what m...
New
PragmaticBookshelf
Using Erlang, you’ll be surprised at how easy it becomes to deal with parallel problems, and how much faster and more efficiently your pr...
New
PragmaticBookshelf
TDD is a modern programming practice that all C developers need to know. It’s a different way to program—unit tests are written in a tigh...
New
ManningBooks
Spring Quickly teaches you how to build professional-quality applications using Spring and Spring Boot. Author Laurențiu Spilcă draws on ...
New
ManningBooks
Data-Oriented Programming teaches you to design applications using the data-oriented paradigm. Yehonathan Sharvit Data-Oriented Pr...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
PragmaticBookshelf
Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New
PragmaticBookshelf
Create Android applications using Jetpack Compose 1.6, Android Studio, Material Design 3, and the Kotlin programming language. Neil...
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
ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
foxtrottwist
Here’s our thread for the Keyboardio Atreus. It is a mechanical keyboard based on and a slight update of the original Atreus (Keyboardio ...
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New