slather: Fail test code coverage not found coverage directory in Xcode 10.1
Can’t show code coverage in my Mac and in my Jenkins,
bundle exec slather coverage -s --scheme "Reactive iOS" --workspace Reactive.xcworkspace Reactive.xcodeproj/
Result
Slathering...
No coverage directory found.
Are you sure your project is generating coverage? Make sure you enable code coverage in the Test section of your Xcode scheme.
Did you specify your Xcode scheme? (--scheme or 'scheme' in .slather.yml)
If you're using a workspace, did you specify it? (--workspace or 'workspace' in .slather.yml)
bundler: failed to load command: slather (/Users/amine/.rbenv/versions/2.5.3/bin/slather)
StandardError: No coverage directory found.
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/slather-2.4.0/lib/slather/project.rb:178:in `profdata_coverage_dir'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/slather-2.4.0/lib/slather/project.rb:403:in `block in find_binary_files'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/slather-2.4.0/lib/slather/project.rb:402:in `each'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/slather-2.4.0/lib/slather/project.rb:402:in `find_binary_files'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/slather-2.4.0/lib/slather/project.rb:348:in `configure_binary_file'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/slather-2.4.0/lib/slather/project.rb:242:in `configure'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/slather-2.4.0/lib/slather/command/coverage_command.rb:51:in `execute'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11:in `execute'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'
/Users/amine/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/slather-2.4.0/bin/slather:17:in `<top (required)>'
/Users/amine/.rbenv/versions/2.5.3/bin/slather:23:in `load'
/Users/amine/.rbenv/versions/2.5.3/bin/slather:23:in `<top (required)>'
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 21
Same here on XCode 12. By the way, when I run my tests on XCode, my coverage reports are being generated at the default XCode derived data. But slather doesn’t know this path. Maybe that’s the problem? Or does Slather rebuild the selected scheme by itself?
@amine2233
Hi I had the same problem, please use the newest version 2.4.6 , if you try to install the dependencies ruby install by default version 2.4.0
https://rubygems.org/gems/slather
Same error with Xcode11. Appearly I think is the option to generate code coverage is not present in this version.
Xcode 10
Xcode 11
running into to the same issue on 2.4.7…any ideas?