-
-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Feature Description
If I have my MCP server set up with a TEST_RUNNER_ prefixed env var it should be passed through to xcodebuild test commands as an env var.
TEST_RUNNER_ prefix is documented here:
https://developer.apple.com/documentation/xcode/environment-variable-reference
Using this example MCP config
{
"mcpServers": {
"XcodeBuildMCP": {
"type": "stdio",
"command": "npx",
"args": ["-y", "xcodebuildmcp@latest"],
"env": {
"TEST_RUNNER_USE_DEV_MODE": "YES"
}
}
}
}
Then I should be able to run a UI test like this:
func testFoo() throws {
// Check configuration requirement
let useDevMode = ProcessInfo.processInfo.environment["runsForEachTargetApplicationUIConfiguration"] == "YES"
guard useDevMode else {
XCTFail("Test requires USE_DEV_MODE to be true")
return
}
Alternatively the test tools should have a parameter for setting env vars.
Use Cases
This allows me to conditionally disable the runsForEachTargetApplicationUIConfiguration property to speed up dev tests.
Example Interactions
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request