{"id":13995440,"url":"https://github.com/ChargePoint/xcparse","last_synced_at":"2025-07-22T21:33:03.465Z","repository":{"id":41394867,"uuid":"201523374","full_name":"ChargePoint/xcparse","owner":"ChargePoint","description":"Command line tool \u0026 Swift framework for parsing Xcode 11+ xcresult","archived":false,"fork":false,"pushed_at":"2024-10-28T21:59:19.000Z","size":9772,"stargazers_count":390,"open_issues_count":20,"forks_count":47,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-11-17T17:35:19.679Z","etag":null,"topics":["code-coverage","command-line-tool","framework","ios","screenshots","swift","xcode11","xcresult"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChargePoint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-08-09T18:45:32.000Z","updated_at":"2024-11-02T01:45:58.000Z","dependencies_parsed_at":"2024-01-20T17:59:44.574Z","dependency_job_id":"7d323369-2f86-41c6-854e-cd4fee37142a","html_url":"https://github.com/ChargePoint/xcparse","commit_stats":{"total_commits":73,"total_committers":6,"mean_commits":"12.166666666666666","dds":"0.31506849315068497","last_synced_commit":"5ec59315a5d752e560ab09080a4821244c279038"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChargePoint%2Fxcparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChargePoint%2Fxcparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChargePoint%2Fxcparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChargePoint%2Fxcparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChargePoint","download_url":"https://codeload.github.com/ChargePoint/xcparse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227177974,"owners_count":17743213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-coverage","command-line-tool","framework","ios","screenshots","swift","xcode11","xcresult"],"created_at":"2024-08-09T14:03:24.717Z","updated_at":"2024-11-29T17:31:48.669Z","avatar_url":"https://github.com/ChargePoint.png","language":"Swift","readme":"# xcparse\n\nA command line tool to extract code coverage \u0026 screenshots from Xcode 11 XCResult files.\n\nTo learn more about Xcode 11's xcresult format, read [Rishab Sukumar's post on the ChargePoint Engineering blog](https://www.chargepoint.com/engineering/xcparse/)\n\n## Installation \n\n### [Homebrew](https://brew.sh)\n\nEnter the following command into your terminal:\n\n```shell\nbrew install chargepoint/xcparse/xcparse\n```\nThis will tap into our xcparse Homebrew tap and install the tool on your local machine.\n\n### [Mint](https://github.com/yonaskolb/Mint)\n\nTo use xcparse via Mint, prefix the normal usage with mint run ChargePoint/xcparse like so:\n\n```shell\nmint run ChargePoint/xcparse xcparse \u003ccommand\u003e \u003coptions\u003e\n```\n\nTo use a specific version of xcparse, add the release tag like so:\n\n```shell\nmint run ChargePoint/xcparse@2.1.0 xcparse --help\n```\n\n### Bitrise\n\nWant to use this in [Bitrise](https://www.bitrise.io)? We have an [xcparse Bitrise step](https://github.com/ChargePoint/bitrise-step-xcparse) available in the [Bitrise StepLib](https://github.com/bitrise-io/bitrise-steplib) so you can add xcparse directly from the Bitrise Workflow UI!\n\nSee our [Bitrise step's README](https://github.com/ChargePoint/bitrise-step-xcparse/blob/master/README.md) for more information.\n\n## Usage\n\n```\nxcparse \u003ccommand\u003e \u003coptions\u003e\n```\n\nBelow are a few examples of common commands. For further assistance, use the --help option on any command\n\n### Screenshots\n\n```\nxcparse screenshots --os --model --test-plan-config /path/to/Test.xcresult /path/to/outputDirectory\n```\n\nThis will cause screenshots to be exported like so:\n\n![Screenshots exported into folders](Docs/Images/screenshots_options_recommended.png?raw=true)\n\nOptions can be added \u0026 remove to change the folder structure used for export.  Using no options will lead to all attachments being exported into the output directory.\n\nOptions available include:\n\n| Option                   | Description                             |\n|--------------------------|-----------------------------------------|\n| ```--model```            | Divide by test target model             | \n| ```--os```               | Divide by test target operating system  | \n| ```--test-plan-config``` | Divide by test run configuration        |\n| ```--language```         | Divide by test language                 |\n| ```--region```           | Divide by test region                   |\n| ```--test```             | Divide by test                          |\n\nSee ```xcparse screenshots --help``` for a full-listing\n\n#### Test Status\n\nThe ```--test-status``` option can allow for whitelisting only screenshots from tests that have a status that matches at least one of the provided status strings\n\n| Examples                                       | Description                            |\n|------------------------------------------------|----------------------------------------|\n| ```--test-status Success```                    | Passing tests only                     | \n| ```--test-status Failure```                    | Failing tests only                     | \n| ```--test-status Success Failure```            | Passing or failing tests only          |\n| ```--test-status 'Expected Failure' Failure``` | Expected failure or failing tests only |\n| ```--test-status 'Expected Failure'```         | Expected failure tests only            |\n\n\nTest status strings can be found by using verbose mode with the screenshots sub-command.\n\n#### Activity Type\n\nThe ```--activity-type``` option allows for whitelisting screenshots whose activity type matches at least one of the provided activity type strings.\n\n| Examples                                                                    | Description                   |\n|-----------------------------------------------------------------------------|-------------------------------|\n| ```--activity-type com.apple.dt.xctest.activity-type.testAssertionFailure```| Test failure screenshots only | \n| ```--activity-type attachmentContainer userCreated```                       | User created screenshots only | \n\nNote that when an activity type string is provided which doesn't have a reverse-DNS style domain, it is assumed to be of ```com.apple.dt.xctest.activity-type.\u003cactivityTypeString\u003e``` and the domain is automatically added.\n\nTherefore, these two are option calls are equivalent:\n\n```--activity-type userCreated attachmentContainer```\n\n```--activity-type com.apple.dt.xctest.activity-type.userCreated com.apple.dt.xctest.activity-type.attachmentContainer```\n\nActivity types can be found in verbose mode.  Below are a listing of common ones:\n\n| Activity Type                                          | Description                             |\n|--------------------------------------------------------|-----------------------------------------|\n| com.apple.dt.xctest.activity-type.attachmentContainer  | Placeholder activity that contains an attachment, may contain user created screenshot | \n| com.apple.dt.xctest.activity-type.deletedAttachment    | Deleted attachment placeholder activity |\n| com.apple.dt.xctest.activity-type.internal             | Internal test step, may have automatic screenshot to show test progression |\n| com.apple.dt.xctest.activity-type.testAssertionFailure | Step where the test failed in an assertion, may have failure screenshot |\n| com.apple.dt.xctest.activity-type.userCreated          | User created screenshot/attachment |\n\n### Attachments\n\n```\nxcparse attachments /path/to/Test.xcresult /path/to/outputDirectory --uti public.plain-text public.image\n```\n\nExport all attachments in the xcresult that conform to either the ```public.plan-text``` or the ```public.image``` uniform type identifiers (UTI). The screenshots command, for example, is actually just the attachments command operating a whitelist for ```public.image``` UTI attachments.  Other common types in xcresults are ```public.plain-text``` for debug descriptions of test failures.\n\nRead [this Apple documentation](https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html#//apple_ref/doc/uid/TP40009259-SW1) for a list of publicly documented UTIs.\n\n### Code Coverage\n\n```\nxcparse codecov /path/to/Test.xcresult /path/to/exportCodeCoverageFiles\n```\n\nThis will export the action.xccovreport \u0026 action.xccovarchive into your output directory.\n\n### Logs\n\n```\nxcparse logs /path/to/Test.xcresult /path/to/exportLogFiles\n```\n\nThis will export logs \u0026 diagnostic files into a per-action folder structure similar to Xcode 10's xcresult format.\n\n![Logs exported into folders](Docs/Images/screenshots_logs.png?raw=true)\n\n### Convert\n\n```\nxcparse convert /path/to/AppThinningSizeReport.txt /path/to/outputDirectory --flagVariants sizeLimit\n```\n\nThis will export a JSON representation of the given App Thinning Size Report to the output directory.\n\n#### Flag Variants\n\nThe ```--flag-variants``` option can allow for the generation of an app size violations report with all the app variants that exceed the specified size limit.\n\n| Examples                            | Description                    |\n|-------------------------------------|--------------------------------|\n| ```--flag-variants 10MB```          | Flags variants that exceed 10MB| \n| ```--flag-variants 13```            | Flags variants that exceed 13MB| \n| ```--flag-variants invalid```       | Flags variants that exceed 10MB|\n\nIf a size unit is not specified, the default unit is considered to be megabytes. Similarly, invalid arguments cause a default size limit of 10MB to be used for flagging app size violations.\n\n### Help\n\n```\nxcparse --help\n\nxcparse screenshots --help\n```\n\nLearn about all the options we didn't mention with ```--help```!\n","funding_links":[],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChargePoint%2Fxcparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChargePoint%2Fxcparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChargePoint%2Fxcparse/lists"}