xcresulttool no longer publishes the format for test results

Until Xcode 16 xcresulttool had a 'formatDescription' subcommand and/or --format flag that output a schema for what to expect from 'get object' subcommands.

With Xcode 16 all of the old format and utilities are apparently deprecated, and require a --legacy flag be passed to use the deprecated utilities and format.

There are new utilities like 'xcrun xcresulttool get test-results --path <path to xcresult>'

however, no format us published as far as I can tell. If we are going to move forward with these new utilities we need a schema published so that we can reasonably track deltas as it evolves and so that we have the object of generating model objects from this schema.

Any insight?

Answered by DTS Engineer in 802569022

however, no format us published as far as I can tell.

To view the format, run the following command in Terminal: xcrun xcresulttool help get test-results summary

% xcrun xcresulttool help get test-results summary
OVERVIEW: Get test report summary.

Command output structure (JSON Schema): 
{
    "schemas": {
        "Summary": {
            "type": "object",
            "properties": {
                "title": {
                    "type": "string"
                },
                "startTime": {
                    "type": "number",
                    "format": "double",
                    "description": "Date as a UNIX timestamp (seconds since midnight UTC on January 1, 1970)"
                },
                "finishTime": {
                    "type": "number",
                    "format": "double",
                    "description": "Date as a UNIX timestamp (seconds since midnight UTC on January 1, 1970)"
                },
                "environmentDescription": {
                    "type": "string",
                    "description": "Description of the Test Plan, OS, and environment that was used during testing"
                },
                "topInsights": {
                    "type": "array",
                    "items": {
                        "$ref": "#/schemas/InsightSummary"
                    }
                },
                "result": {
                    "$ref": "#/schemas/TestResult"
                },
                "totalTestCount": {
                    "type": "integer"
                },
                "passedTests": {
                    "type": "integer"
                },
                "failedTests": {
                    "type": "integer"
                },
                "skippedTests": {
                    "type": "integer"
                },
                "expectedFailures": {
                    "type": "integer"
                },
                "statistics": {
                    "type": "array",
                    "items": {
                        "$ref": "#/schemas/Statistic"
                    }
                },
                "devicesAndConfigurations": {
                    "$ref": "#/schemas/DeviceAndConfigurationSummary"
                },
                "testFailures": {
                    "$ref": "#/schemas/TestFailure"
                }
            },
            "required": [
                "title",
                "environmentDescription",
                "topInsights",
                "result",
                "totalTestCount",
                "passedTests",
                "failedTests",
                "skippedTests",
                "expectedFailures",
                "statistics",
                "devicesAndConfigurations",
                "testFailures"
            ],
        },
        "InsightSummary": {
            "type": "object",
            "properties": {
                "impact": {
                    "type": "string"
                },
                "category": {
                    "type" "string"
                },
                "text": {
                    "type" "string"
                }
            },
            "required": [
                "impact",
                "category",
                "text"
            ]
        },
        "TestResult": {
            "type": "string",
            "enum": [
                "Passed",
                "Failed",
                "Skipped",
                "Expected Failure",
                "unknown"
            ]
        },
        "Statistic": {
            "type": "object",
            "properties": {
                "title": {
                    "type": "string"
                },
                "subtitle": {
                    "type": "string"
                }
            },
            "required": [
                "title",
                "subtitle"
            ]
        },
        "DeviceAndConfigurationSummary": {
            "type": "object",
            "properties": {
                "device": {
                    "$ref": "#/schemas/Device"
                },
                "testPlanConfiguration": {
                    "$ref": "#/schemas/Configuration"
                },
                "passedTests": {
                    "type": "integer"
                },
                "failedTests": {
                    "type": "integer"
                },
                "skippedTests": {
                    "type": "integer"
                },
                "expectedFailures": {
                    "type": "integer"
                }
            },
            "required": [
                "device",
                "testPlanConfiguration",
                "passedTests",
                "failedTests",
                "skippedTests",
                "expectedFailures"
            ]
        },
        "Device": {
            "type": "object",
            "properties": {
                "deviceId": {
                    "type": "string"
                },
                "deviceName": {
                    "type": "string"
                },
                "architecture": {
                    "type": "string"
                },
                "modelName": {
                    "type": "string"
                },
                "platform": {
                    "type": "string"
                },
                "osVersion": {
                    "type": "string"
                }
            },
            "required": [
                "deviceName",
                "architecture",
                "modelName",
                "osVersion"
            ]
        },
        "Configuration": {
            "type": "object",
            "properties": {
                "configurationId": {
                    "type": "string"
                },
                "configurationName": {
                    "type": "string"
                }
            },
            "required": [
                "configurationId",
                "configurationName"
            ]
        },
        "TestFailure": {
            "type": "object",
            "properties": {
                "testName": {
                    "type": "string"
                },
                "targetName": {
                    "type": "string"
                },
                "failureText": {
                    "type": "string"
                },
                "testIdentifier": {
                    "type": "integer",
                    "format": "int64"
                }
            },
            "required": [
                "testName",
                "targetName",
                "failureText",
                "testIdentifier"
            ]
        }
    }
}

USAGE: xcresulttool get test-results summary --path <path> [--compact]

OPTIONS:
  --path <path>           The result bundle path.
  --compact               Output JSON in a compact format.
  --version               Show the version.
  -h, --help              Show help information.

however, no format us published as far as I can tell.

To view the format, run the following command in Terminal: xcrun xcresulttool help get test-results summary

% xcrun xcresulttool help get test-results summary
OVERVIEW: Get test report summary.

Command output structure (JSON Schema): 
{
    "schemas": {
        "Summary": {
            "type": "object",
            "properties": {
                "title": {
                    "type": "string"
                },
                "startTime": {
                    "type": "number",
                    "format": "double",
                    "description": "Date as a UNIX timestamp (seconds since midnight UTC on January 1, 1970)"
                },
                "finishTime": {
                    "type": "number",
                    "format": "double",
                    "description": "Date as a UNIX timestamp (seconds since midnight UTC on January 1, 1970)"
                },
                "environmentDescription": {
                    "type": "string",
                    "description": "Description of the Test Plan, OS, and environment that was used during testing"
                },
                "topInsights": {
                    "type": "array",
                    "items": {
                        "$ref": "#/schemas/InsightSummary"
                    }
                },
                "result": {
                    "$ref": "#/schemas/TestResult"
                },
                "totalTestCount": {
                    "type": "integer"
                },
                "passedTests": {
                    "type": "integer"
                },
                "failedTests": {
                    "type": "integer"
                },
                "skippedTests": {
                    "type": "integer"
                },
                "expectedFailures": {
                    "type": "integer"
                },
                "statistics": {
                    "type": "array",
                    "items": {
                        "$ref": "#/schemas/Statistic"
                    }
                },
                "devicesAndConfigurations": {
                    "$ref": "#/schemas/DeviceAndConfigurationSummary"
                },
                "testFailures": {
                    "$ref": "#/schemas/TestFailure"
                }
            },
            "required": [
                "title",
                "environmentDescription",
                "topInsights",
                "result",
                "totalTestCount",
                "passedTests",
                "failedTests",
                "skippedTests",
                "expectedFailures",
                "statistics",
                "devicesAndConfigurations",
                "testFailures"
            ],
        },
        "InsightSummary": {
            "type": "object",
            "properties": {
                "impact": {
                    "type": "string"
                },
                "category": {
                    "type" "string"
                },
                "text": {
                    "type" "string"
                }
            },
            "required": [
                "impact",
                "category",
                "text"
            ]
        },
        "TestResult": {
            "type": "string",
            "enum": [
                "Passed",
                "Failed",
                "Skipped",
                "Expected Failure",
                "unknown"
            ]
        },
        "Statistic": {
            "type": "object",
            "properties": {
                "title": {
                    "type": "string"
                },
                "subtitle": {
                    "type": "string"
                }
            },
            "required": [
                "title",
                "subtitle"
            ]
        },
        "DeviceAndConfigurationSummary": {
            "type": "object",
            "properties": {
                "device": {
                    "$ref": "#/schemas/Device"
                },
                "testPlanConfiguration": {
                    "$ref": "#/schemas/Configuration"
                },
                "passedTests": {
                    "type": "integer"
                },
                "failedTests": {
                    "type": "integer"
                },
                "skippedTests": {
                    "type": "integer"
                },
                "expectedFailures": {
                    "type": "integer"
                }
            },
            "required": [
                "device",
                "testPlanConfiguration",
                "passedTests",
                "failedTests",
                "skippedTests",
                "expectedFailures"
            ]
        },
        "Device": {
            "type": "object",
            "properties": {
                "deviceId": {
                    "type": "string"
                },
                "deviceName": {
                    "type": "string"
                },
                "architecture": {
                    "type": "string"
                },
                "modelName": {
                    "type": "string"
                },
                "platform": {
                    "type": "string"
                },
                "osVersion": {
                    "type": "string"
                }
            },
            "required": [
                "deviceName",
                "architecture",
                "modelName",
                "osVersion"
            ]
        },
        "Configuration": {
            "type": "object",
            "properties": {
                "configurationId": {
                    "type": "string"
                },
                "configurationName": {
                    "type": "string"
                }
            },
            "required": [
                "configurationId",
                "configurationName"
            ]
        },
        "TestFailure": {
            "type": "object",
            "properties": {
                "testName": {
                    "type": "string"
                },
                "targetName": {
                    "type": "string"
                },
                "failureText": {
                    "type": "string"
                },
                "testIdentifier": {
                    "type": "integer",
                    "format": "int64"
                }
            },
            "required": [
                "testName",
                "targetName",
                "failureText",
                "testIdentifier"
            ]
        }
    }
}

USAGE: xcresulttool get test-results summary --path <path> [--compact]

OPTIONS:
  --path <path>           The result bundle path.
  --compact               Output JSON in a compact format.
  --version               Show the version.
  -h, --help              Show help information.

xcresulttool no longer publishes the format for test results
 
 
Q