test(_:parameters:)
Runs all, or a specified subset, of the unit tests of the package, after an incremental build if necessary.
Declaration
func test(_ subset: PackageManager.TestSubset, parameters: PackageManager.TestParameters) throws -> PackageManager.TestResultParameters
- subset:
The subset of tests to run.
- parameters:
The test parameters to apply.
Return Value
The test results.
Discussion
The is functionally the same as swift test on the command line.
The returned test result includes any test failures. This method throws an error if the input parameters are invalid, or if the test cannot be started.
The Swift package manager command-line interface, or any IDE, may show the progress of the tests as they happen.