{"id":13994958,"url":"https://github.com/dropbox/hypershard-ios","last_synced_at":"2025-07-22T21:31:30.502Z","repository":{"id":66208702,"uuid":"213968686","full_name":"dropbox/hypershard-ios","owner":"dropbox","description":"⚡ the ridiculously fast XCUITest collector.","archived":false,"fork":false,"pushed_at":"2020-04-20T18:15:08.000Z","size":16,"stargazers_count":26,"open_issues_count":1,"forks_count":2,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-08-10T14:17:49.486Z","etag":null,"topics":["ios","swift","testing","xcuitest"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dropbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-09T16:30:01.000Z","updated_at":"2024-07-24T21:12:57.000Z","dependencies_parsed_at":"2024-01-18T05:19:35.459Z","dependency_job_id":"0b505b38-a708-4a80-a8ff-b19b47c95d5b","html_url":"https://github.com/dropbox/hypershard-ios","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Fhypershard-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Fhypershard-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Fhypershard-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Fhypershard-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropbox","download_url":"https://codeload.github.com/dropbox/hypershard-ios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227177713,"owners_count":17743147,"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":["ios","swift","testing","xcuitest"],"created_at":"2024-08-09T14:03:11.670Z","updated_at":"2024-11-29T17:30:46.385Z","avatar_url":"https://github.com/dropbox.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# ⚡ Hypershard\nthe ridiculously fast `XCUITest` collector\n\n## About\n\nHypershard is a CLI tool that leverages SourceKit and Swift's Abstract Syntax Tree (AST) to parse our `XCUITest` files for the purposes of test collection. It makes a couple of assumptions about how the `XCUITest`s are organized:\n - it assumes that all files containing tests have suffix `Tests.swift`,\n - it assumes all test methods' names begin with the `test` prefix,\n\nIn benchmarks, Hypershard takes, on average, under 0.06s per collection of tests from Dropbox and Paper iOS apps, down from roughly ~15 minutes it tooks us to collect tests by building of the individual apps.\n\nCheck out the sibling Hypershard tool for Android, [dropbox/hypershard-android](https://github.com/dropbox/hypershard-android)!\n\n## Building\nHypershard is built using Swift Package Manager.\n\nTo build Hypershard for development purposes, enter Hypershard's root directory and run:\n\n```\u003e swift build```\n\nThis will check out the relevant dependencies and build the debug binary into the `.build` folder. The path for the resulting binary will be provided in the `swift build`'s output.\n\nTo build Hypershard binary for direct distribution, enter Hypershard's root directory and run:\n\n```swift build -c release```\n\nThe resulting binary will be placed in the `.build/release/hypershard`.\n\n## Running\nTo run Hypershard, you have to follow this CLI invocation:\n\n`\u003e hypershard TEST_TARGET_NAME ROOT_PATH --phase PHASE_NAME --path PATH --cmd CMD --output-file OUTPUT_PATH`\n\n - `TEST_TARGET_NAME` – the name of the Xcode test target containing the UI tests,\n - `ROOT_PATH` – either a path where all the `XCUITest`s clases are stored, or the path of the Xcode project containing `TEST_TARGET_NAME`,\n - `PHASE_NAME` – *optional* – name of the Changes phase,\n - `PATH` – *optional* – the custom `PATH` variable,\n - `CMD` – *optional* – the command to run each test with,\n - `OUTPUT_PATH` – *optional* – the path where the output JSON should be saved, if it's not passed, the output will be printed\n\nThe first two parameters are required. You need to provide all optional parameters if you want an output consumable by [Changes](https://github.com/dropbox/changes). The final parameter is a path where the output JSON should be saved.\n\nFor CI systems, we recommend to *not* rebuild Hypershard every time, and to store and use a static binary instead.\n\n## Output\nThere are two possible outputs from Hypershard:\n - an error due to a malformed Swift file or an incomprehensible test - the tool will output relevant information before aborting,\n - a JSON file containing a list of all available `XCUITest`s.\n\n## Testing\nYou can test Hypershard using Swift Package Manager, simply by running the following command in the Hypershard's root:\n\n```\u003e swift test```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbox%2Fhypershard-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropbox%2Fhypershard-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbox%2Fhypershard-ios/lists"}