Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to disable xcpretty in scan? #6742

Closed
2 tasks done
benjaminsnorris opened this issue Oct 25, 2016 · 4 comments
Closed
2 tasks done

Is it possible to disable xcpretty in scan? #6742

benjaminsnorris opened this issue Oct 25, 2016 · 4 comments

Comments

@benjaminsnorris
Copy link

New Issue Checklist

Issue Description

I am having a problem with my iOS project that code coverage data from UI tests is not reported. I have tried using Slather and directly with Codecov, as well as just looking locally, and no data is reported for UI tests. There is an issue reported in xcov, as well as an issue reported in Codecov that discuss this further. I'm wanting to keep using Fastlane, and want to try disabling xcpretty to see if I can get proper results. I can disable it fine with gym, but cannot figure it out with scan. Thanks!

@benjaminsnorris benjaminsnorris changed the title Is it possible to disable xcpretty in scan? Is it possible to disable xcpretty in scan? Oct 25, 2016
@TKBurner
Copy link

Hi @benjaminsnorris right now that's not possible in scan but it'd be an interesting PR. Would you be interested in contributing to our repo? We'd love that 👍

@ghost
Copy link

ghost commented Jan 12, 2017

@benjaminsnorris Could you use the output_style option with raw? Looking at the code, this should eliminate the use of xcpretty.

def pipe
# During building we just show the output in the terminal
# Check out the ReportCollector class for more xcpretty things
pipe = ["| tee '#{xcodebuild_log_path}'"]
if Scan.config[:output_style] == 'raw'
return pipe
end
formatter = []
if Scan.config[:formatter]
formatter << "-f `#{Scan.config[:formatter]}`"
elsif FastlaneCore::Env.truthy?("TRAVIS")
formatter << "-f `xcpretty-travis-formatter`"
UI.success("Automatically switched to Travis formatter")
end
if Helper.colors_disabled?
formatter << "--no-color"
end
if Scan.config[:output_style] == 'basic'
formatter << "--no-utf"
end
if Scan.config[:output_style] == 'rspec'
formatter << "--test"
end
return pipe << ["| xcpretty #{formatter.join(' ')}"]
end

@benjaminsnorris
Copy link
Author

Sorry, I should have come back to this. I did some manual tests and found that the underlying issue of UI test code coverage is not solved by disabling scan, so this fell completely off my radar.

@joshdholtz joshdholtz removed their assignment Jan 31, 2017
@ohayon
Copy link
Contributor

ohayon commented Mar 1, 2017

Thanks for following up! Going to close this issue as it seems to have been a red herring resolved. Feel free to continue conversation if necessary! 🐙

@ohayon ohayon closed this as completed Mar 1, 2017
@fastlane fastlane locked and limited conversation to collaborators May 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants