fastlane-plugin-test_center to the latest version
I am using multi_scan action.
With latest version 3.8.5, when i pass destination parameter with value "platform=iOS,id=
bundler: failed to load command: fastlane (/usr/local/bin/fastlane)
NoMethodError: [!] undefined method any?' for "platform=iOS,id=<device_udid>":String
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-3.8.5/lib/fastlane/plugin/test_center/actions/multi_scan.rb:19:inrun'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:256:in block (2 levels) in execute_action'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:inexecute_action'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:235:in block in execute_action'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:227:inchdir'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:227:in execute_action'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:157:intrigger_action_by_name'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing'
Fastfile:16:inblock in parsing_binding'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/lane.rb:33:in call'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:49:inblock in execute'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:45:in chdir'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:45:inexecute'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/lane_manager.rb:56:in cruise_lane'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/command_line_handler.rb:36:inhandle'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:108:in block (2 levels) in run'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:incall'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in run'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:inrun_active_command'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:inrun!'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:349:in run'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:41:instart'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in take_off'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/bin/fastlane:23:inload'
/usr/local/bin/fastlane:22:in
🚫 fastlane environment 🚫
| Key | Value |
| --------------------------- | -------------------------------------------------------------- |
| OS | 10.14.6 |
| Ruby | 2.3.7 |
| Bundler? | false |
| Git | git version 2.20.1 (Apple Git-117) |
| Installation Source | /usr/local/bin/fastlane |
| Host | Mac OS X 10.14.6 (18G95) |
| Ruby Lib Dir | /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib |
| OpenSSL Version | LibreSSL 2.6.5 |
| Is contained | false |
| Is homebrew | false |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version | 10.2.1 |
| Error |
| --------------------------- |
| No Locale with UTF8 found 🚫 |
./fastlane/Fastfile
MY_XCODE_WORKSPACE_FILEPATH = File.absolute_path('../HikeXCUITestKit/HikeXCUITestKit.xcworkspace')
lane :test do |options|
test_run_block = lambda do |testrun_info|
failed_test_count = testrun_info[:failed].size
if failed_test_count > 0
UI.important('The run of tests would finish with failures due to fragile tests here.')
try_attempt = testrun_info[:try_count]
if try_attempt < 3
UI.header('Since we are using :multi_scan, we can re-run just those failing tests!')
end
end
end
result = multi_scan(
workspace: MY_XCODE_WORKSPACE_FILEPATH,
try_count: 3,
fail_build: false,
scheme: options[:scheme],
destination: options[:destination],
testrun_completed_block: test_run_block,
result_bundle: true,
output_directory: options[:outputdir]
)
unless result[:failed_testcount].zero?
UI.message("There are #{result[:failed_testcount]} legitimate failing tests")
end
end
No Appfile found
| Gem | Version | Update-Status |
| -------- | ------- | ------------- |
| fastlane | 2.133.0 | ✅ Up-To-Date |
| Plugin | Version | Update-Status |
| --------------------------- | ------- | ------------- |
| fastlane-plugin-test_center | 3.8.5 | ✅ Up-To-Date |
Loaded gems
| Gem | Version |
| --------------------------- | ------------ |
| did_you_mean | 1.0.0 |
| slack-notifier | 2.3.2 |
| atomos | 0.1.3 |
| claide | 1.0.3 |
| colored2 | 3.1.2 |
| nanaimo | 0.2.6 |
| xcodeproj | 1.12.0 |
| rouge | 2.0.7 |
| xcpretty | 0.3.0 |
| terminal-notifier | 2.0.0 |
| unicode-display_width | 1.6.0 |
| terminal-table | 1.8.0 |
| plist | 3.5.0 |
| multipart-post | 2.0.0 |
| word_wrap | 1.0.0 |
| public_suffix | 2.0.5 |
| tty-screen | 0.7.0 |
| tty-cursor | 0.7.0 |
| tty-spinner | 0.9.1 |
| colored | 1.2 |
| highline | 1.7.10 |
| commander-fastlane | 4.4.6 |
| faraday | 0.15.4 |
| faraday_middleware | 0.13.1 |
| unf_ext | 0.0.7.6 |
| unf | 0.1.4 |
| domain_name | 0.5.20190701 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.6 |
| gh_inspector | 1.1.3 |
| mini_magick | 4.9.5 |
| multi_xml | 0.6.0 |
| rubyzip | 1.3.0 |
| security | 0.1.3 |
| xcpretty-travis-formatter | 1.0.0 |
| dotenv | 2.7.5 |
| bundler | 2.0.2 |
| jwt | 2.1.0 |
| uber | 0.1.0 |
| declarative | 0.0.10 |
| declarative-option | 0.1.0 |
| representable | 3.0.4 |
| retriable | 3.1.2 |
| multi_json | 1.13.1 |
| signet | 0.11.0 |
| memoist | 0.16.0 |
| os | 1.0.1 |
| googleauth | 0.6.7 |
| httpclient | 2.8.3 |
| google-api-client | 0.23.9 |
| digest-crc | 0.4.1 |
| google-cloud-storage | 1.16.0 |
| emoji_regex | 1.0.1 |
| json | 2.2.0 |
| io-console | 0.4.5 |
| excon | 0.67.0 |
| CFPropertyList | 3.0.1 |
| libxml-ruby | 2.9.0 |
| babosa | 1.0.3 |
| fastimage | 2.1.7 |
| addressable | 2.7.0 |
| psych | 2.1.0.1 |
| mime-types | 3.3 |
| mime-types-data | 3.2019.0904 |
| xctest_list | 1.1.8 |
| colorize | 0.8.1 |
| fastlane-plugin-test_center | 3.8.5 |
generated on: 2019-10-03
This command is working fine in version 3.7.0.
@rahulsharma2905 the Issue description's Fastfile example is not clear what you're passing as the destination. It is a variable. Are you passing an array, or a string? It looks like you're passing a string, which _should_ not be allowed according to the :destination option.
https://github.com/fastlane/fastlane/blob/master/scan/lib/scan/options.rb#L370
result = multi_scan(
workspace: MY_XCODE_WORKSPACE_FILEPATH,
try_count: 3,
fail_build: false,
scheme: "scheme",
destination: "platform=iOS Simulator,id=89xxxxxxxxxxxxxxxxxxxxxBA",
testrun_completed_block: test_run_block,
result_bundle: true
)
i am passing destination in above string format, it seems to be working in 3.7.0 version of this plugin.
can you give me an example of valid destination value?
Can you put it in an array?
result = multi_scan(
workspace: MY_XCODE_WORKSPACE_FILEPATH,
try_count: 3,
fail_build: false,
scheme: "scheme",
destination: ["platform=iOS Simulator,id=89xxxxxxxxxxxxxxxxxxxxxBA"],
testrun_completed_block: test_run_block,
result_bundle: true
)
Also, can you pass that same :destination string to Scan and it doesn't complain?
passing destination as an array, makes it work again. Thanks!
One question though: does passing a string for the destination work withscan?
Yes, I just checked and passing a string for destination is working for scan.
re-opening issue as this should work just as scan does.
This should be easy to fix, but I don't have time. If you want to take a look at it, you can check if the :destination option is a string and wrap it in an array.
@rahulsharma2905 can you test a fix? If so, please modify your Pluginfile per my instructions below, run bundle install, and then run your fastlane again (with the --verbose flag)?
Pluginfile:
gem 'fastlane-plugin-test_center', :git => "https://github.com/lyndsey-ferguson/fastlane-plugin-test_center.git", :branch => "fix-issue-148+146"
If there are still problems, please let me know and attach the console output as a text file to this issue (makes it easier for me to review). If it works, please let me know.
Facing a different issue now.
bundler: failed to load command: fastlane (/usr/local/bin/fastlane)
NoMethodError: [!] undefined method `each' for "id=89E34003-6711-4C87-B9B1-E81CBCB89DBA":String
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan_helper.rb:31:in `quit_simulator'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan_helper.rb:23:in `before_testrun'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb:45:in `run'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/test_batch_worker.rb:18:in `run'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:143:in `block in run_test_batches'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:140:in `each'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:140:in `each_with_index'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:140:in `run_test_batches'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:53:in `run'
/Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-test_center-69f4b6a40dcd/lib/fastlane/plugin/test_center/actions/multi_scan.rb:25:in `run'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
Fastfile:16:in `block in parsing_binding'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/lane.rb:33:in `call'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.133.0/bin/fastlane:23:in `<top (required)>'
/usr/local/bin/fastlane:22:in `load'
/usr/local/bin/fastlane:22:in `<top (required)>'
I apologize. I have fixed that issue and pushed a new version of the branch. Can you remove your Gemfile.lock file (it is tied to the Git commit of the broken version), perform bundle install and re-run your fastlane?
Still same issue, and your last commit is 16 hours stale. Seems like your fix is not yet pushed.
lyndsey-ferguson force-pushed the fix-issue-148+146 branch from 69f4b6a to 651b71a 31 minutes ago
It was opened 16 hours ago
This is the SHA that should be listed in the Gemfile.lock file: 651b71a796a102b2b57b6da05644f0f1277850e4
I have the same SHA in Gemfile.lock, still facing the above mentioned issue (one with error in retrying_scan_helper.rb:31).
Ok, try this one. I had two different ways to access the :destination option. New SHA is fa995c3379c38cdec01c8ed070e72b8f36babfbd
This version is working fine.
Fixed in v3.8.6