Library Moduleswift-testing 6.0.1Testing

    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

    Uncategorized

    Protocols

    Show implementation details (1)

    Hide implementation details

    Show system interfaces (3)

    Hide system interfaces

    • protocol CustomExecutionTrait

      A protocol extending Trait that offers an additional customization point for trait authors to execute code before and after each test function (if added to the traits of a test function), or before and after each test suite (if added to the traits of a test suite).

    • protocol SPIAwareTrait

      A protocol describing traits that can be added to a test function or to a test suite and that make use of SPI symbols in the testing library.

    • protocol __ExitTestContainer

      A protocol describing a type that contains an exit test.

    Types

    Show implementation details (2)

    Hide implementation details

    Show system interfaces (10)

    Hide system interfaces

    Typealiases

    Show implementation details (1)

    Hide implementation details

    Show system interfaces (1)

    Hide system interfaces

    • typealias Expression

      A type representing a Swift expression captured at compile-time from source code.

    Macros

    • macro Tag()

      Declare a tag that can be applied to a test function or test suite.

    Show implementation details (1)

    Hide implementation details

    Show system interfaces (2)

    Hide system interfaces

    Globals

    Show implementation details (38)

    Hide implementation details

    Show system interfaces (3)

    Hide system interfaces

    Other modules