Swift Testing documentation
March 18, 2026 ยท View on GitHub
API and usage guides
The detailed documentation for Swift Testing can be found on the Swift Package Index. There, you can delve into comprehensive guides, tutorials, and API references to make the most out of this package.
This documentation is generated using DocC
and is derived from symbol documentation in this project's source code as well
as supplemental content located in the
Sources/Testing/Testing.docc/
directory.
Obtaining Swift Testing discusses the various ways Swift Testing is distributed and offers recommended usage workflows.
Vision document and API proposals
The Vision document for Swift Testing offers a comprehensive discussion of the project's design principles and goals.
Feature and API proposals for Swift Testing are stored in the
swift-evolution repository in
the proposals/testing/ subdirectory, and new proposals should use the
testing template
there.
Development and contribution
- The top-level
READMEgives a high-level overview of the project, shows current CI status, lists the support status of various platforms, and more. - Contributing provides guidance for developing and making project contributions.
- Porting includes advice and instructions for developers who are porting Swift Testing to a new platform.
- Style Guide describes this project's guidelines for code and documentation style.
- SPI groups in Swift Testing describes when and how the testing library uses Swift SPI.
Experimental platform support
- Instructions are provided for running tests against a WASI/WebAssembly target.
Testing library ABI
The ABI directory contains documents related to Swift Testing's ABI:
that is, parts of its interface that are intended to be stable over time and can
be used without needing to write any code in Swift:
ABI/EventStreamHandling.mdcontains information about Swift Testing's SPI that you can use when working with the library's JSON event stream.ABI/JSON.mdcontains Swift Testing's JSON specification that can be used by tools to interact with Swift Testing either directly or via theswift testcommand-line tool.ABI/TestContent.mddocuments the section emitted by the Swift compiler into test products that contains test definitions and other metadata used by Swift Testing (and extensible by third-party testing libraries.)