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.3.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.3-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xcresult-26.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 cf8d4153c79a6e4bf4817db3f465e7a441b000c400ad5405dd7f2b4927e05930
MD5 55b003d749dd3d3fdd8a3101f2513004
BLAKE2b-256 e7830fb267a077179970561a78420728744d4e182c5c7f8e8b8d221b8f509b9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xcresult-26.0.3-py3-none-any.whl
  • Upload date:
  • Size: 22.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a07af7b0bfaa97415f7e616a59eca7f980f9046a0c97219ffb661bebf405d977
MD5 97078765d887da6c0180ae59d06c128e
BLAKE2b-256 5f7ec9b7d4d30ac6333b76c5162ce3dbdacdde858e1f92c8647195ba59900ef4

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