swift_package_test
Execute Swift Package tests using swift test command. Specify package path, test product, filters, build configuration, parallel execution, code coverage, and @main support options.
Instructions
Runs tests for a Swift Package with swift test
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"packagePath": "<packagePath>"
},
"name": "swift_package_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| packagePath | Yes | Path to the Swift package root (Required) | |
| testProduct | No | Optional specific test product to run | |
| filter | No | Filter tests by name (regex pattern) | |
| configuration | No | Build configuration: 'debug' (default) or 'release' | |
| parallel | No | Run tests in parallel (default: true) | |
| showCodecov | No | Show code coverage (default: false) | |
| parseAsLibrary | No | Add -parse-as-library flag for @main support (default: false) |