Skip to content

Commit 9f87f75

Browse files
cameroncookecodex
andcommitted
test(snapshot): Add structured JSON fixture targets
Add a structured JSON fixture corpus for the planned CLI json output mode. Define shared envelope and schema-family targets in docs/dev/STRUCTURED_JSON_OUTPUT_PLAN.md and capture the expected payloads across simulator, device, macOS, SwiftPM, debugging, discovery, and session workflows. This keeps the current producer unchanged while giving the upcoming implementation a concrete fixture contract to build against. Co-Authored-By: OpenAI Codex <noreply@openai.com>
1 parent dbb2d3b commit 9f87f75

144 files changed

Lines changed: 4719 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/dev/STRUCTURED_JSON_OUTPUT_PLAN.md

Lines changed: 951 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"schema": "xcodebuildmcp.output.coverage-result",
3+
"schemaVersion": "1",
4+
"didError": true,
5+
"error": "Failed to get coverage report: Failed to load result bundle",
6+
"data": {
7+
"summary": {
8+
"status": "FAILED"
9+
},
10+
"coverageScope": "report",
11+
"artifacts": {
12+
"xcresultPath": "<TMPDIR>/invalid.xcresult"
13+
},
14+
"diagnostics": {
15+
"warnings": [],
16+
"errors": [
17+
{
18+
"message": "Error Domain=XCCovErrorDomain Code=0 \"Failed to load result bundle\""
19+
}
20+
]
21+
}
22+
}
23+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"schema": "xcodebuildmcp.output.coverage-result",
3+
"schemaVersion": "1",
4+
"didError": false,
5+
"error": null,
6+
"data": {
7+
"summary": {
8+
"status": "SUCCEEDED",
9+
"coveragePct": 94.9,
10+
"coveredLines": 371,
11+
"executableLines": 391
12+
},
13+
"coverageScope": "report",
14+
"artifacts": {
15+
"xcresultPath": "<TMPDIR>/TestResults.xcresult",
16+
"target": "CalculatorAppTests"
17+
},
18+
"targets": [
19+
{
20+
"name": "CalculatorAppTests.xctest",
21+
"coveragePct": 94.9,
22+
"coveredLines": 371,
23+
"executableLines": 391
24+
}
25+
]
26+
}
27+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"schema": "xcodebuildmcp.output.coverage-result",
3+
"schemaVersion": "1",
4+
"didError": true,
5+
"error": "Failed to get file coverage: Failed to load result bundle",
6+
"data": {
7+
"summary": {
8+
"status": "FAILED"
9+
},
10+
"coverageScope": "file",
11+
"artifacts": {
12+
"xcresultPath": "<TMPDIR>/invalid.xcresult",
13+
"file": "SomeFile.swift"
14+
},
15+
"diagnostics": {
16+
"warnings": [],
17+
"errors": [
18+
{
19+
"message": "Error Domain=XCCovErrorDomain Code=0 \"Failed to load result bundle\""
20+
}
21+
]
22+
}
23+
}
24+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"schema": "xcodebuildmcp.output.coverage-result",
3+
"schemaVersion": "1",
4+
"didError": false,
5+
"error": null,
6+
"data": {
7+
"summary": {
8+
"status": "SUCCEEDED",
9+
"coveragePct": 77.8,
10+
"coveredLines": 147,
11+
"executableLines": 189
12+
},
13+
"coverageScope": "file",
14+
"artifacts": {
15+
"xcresultPath": "<TMPDIR>/TestResults.xcresult",
16+
"file": "CalculatorService.swift",
17+
"sourceFilePath": "example_projects/iOS_Calculator/CalculatorAppPackage/Sources/CalculatorAppFeature/CalculatorService.swift"
18+
},
19+
"functions": {
20+
"notCovered": [
21+
{
22+
"line": 159,
23+
"name": "CalculatorService.deleteLastDigit()",
24+
"coveredLines": 0,
25+
"executableLines": 16
26+
},
27+
{
28+
"line": 178,
29+
"name": "CalculatorService.setError(_:)",
30+
"coveredLines": 0,
31+
"executableLines": 5
32+
}
33+
],
34+
"partialCoverage": [
35+
{
36+
"line": 63,
37+
"name": "CalculatorService.inputDecimal()",
38+
"coveragePct": 71.4,
39+
"coveredLines": 10,
40+
"executableLines": 14
41+
},
42+
{
43+
"line": 93,
44+
"name": "CalculatorService.calculate()",
45+
"coveragePct": 84.2,
46+
"coveredLines": 32,
47+
"executableLines": 38
48+
}
49+
],
50+
"fullCoverageCount": 27,
51+
"notCoveredFunctionCount": 8,
52+
"notCoveredLineCount": 27,
53+
"partialCoverageFunctionCount": 4
54+
}
55+
}
56+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"schema": "xcodebuildmcp.output.debug-breakpoint-result",
3+
"schemaVersion": "1",
4+
"didError": true,
5+
"error": "Failed to add breakpoint: No active debug session. Provide debugSessionId or attach first.",
6+
"data": {
7+
"action": "add",
8+
"breakpoint": {
9+
"kind": "file-line",
10+
"file": "ContentView.swift",
11+
"line": 42
12+
}
13+
}
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"schema": "xcodebuildmcp.output.debug-breakpoint-result",
3+
"schemaVersion": "1",
4+
"didError": false,
5+
"error": null,
6+
"data": {
7+
"action": "add",
8+
"breakpoint": {
9+
"breakpointId": 1,
10+
"kind": "file-line",
11+
"file": "ContentView.swift",
12+
"line": 42
13+
}
14+
}
15+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"schema": "xcodebuildmcp.output.debug-session-action",
3+
"schemaVersion": "1",
4+
"didError": true,
5+
"error": "Failed to resolve simulator PID: Invalid device: <UUID>",
6+
"data": {
7+
"action": "attach",
8+
"artifacts": {
9+
"simulatorId": "<UUID>"
10+
}
11+
}
12+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"schema": "xcodebuildmcp.output.debug-session-action",
3+
"schemaVersion": "1",
4+
"didError": false,
5+
"error": null,
6+
"data": {
7+
"action": "attach",
8+
"session": {
9+
"debugSessionId": "<UUID>",
10+
"connectionState": "attached",
11+
"executionState": "running"
12+
},
13+
"artifacts": {
14+
"simulatorId": "<UUID>",
15+
"processId": "<PID>"
16+
}
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"schema": "xcodebuildmcp.output.debug-session-action",
3+
"schemaVersion": "1",
4+
"didError": false,
5+
"error": null,
6+
"data": {
7+
"action": "attach",
8+
"session": {
9+
"debugSessionId": "<UUID>",
10+
"connectionState": "attached",
11+
"executionState": "paused"
12+
},
13+
"artifacts": {
14+
"simulatorId": "<UUID>",
15+
"processId": "<PID>"
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)