Library Moduleswift-testing 6.0.3Testing

Testing

Create and run tests for your Swift packages and Xcode projects.

Documentation.md
import Testing

Module information

Declarations
519
Symbols
615

Coverage

82.5 percent of the declarations in Testing are fully documented17.5 percent of the declarations in Testing are indirectly documented

Declarations

8.9 percent of the declarations in Testing are global functions or variables1.7 percent of the declarations in Testing are operators31.8 percent of the declarations in Testing are initializers, type members, or enum cases35.8 percent of the declarations in Testing are instance members0.4 percent of the declarations in Testing are functors1.9 percent of the declarations in Testing are protocols2.1 percent of the declarations in Testing are protocol requirements0.8 percent of the declarations in Testing are default implementations1.2 percent of the declarations in Testing are attached macros2.7 percent of the declarations in Testing are freestanding macros10.6 percent of the declarations in Testing are structures2.1 percent of the declarations in Testing are typealiases

Interfaces

30.4 percent of the declarations in Testing are unrestricted19.3 percent of the declarations in Testing are underscored50.3 percent of the declarations in Testing are SPI (unknown)
Module stats and coverage details

Overview

With Swift Testing you leverage powerful and expressive capabilities of the Swift programming language to develop tests with more confidence and less code. The library integrates seamlessly with Swift Package Manager testing workflow, supports flexible test organization, customizable metadata, and scalable test execution.

  • Define test functions almost anywhere with a single attribute.

  • Group related tests into hierarchies using Swift’s type system.

  • Integrate seamlessly with Swift concurrency.

  • Parameterize test functions across wide ranges of inputs.

  • Enable tests dynamically depending on runtime conditions.

  • Parallelize tests in-process.

  • Categorize tests using tags.

  • Associate bugs directly with the tests that verify their fixes or reproduce their problems.

Related videos

<Links>
visualStyle
compactGrid

Essentials

Test parameterization

Behavior validation

Test customization

  • Traits

    Add traits to tests to annotate them or customize their behavior.

    Read More