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
[scan] Add testPlan option to scan #16043
Conversation
Adds a configuration option that specifies a testplan to execute Scan with. As with test parallelisation, using this can cause a few problems with other integrations (such as xcpretty's ability to parse the test output). This change isn't intended as a holistic change to address incompatible combinations of options when using the new test report formats, just a simple option to pass in a command line option.
CI size-label looks like it's failing due to a missing GITHUB_TOKEN. |
@iainsmith It's failing because it can't handle forks - we will remove that action again soon. For now here this can be ignored. |
@@ -45,6 +45,7 @@ def options # rubocop:disable Metrics/PerceivedComplexity | |||
options << "-enableCodeCoverage #{config[:code_coverage] ? 'YES' : 'NO'}" unless config[:code_coverage].nil? | |||
options << "-enableAddressSanitizer #{config[:address_sanitizer] ? 'YES' : 'NO'}" unless config[:address_sanitizer].nil? | |||
options << "-enableThreadSanitizer #{config[:thread_sanitizer] ? 'YES' : 'NO'}" unless config[:thread_sanitizer].nil? | |||
options << "-testPlan #{config[:testplan]}" if config[:testplan] |
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.
Does this work with Xcode 10, or we don't care about older versions?
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.
IMO, this should be wrapped in the if FastlaneCore::Helper.xcode_at_least?(11)
block.
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.
Makes sense!
Hey all, maybe this isn't the right place to ask, but is there a potential timeline on when this action might. be available in fastlane? Our team would really love to use test plans instead of rolling our own solution for creating the test plans with ruby scripts. |
@spadafiva you can use |
@iainsmith Thanks! I appreciate the help. |
cc @joshdholtz is anything else needed to merge this? |
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.
My bad! I totally thought I approved and merged this one already 😔 Sorry about that! Really appreciate the contribution ❤️
Hey @esteluk 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
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.
Congratulations! 🎉 This was released as part of fastlane 2.144.0 🚀
Hey @joshdholtz - noticed a very small issue with this MR which I've fixed in #16205. Hope that's okay! |
Of course! I’m just waking up but I’ll take a look once I get some coffee in me 😊 |
Adds a configuration option that specifies a testplan to execute Scan
with. As with test parallelisation, using this can cause a few problems
with other integrations (such as xcpretty's ability to parse the test
output). This change isn't intended as a holistic change to address
incompatible combinations of options when using the new test report
formats, just a simple option to pass in a command line option.
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
Xcode 11 introduced testplans as a new way to specify groups of tests that can be run together independently of the project's schemes. eg. I can specify separate test plans for my pre-merge pipeline and nightly builds.
Per #15462 there's clearly some desire for Fastlane to support test plans properly. At the moment the any use of them with scan requires passing a custom
xcarg
configuration.Description
This change just adds a simple Scan configuration option that gets passed into
xcodebuild
as a command line option.closes #15462