{"id":29516189,"url":"https://github.com/anthonyray/xctool_bug_recreation","last_synced_at":"2025-07-16T14:42:02.868Z","repository":{"id":36601215,"uuid":"40907368","full_name":"anthonyray/xctool_bug_recreation","owner":"anthonyray","description":null,"archived":false,"fork":false,"pushed_at":"2015-08-17T15:50:56.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-15T09:15:25.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anthonyray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-17T15:48:09.000Z","updated_at":"2015-11-11T06:20:27.000Z","dependencies_parsed_at":"2022-08-30T15:31:16.168Z","dependency_job_id":null,"html_url":"https://github.com/anthonyray/xctool_bug_recreation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anthonyray/xctool_bug_recreation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyray%2Fxctool_bug_recreation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyray%2Fxctool_bug_recreation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyray%2Fxctool_bug_recreation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyray%2Fxctool_bug_recreation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonyray","download_url":"https://codeload.github.com/anthonyray/xctool_bug_recreation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonyray%2Fxctool_bug_recreation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265518945,"owners_count":23781049,"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":[],"created_at":"2025-07-16T14:41:53.876Z","updated_at":"2025-07-16T14:42:02.826Z","avatar_url":"https://github.com/anthonyray.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Set up\n\n1. Install dependencies :\n```\nmake bootstrap\n```\n2. On your application targets’ “General” settings tab, in the \"Link Binary with Libraries\" section, drag and drop each framework you want to use from the Carthage/Build folder on disk.\n\n3. On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script with the following contents:\n\n```\n/usr/local/bin/carthage copy-frameworks\n```\nand add the paths to the frameworks you want to use under “Input Files”, e.g.:\n\n```\n$(SRCROOT)/Carthage/Build/iOS/Box.framework\n$(SRCROOT)/Carthage/Build/iOS/Result.framework\n$(SRCROOT)/Carthage/Build/iOS/ReactiveCocoa.framework\n$(SRCROOT)/Carthage/Build/iOS/SwifyJSON.framework\n$(SRCROOT)/Carthage/Build/iOS/AFNetworkingFramework.framework\n```\n\n# Recreating the bug\n\nThis project is composed of two unit tests :\n- The first unit test makes an asynchronous HTTP request to google.\n- The second unit test makes an asynchronous **HTTPS** request to google.\n\nWe observe that both tests succeed in XCode.\n\nLet's try to launch tests from the command line with `xcodebuild` first.\n\n```\nxcodebuild -configuration Debug -scheme sample_bug -sdk iphonesimulator8.4 -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.4' test\n```\n\nWe get the following output :\n```\n\nTest Suite 'All tests' started at 2015-08-17 15:35:06 +0000\nTest Suite 'sample_bugTests.xctest' started at 2015-08-17 15:35:06 +0000\nTest Suite 'sample_bugTests' started at 2015-08-17 15:35:06 +0000\nTest Case '-[sample_bugTests.sample_bugTests testHTTPNetworkReachable]' started.\nTest Case '-[sample_bugTests.sample_bugTests testHTTPNetworkReachable]' passed (0.352 seconds).\nTest Case '-[sample_bugTests.sample_bugTests testHTTPSNetworkReachable]' started.\nTest Case '-[sample_bugTests.sample_bugTests testHTTPSNetworkReachable]' passed (0.222 seconds).\nTest Suite 'sample_bugTests' passed at 2015-08-17 15:35:06 +0000.\n\t Executed 2 tests, with 0 failures (0 unexpected) in 0.574 (0.577) seconds\nTest Suite 'sample_bugTests.xctest' passed at 2015-08-17 15:35:06 +0000.\n\t Executed 2 tests, with 0 failures (0 unexpected) in 0.574 (0.578) seconds\nTest Suite 'All tests' passed at 2015-08-17 15:35:06 +0000.\n\t Executed 2 tests, with 0 failures (0 unexpected) in 0.574 (0.582) seconds\n** TEST SUCCEEDED **\n```\n\nThe tests suceeded !\n\nLet's try the same command with xctool :\n1. I installed the latest version of xctool.\n2. I closed the running instance of my simulator opened by xcodebuild.\n\n```\n../../xctool/xctool.sh -configuration Debug -scheme sample_bug -sdk iphonesimulator8.4 -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.4' -showTasks test\n```\n\nThe output is the following :\n```\nFailures:\n\n  0) -[sample_bugTests testHTTPSNetworkReachable] (sample_bugTests.xctest)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n2015-08-17 17:38:13.316 xctest[15388:86010] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9807)\nInvalid connection: com.apple.coresymbolicationd\n/Users/xxxx/xxx/xxx/xctool_sample_project/bug_recreation/sample_bugTests/sample_bugTests.swift:63: failed - Network unreachable:\n60                 expectation.fulfill()\n61             }\n62             else {\n63                 XCTFail(\"Network unreachable\")\n                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n64             }\n65\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n** TEST FAILED: 1 passed, 1 failed, 0 errored, 2 total ** (10056 ms)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonyray%2Fxctool_bug_recreation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonyray%2Fxctool_bug_recreation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonyray%2Fxctool_bug_recreation/lists"}