Using XCTest
Your tests are organized into a simple hierarchy. Each XCTestCase
subclass has a set of test
methods, each of which should test one part of your code.
For general information about using XCTest, see:
Using XCTest with Swift Package Manager
The Swift Package Manager integrates directly with XCTest to provide a streamlined experience for unit testing SwiftPM packages. If you are using XCTest within a SwiftPM package, unit test files are located within the package’s Tests
subdirectory, and you can build and run the full test suite in one step by running swift test
.
For more information about using XCTest with SwiftPM, see its documentation.