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.5.tar.gz (19.8 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.5-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xcresult-26.0.5.tar.gz
  • Upload date:
  • Size: 19.8 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.5.tar.gz
Algorithm Hash digest
SHA256 3b80fb2e91e839efbbf03f8b49281618803b222a4a0aba5b6413e68e14e9249f
MD5 f6f41e47ac48e90fa5050e191b519c9c
BLAKE2b-256 8aca88bf188a793915e29a83ab68c5b8a9daa4a51cf8e99902d7f8d5c419697b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xcresult-26.0.5-py3-none-any.whl
  • Upload date:
  • Size: 22.6 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ea791729e14cd87982614e23167e7c7493475531818f98e2288472cbaaaf5988
MD5 f87f3f2abb8337a7d2ae9a3b50883a98
BLAKE2b-256 79e0aae5a8c80e01cdedf693eee1233712f17e1f92e36fdbf3742fa90935fd4e

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