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

[scan] add option to specify result bundle path #20742

Merged
merged 3 commits into from
Nov 16, 2022

Conversation

Cyberbeni
Copy link
Contributor

@Cyberbeni Cyberbeni commented Oct 14, 2022

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

lyndsey-ferguson/fastlane-plugin-test_center#384

Description

We use the test center plugin to split up UI tests into batches, so in the case of an xcodebuild crash, only a couple tests are retried instead of the whole run. This requires manually specifying the result bundle path as parallel testing is done by running scan multiple times in parallel.

Testing Steps

Tested with this branch of test center: https://github.com/Cyberbeni/fastlane-plugin-test_center/tree/scan-result-bundle-path

  lane :run_built_tests_with_retry do |options|
    multi_scan(
      workspace: options[:workspace],
      scheme: options[:scheme],
      output_directory: options[:output_directory],
      result_bundle: true,
      destination: options[:destination],
      try_count: 3,
      quit_simulators: false,
      parallel_testrun_count: 6,
      batch_count: 18,
      fail_build: false,
      retry_test_runner_failures: true,
      xcargs: '-maximum-test-execution-time-allowance 600 -test-timeouts-enabled YES',
      output_types: 'junit',
      output_files: 'result.xml',
      buildlog_path: "#{options[:output_directory]}",
      skip_testing: []
    )
  end

@Cyberbeni
Copy link
Contributor Author

The CLA check is buggy, someone forked my fork and also opened a PR without any changes which broke the CLA check for this PR too.

@joshdholtz joshdholtz changed the title [scan] Add option to specify result bundle path [scan] add option to specify result bundle path Nov 16, 2022
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Thanks for adding 😊

@joshdholtz joshdholtz merged commit c5a95c2 into fastlane:master Nov 16, 2022
@fastlane-bot
Copy link

Hey @Cyberbeni 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants