Sha256: ce370bcdfac2cda5d1d9c5ddb594c8ad3ba09fa185c40a4ea966cba92b29c646
Contents?: true
Size: 1.41 KB
Versions: 2
Compression:
Stored size: 1.41 KB
Contents
# Xccov::Parse ## Installation Add this line to your application's Gemfile: ```ruby gem 'xccov-parse' ``` And then execute: $ bundle Or install it yourself as: $ gem install xccov-parse ## Usage 1. Generate the json result by `xcrun xccov view --only-targets --json` ```bash # target: https://github.com/KazuCocoa/test.examples $ git clone https://github.com/KazuCocoa/test.examples && cd test.examples $ xcodebuild -workspace test.examples.xcworkspace -scheme test.examples -derivedDataPath Build/ -destination 'platform=iOS Simulator,OS=11.3,name=iPhone 7' -enableCodeCoverage YES clean build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ``` 2. Read the JSON and get a particular line coverage ```ruby xccov = Xccov.new xccov.help json = xccov.view '--only-targets', '--json', 'Build/Logs/Test/*.xccovreport' parsed = Xccov::Parse.new(json: json) parsed.targets_line_coverage["test.examples.app"] #=> 0.35 # or # $ xcrun xccov view --only-targets --json Build/Logs/Test/*.xccovreport > result.json parsed = Xccov::Parse.new(file: './result.json') parsed.targets_line_coverage["test.examples.app"] #=> 0.35 ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/KazuCocoa/xccov-parse. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
xccov-parse-0.2.0 | README.md |
xccov-parse-0.1.0 | README.md |