{"id":20671480,"url":"https://github.com/xcteq/xccov-demo","last_synced_at":"2025-04-19T18:37:23.680Z","repository":{"id":83858434,"uuid":"127859429","full_name":"XCTEQ/XCCov-Demo","owner":"XCTEQ","description":"Demo of Apple's new command line utility xccov shipped with Xcode 9.3","archived":false,"fork":false,"pushed_at":"2020-01-21T06:58:26.000Z","size":25061,"stargazers_count":22,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T11:41:43.429Z","etag":null,"topics":["coverage-data","swift4","xccov","xcode10","xcode10beta","xcode9","xctest"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/XCTEQ.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-03T06:08:50.000Z","updated_at":"2025-01-16T10:27:34.000Z","dependencies_parsed_at":"2023-10-17T14:15:33.090Z","dependency_job_id":null,"html_url":"https://github.com/XCTEQ/XCCov-Demo","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/XCTEQ%2FXCCov-Demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XCTEQ%2FXCCov-Demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XCTEQ%2FXCCov-Demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XCTEQ%2FXCCov-Demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XCTEQ","download_url":"https://codeload.github.com/XCTEQ/XCCov-Demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249766064,"owners_count":21322533,"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":["coverage-data","swift4","xccov","xcode10","xcode10beta","xcode9","xctest"],"created_at":"2024-11-16T20:27:36.320Z","updated_at":"2025-04-19T18:37:23.675Z","avatar_url":"https://github.com/XCTEQ.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  xccov - Xcode Code Coverage for Humans \n\nWith Xcode 9.3, we have new command line tool `xccov` to view Xcode Code Coverage Reports in human readable format. \n\nThis is quick demo of the `xccov` command line utility with black app. \n\n## Pre-requisite \n\n* Xcode 9.3 \n\n\n## Generate Code Coverage Data \n\nClone this repository and build an app from command line. \n\n            $ git clone \n            $ cd XCCov-Demo\n            $ xcodebuild -project XCCov-Demo.xcodeproj/ -scheme XCCov-Demo -derivedDataPath Build/ -destination 'platform=iOS Simulator,OS=12.2,name=iPhone Xʀ' -enableCodeCoverage YES clean build test CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO\n\nThis will dump all the `DerivedData` inside the `Build` directory. \n\nThis will generate the code coverage data at path `Build/Logs/Test/Run-{projectName_timestamp}.xcresult/3_Test  ` we will see code coverage with \n`.xccovreport` and `.xccovarchive` extension. The cov-\nerage report contains line coverage percentages for each target, source file, and function/method that has coverage  infor-\nmation.  The  coverage  archive contains the raw execution counts for each file in the report.\n\n## Using `xccov`\n\nWe can use `xccov` command line tool with `xcrun` untility if thats not inside the `$PATH` \n\n* View Report in the plain format \n\n            $ xcrun xccov view Build/Logs/Test/Run-XCCov-Demo-2019.04.03_07-40-58-+0100.xcresult/3_Test/action.xccovreport\n\n*  View Report in the JSON format \n\n            $ xcrun xccov view --json Build/Logs/Test/Run-XCCov-Demo-2019.04.03_07-40-58-+0100.xcresult/3_Test/action.xccovreport\n\n* List the files available for the code coverage data \n\n            $ xcrun xccov view --file-list Build/Logs/Test/Run-XCCov-Demo-2019.04.03_07-40-58-+0100.xcresult/3_Test/action.xccovarchive\n\n* Show the coverage for perticular file \n        \n            $ xcrun xccov view --file ~/Desktop/XCCov-Demo/XCCov-Demo/AppDelegate.swift  Build/Logs/Test/Run-XCCov-Demo-2019.04.03_07-40-58-+0100.xcresult/3_Test/action.xccovarchive/\n\n\n* Merge Reports \n\n            $ xcrun xccov merge --outReport ~/Desktop/out.xccovreport --outArchive ~/Desktop/out.acarchive Build/Logs/Test/Run-XCCov-Demo-2019.04.03_07-40-58-+0100.xcresult/3_Test/action.xccovreport Build/Logs/Test/Run-XCCov-Demo-2019.04.03_07-40-58-+0100.xcresult/3_Test/action.xccovarchive/ Build/Logs/Test/Run-XCCov-Demo-2019.04.03_07-52-58-+0100.xcresult/3_Test/action.xccovreport Build/Logs/Test/Run-XCCov-Demo-2019.04.03_07-52-58-+0100.xcresult/3_Test/action.xccovarchive/\nThis will create merge reports file on desktop. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcteq%2Fxccov-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxcteq%2Fxccov-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcteq%2Fxccov-demo/lists"}