# swiftlang/swift-testing

A modern, expressive testing package for Swift

Repository: https://github.com/swiftlang/swift-testing
Canonical: https://ross.abutalabs.com/products/swift-testing
Language: Swift
License: Apache-2.0
License Family: permissive
Topics: software-quality, swift, swift-macros, testing, unit-testing
Last push: 2026-08-26T20:38:56+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 83, longevity 96
- inputs: {"age_days": 1353, "days_push": 7, "days_rel": 112, "gap_med": 27, "n_releases_24m": 16}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2156, forks 161 (observed 2026-08-28T04:06:19.678955+00:00)

## What it is
Swift Testing is a modern testing package for Swift with expressive, macro-based APIs like #expect for writing unit tests. It supports parameterized tests, custom traits, tagging, and parallel execution integrated with Swift Concurrency.

## Use cases
- write unit tests for swift code
- run parameterized tests over collections of values
- run tests in parallel with swift concurrency
- tag and organize tests into suites
- skip or enable tests conditionally with traits
- replace xctest with a modern testing framework

## When to choose
- you are writing Swift or Swift on Server projects and want modern, expressive test APIs
- you need parameterized or trait-based test customization
- you want tests that run in parallel using Swift Concurrency

## When to avoid
- you need a testing framework for a non-Swift language
- you depend on legacy XCTest-only tooling or integrations

## Facets
- artifact type: library
- maturity: active
- function: testing
- domain: testing, developer-tools, programming-languages
- platform: cross-platform
- tags: unit-testing, swift-macros, parameterized-tests, swift-concurrency, apple, swift, macos, linux

## Member repositories
- swiftlang/swift-testing (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:19.678955+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:50:29.002399+00:00, confidence not recorded.
  - readme: https://github.com/swiftlang/swift-testing (fetched 2026-08-28T04:06:19.678955+00:00, sha 18b864b90c8b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
