-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
BUG - Fastlane Unit Tests #173 #194
BUG - Fastlane Unit Tests #173 #194
Conversation
Removed build_for_testing config setting Added xcov action for code coverage & excluded view files Update gemfile with xcov gem Update workflow to install dependencies
Thanks for the detailed PR!!
Yeah that's definitely an issue, let's not run them at this moment, and I may just run them manually for now (when it's needed)
Yes I'll do this after I merge your PR! I'll look at this soon, I haven't gone through the code changes, and I need to run it all locally still |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimum code coverage has not been specified yet as there aren't enough tests written. This can be updated later by adding minimum_coverage_percentage: 80.0 with an acceptable benchmark value to the xcov action in the fastfile.
Can you add this in the right spot, but comment it out?
I have a few questions too, noted below
I haven't been able to run this locally, bundle update
has been timing out
Put back default fastfile template Add & comment out minimum_coverage_percentage flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!! I got it to run locally! Not sure what happened the first time
Thanks for your patience!
What it Does
How I Tested
bundle exec fastlane unit_tests
Notes
build_for_testing
config setting which was only building the code but not executing the tests. Ref fastlane docs..xcov
gem for code coverage.xcov
action in fastfile to provide code coverage.minimum_coverage_percentage: 80.0
with an acceptable benchmark value to thexcov
action in the fastfile..xcovignore
file in fastlane folder. This can be used to exclude files we do not need to test or require coverage to be gathered for. I believe model/business logic files are more suited for testing. This can be updated as development progresses.xcodebuild_formatter
config in fastlane to usexcbeautify
for cleaner logs.only_testing
config flag in fastlane. If removed, it will also execute UI tests ( GitHub Actions for Running UI Tests #54 ) but I've observed the workflow taking over an hour to complete on GitHub. So maybe it's something we need to weigh the pros & cons for?concurrency
in workflow file.bundle update
for installing gem dependencies and then runbrew install xcbeautify
to install xcbeautify for cleaner logging. You might need to usesudo
incase you run into errors for write permissions to the ruby directoryScreenshots ~ Local
Coverage report ~
fastlane/CodeCoverageReport/index.html
Screenshots ~ Github workflow
Failing tests
Passing tests
Miscellaneous