swift_package_test
Run tests for Swift packages using specified configurations, filters, and parallel execution, with optional code coverage and @main support via XcodeBuildMCP.
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 |
|---|---|---|---|
| configuration | No | Swift package configuration (debug, release) | |
| filter | No | Filter tests by name (regex pattern) | |
| packagePath | Yes | Path to the Swift package root (Required) | |
| parallel | No | Run tests in parallel (default: true) | |
| parseAsLibrary | No | Add -parse-as-library flag for @main support (default: false) | |
| showCodecov | No | Show code coverage (default: false) | |
| testProduct | No | Optional specific test product to run |