Skip to main content

An xcresult parser.

Project description

xcresult

A Python library and CLI tool for parsing Xcode's .xcresult bundles. It wraps xcresulttool and deserializes the output into typed Python objects, so you can inspect build issues, extract test results, export attachments, and generate JUnit XML reports.

Installation

pip install xcresult

Requires Python 3.10+ and Xcode's xcresulttool (ships with Xcode).

Library Usage

import xcresult

bundle = xcresult.Xcresults("/path/to/MyApp.xcresult")

# Access the invocation record
record = bundle.actions_invocation_record

# Check for errors
if record.issues.errorSummaries:
    for error in record.issues.errorSummaries:
        print(error.message)

# Export test attachments (screenshots, etc.)
bundle.export_test_attachments("/path/to/output/")

# Write JUnit XML
bundle.write_junit("/path/to/results.junit")

CLI Usage

The package installs an xcresult command with three subcommands:

Export test attachments

xcresult -b /path/to/MyApp.xcresult export -o /path/to/output/

Generate JUnit XML

xcresult -b /path/to/MyApp.xcresult junit -o /path/to/results.junit

Optionally export attachments alongside the JUnit file:

xcresult -b /path/to/MyApp.xcresult junit -o /path/to/results.junit --export-attachments-path /path/to/attachments/

Check for issues

xcresult -b /path/to/MyApp.xcresult check-issues

Filter by issue type with --issue-types:

xcresult -b /path/to/MyApp.xcresult check-issues --issue-types error warning

Available issue types: error, warning, analyzer-warning, test-failure, test-warning.

Returns exit code 1 if any matching issues are found.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xcresult-26.0.4.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xcresult-26.0.4-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file xcresult-26.0.4.tar.gz.

File metadata

  • Download URL: xcresult-26.0.4.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.13 Darwin/25.5.0

File hashes

Hashes for xcresult-26.0.4.tar.gz
Algorithm Hash digest
SHA256 aac8f8842111db32dcac0283b557086653cdf9aac731cdddd75fb341071aea1a
MD5 9a3362868897296f867eb696671f1e2b
BLAKE2b-256 00211bf2a063756984a20c49ed1d324be6da964187cb023545c94a52b2d69fed

See more details on using hashes here.

File details

Details for the file xcresult-26.0.4-py3-none-any.whl.

File metadata

  • Download URL: xcresult-26.0.4-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.13 Darwin/25.5.0

File hashes

Hashes for xcresult-26.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f18f5f964a4c1c5ff77e6693cd8531f2a0ab12cc2590fed9856d7be8057c1dcf
MD5 670743e65ea571888068a05534a70b39
BLAKE2b-256 5f80be77a60cf000843af3a5b7ba4bb0c2d4b2d1213df9f05da65cc2fc6fcfdc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page