what's new in Swift Testing?
Asked on 2025-07-10
2 searches
At WWDC 2024, Apple introduced a new framework called Swift Testing, designed to enhance the testing experience for Swift developers. Here are some of the key features and updates:
-
Integration with Modern Swift Features: Swift Testing takes advantage of modern Swift features such as concurrency and macros, making it expressive, flexible, and scalable. It is designed to integrate seamlessly with multiple IDEs, including Xcode and Visual Studio Code.
-
Cross-Platform Support: The framework supports all major platforms, including Linux and Windows, and is developed as an open-source package. This ensures consistent behavior across different environments.
-
Expressive APIs: Swift Testing provides powerful capabilities for describing and organizing tests. It includes macros like
expect
andrequire
to validate assumptions, and supports custom attachments to help diagnose test failures. -
Parameterized Testing: This feature allows developers to run a single test function with multiple arguments, reducing code duplication and improving test coverage.
-
Tagging System: Swift Testing includes a flexible tagging system to help organize tests. Tags can be used to group tests across different suites, making it easier to selectively run tests.
-
Exit Tests: Swift 6.2 introduces exit tests, allowing developers to test code that is expected to terminate under certain conditions.
-
Open Source and Community Involvement: Swift Testing is developed in an open-source environment, allowing the community to contribute to its evolution.
For more detailed information, you can explore the sessions Meet Swift Testing and Go further with Swift Testing.

What’s new in Swift
Join us for an update on Swift. We’ll briefly go through a history of Swift over the past decade, and show you how the community has grown through workgroups, expanded the package ecosystem, and increased platform support. We’ll introduce you to a new language mode that achieves data-race safety by default, and a language subset that lets you run Swift on highly constrained systems. We’ll also explore some language updates including noncopyable types, typed throws, and improved C++ interoperability.

Meet Swift Testing
Introducing Swift Testing: a new package for testing your code using Swift. Explore the building blocks of its powerful new API, discover how it can be applied in common testing workflows, and learn how it relates to XCTest and open source Swift.

What’s new in Swift
Join us for an update on Swift. We’ll talk about workflow improvements that make you more productive, and new and modernized library APIs for fundamental programming tasks. We’ll show examples of Swift adoption throughout more layers of the software stack. Finally, we’ll explore new language features for both improving approachability of concurrency, and achieving peak performance when you need it.