Fastlane-plugin-test_center: multi_scan failing because it cannot find the xctestrun file when given test_without_building option

Created on 14 Aug 2020  ·  32Comments  ·  Source: lyndsey-ferguson/fastlane-plugin-test_center

Fastlane Command: bundle exec fastlane smoke_tests --verbose

Lane 👍

    UI.important(
  'example: ' \
  'split the tests into 4 batches and run each batch of tests in ' \
  'parallel up to 3 times if tests fail. Abort the testing early ' \
  'if there are too many failing tests by passing in a ' \
  ':testrun_completed_block that is called by :multi_scan ' \
  'after each run of tests.'
)

```
test_run_block = lambda do |testrun_info|
failed_test_count = testrun_info[:failed].size
passed_test_count = testrun_info[:passing].size
try_attempt = testrun_info[:try_count]
batch = testrun_info[:batch]


# UI.abort_with_message!('You could conditionally abort')
UI.message("ὠA everything is fine, let's continue try #{try_attempt + 1} for batch #{batch}")
end


    desc "Runs smoke tests ****"
    lane :smoke_tests do

        cocoapods(try_repo_update_on_error: true)

        sh("defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool no")

        multi_scan(
            project: File.absolute_path('../ ****.xcodeproj'),
            only_testing: [" ****UITests"],
            app_identifier: " ****",
            scheme: " ****",
            devices: ["iPhone 11 Pro (13.3)"],
            include_simulator_logs: true,
            disable_concurrent_testing: true,
            disable_xcpretty: true,
            output_types:"",
            code_coverage: false,
            derived_data_path: "./fastlane/DerivedData",
            reinstall_app: true,
            reset_simulator: true,
            fail_build: false,
            clean: true,
                test_without_building: true,
            result_bundle: true,
            batch_count:6,
            try_count: 3, # retry _failing_ tests up to three times^1.
            testrun_completed_block: test_run_block,
            xcargs: "-parallel-testing-enabled YES -parallel-testing-worker-count 6 -quiet",
            buildlog_path: "./fastlane/test_output/ ****",
            output_directory: "./fastlane/test_output/ ****"
        )

    end

Here is the output :

Successfully loaded Appfile at path '*/fastlane/Appfile'

Successfully loaded Appfile at path '*/fastlane/Appfile'

INFO [2020-08-14 12:00:52.97]: ------------------------------
INFO [2020-08-14 12:00:52.97]: --- Step: default_platform ---
INFO [2020-08-14 12:00:52.97]: ------------------------------
INFO [2020-08-14 12:00:52.97]: -----------------------
INFO [2020-08-14 12:00:52.97]: --- Step: xcversion ---
INFO [2020-08-14 12:00:52.97]: -----------------------
INFO [2020-08-14 12:00:52.97]: gem 'xcode-install' is already installed
DEBUG [2020-08-14 12:00:53.34]: Found Xcode version 11.3.1 at /Applications/Xcode.app satisfying requirement 11.3.1
INFO [2020-08-14 12:00:53.34]: Setting Xcode version to /Applications/Xcode.app for all build steps
WARN [2020-08-14 12:00:53.34]: example: split the tests into 4 batches and run each batch of tests in parallel up to 3 times if tests fail. Abort the testing early if there are too many failing tests by passing in a :testrun_completed_block that is called by :multi_scan after each run of tests.
INFO [2020-08-14 12:00:53.34]: Driving the lane 'ios smoke_tests' 🚀
INFO [2020-08-14 12:00:53.34]: -----------------------
INFO [2020-08-14 12:00:53.34]: --- Step: cocoapods ---
INFO [2020-08-14 12:00:53.34]: -----------------------
INFO [2020-08-14 12:00:53.34]: gem 'cocoapods' is already installed
INFO [2020-08-14 12:00:53.34]: $ bundle exec pod install
INFO [2020-08-14 12:00:55.92]: ▸ Analyzing dependencies
INFO [2020-08-14 12:01:02.90]: ▸ Downloading dependencies
INFO [2020-08-14 12:01:02.90]: ▸ Generating Pods project
INFO [2020-08-14 12:01:02.90]: ▸ Removing static analyzer support
INFO [2020-08-14 12:01:02.90]: ▸ Integrating client projects
INFO [2020-08-14 12:01:02.90]: ▸ Pod installation complete! There are 63 dependencies from the Podfile and 68 total pods installed.
INFO [2020-08-14 12:01:02.91]: ▸ [!] The ApplicationUnitTests [Debug] target overrides the HEADER_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-ApplicationUnitTests/Pods-ApplicationUnitTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation INFO [2020-08-14 12:01:02.91]: ▸ [!] TheApplicationUnitTests [Debug-Enterprise]target overrides theHEADER_SEARCH_PATHSbuild setting defined inPods/Target Support Files/Pods-ApplicationUnitTests/Pods-ApplicationUnitTests.debug-enterprise.xcconfig'. This can lead to problems with the CocoaPods installation
INFO [2020-08-14 12:01:02.91]: ▸ [!] The ApplicationUnitTests [ApplicationUnitTest] target overrides the HEADER_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-ApplicationUnitTests/Pods-ApplicationUnitTests.applicationunittest.xcconfig'. This can lead to problems with the CocoaPods installation INFO [2020-08-14 12:01:02.91]: ▸ [!] TheApplicationUnitTests [Release]target overrides theHEADER_SEARCH_PATHSbuild setting defined inPods/Target Support Files/Pods-ApplicationUnitTests/Pods-ApplicationUnitTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
INFO [2020-08-14 12:01:02.91]: ▸ [!] The ApplicationUnitTests [Release-Enterprise] target overrides the HEADER_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-ApplicationUnitTests/Pods-ApplicationUnitTests.release-enterprise.xcconfig'. This can lead to problems with the CocoaPods installation INFO [2020-08-14 12:01:02.91]: ▸ - Use the$(inherited)flag, or INFO [2020-08-14 12:01:02.91]: ▸ - Remove the build settings from the target. INFO [2020-08-14 12:01:02.91]: ▸ - Use the$(inherited)flag, or INFO [2020-08-14 12:01:02.91]: ▸ - Remove the build settings from the target. INFO [2020-08-14 12:01:02.91]: ▸ - Use the$(inherited)flag, or INFO [2020-08-14 12:01:02.91]: ▸ - Remove the build settings from the target. INFO [2020-08-14 12:01:02.92]: ▸ - Use the$(inherited)flag, or INFO [2020-08-14 12:01:02.92]: ▸ - Remove the build settings from the target. INFO [2020-08-14 12:01:02.92]: ▸ - Use the$(inherited)` flag, or
INFO [2020-08-14 12:01:02.92]: ▸ - Remove the build settings from the target.
INFO [2020-08-14 12:01:02.94]: ---------------------------------------------------------------------------------------
INFO [2020-08-14 12:01:02.94]: --- Step: defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool no ---
INFO [2020-08-14 12:01:02.94]: ---------------------------------------------------------------------------------------
INFO [2020-08-14 12:01:02.94]: $ defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool no

Successfully loaded Appfile at path '*/fastlane/Appfile'

Successfully loaded Appfile at path '*/fastlane/Appfile'

INFO [2020-08-14 12:01:03.09]: ------------------------
INFO [2020-08-14 12:01:03.09]: --- Step: multi_scan ---
INFO [2020-08-14 12:01:03.09]: ------------------------
WARN [2020-08-14 12:01:03.69]: As of Xcode 11, test_result bundles created in the output directory are actually symbolic links to an xcresult bundle

Successfully loaded Appfile at path '*/fastlane/Appfile'

+-------------------------+-------------------------------------------------+
| Summary for multi_scan (test_center v3.13.0) |
+-------------------------+-------------------------------------------------+
| batch_count | 6 |
| try_count | 3 |
| testrun_completed_block | #@Fastfile:15 (lambda)> |
+-------------------------+-------------------------------------------------+

Successfully loaded Appfile at path */fastlane/Appfile'

Successfully loaded Appfile at path '*/fastlane/Appfile'

ERROR [2020-08-14 12:01:03.71]: Using deprecated option: '--custom_report_file_name' (Use --output_files instead)
DEBUG [2020-08-14 12:01:03.71]: Preparing Scan config options for multi_scan testing

Successfully loaded Appfile at path '*/fastlane/Appfile'

Successfully loaded Appfile at path '*/fastlane/Appfile'

ERROR [2020-08-14 12:01:03.71]: Using deprecated option: '--custom_report_file_name' (Use --output_files instead)
WARN [2020-08-14 12:01:03.79]: Resolving Swift Package Manager dependencies...
INFO [2020-08-14 12:01:03.79]: $ xcodebuild -resolvePackageDependencies -scheme * -project *.xcodeproj
INFO [2020-08-14 12:01:09.40]: ▸ resolved source packages:
INFO [2020-08-14 12:01:09.42]: $ xcodebuild -showBuildSettings -scheme * -project *.xcodeproj
WARN [2020-08-14 12:01:12.42]: Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...
WARN [2020-08-14 12:01:18.43]: Command timed out after 6 seconds on try 2 of 4, trying again with a 12 second timeout...
DEBUG [2020-08-14 12:01:28.70]: Fetching available simulator devices
WARN [2020-08-14 12:01:28.92]: Lane Context:
INFO [2020-08-14 12:01:28.92]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios smoke_tests"}
ERROR [2020-08-14 12:01:28.92]: Error: cannot find xctestrun file ''
INFO [2020-08-14 12:01:28.92]: Successfully generated documentation at path '*/fastlane/README.md'

+------+---------------------------------------------------------------+-------------+
| fastlane summary |
+------+---------------------------------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------------------------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | xcversion | 0 |
| 3 | cocoapods | 9 |
| 4 | defaults write com.apple.iphonesimulator ConnectHardwareKeybo | 0 |
| 💥 | multi_scan | 25 |
+------+---------------------------------------------------------------+-------------+

+-------------+--------------+----------------+
| Plugin updates available |
+-------------+--------------+----------------+
| Plugin | Your Version | Latest Version |
+-------------+--------------+----------------+
| test_center | 3.13.0 | 3.13.2 |
+-------------+--------------+----------------+
INFO [2020-08-14 12:01:28.95]: To update all plugins, just run
INFO [2020-08-14 12:01:28.95]: $ bundle exec fastlane update_plugins

ERROR [2020-08-14 12:01:28.95]: fastlane finished with errors

#

fastlane 2.156.1 is available. You are on 2.153.1.

You should use the latest version.

Please update using bundle update fastlane.

#

2.156.1 Improvements

  • [deliver] fix upload_screenshots when not using upload_to_app_store for screenshots (#17051) via Satoshi Namai
  • [deliver] fix upload screenshots when no screenshots (#17040) via Josh Holtz

2.156.0 Improvements

  • [deliver] make uploading and deleting screenshots more efficient (#16972) via Satoshi Namai
  • [gym][scan][snapshot] xcodebuild -resolvePackageDependencies missing -derivedDataPath (#16986) via Adriaan Duz
  • [screengrab] fix permission Issues on API > 21 (#17006) via Greg Billetdeaux

2.155.3 Hotfix

  • [sigh] fix for sending up template_name to ASC API (#17022) via Josh Holtz

To see all new releases, open https://github.com/fastlane/fastlane/releases

Please update using bundle update fastlane
Traceback (most recent call last):
35: *ruby/2.6.0/bin/ruby_executable_hooks:24:in <main>' 34: from ****/****-client-ios/vendor/bundle/ruby/2.6.0/bin/ruby_executable_hooks:24:ineval'
33: from */vendor/bundle/ruby/2.6.0/bin/fastlane:23:in <main>' 32: from ****/vendor/bundle/ruby/2.6.0/bin/fastlane:23:inload'
31: from *
/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/bin/fastlane:23:in <top (required)>' 30: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/cli_tools_distributor.rb:119:intake_off'
29: from */vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/commands_generator.rb:41:in start' 28: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/commands_generator.rb:352:inrun'
27: from *
/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in run!' 26: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:inrun!'
25: from */vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in run_active_command' 24: from ****/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:inrun'
23: from *
/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in call' 22: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/commands_generator.rb:108:inblock (2 levels) in run'
21: from */vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/command_line_handler.rb:36:in handle' 20: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/lane_manager.rb:47:incruise_lane'
19: from *
/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:45:in execute' 18: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:45:inchdir'
17: from */vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:49:in block in execute' 16: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/lane.rb:33:incall'
15: from Fastfile:33:in block (2 levels) in parsing_binding' 14: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/fast_file.rb:159:inmethod_missing'
13: from *
/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name' 12: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:229:inexecute_action'
11: from */vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:229:in chdir' 10: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:255:inblock in execute_action'
9: from *
/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in execute_action' 8: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane/lib/fastlane/runner.rb:263:inblock (2 levels) in execute_action'
7: from */vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in run' 6: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:innew'
5: from *
/vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:24:in initialize' 4: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:66:insetup_testcollector'
3: from */vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:66:in new' 2: from ****/vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/helper/test_collector.rb:17:ininitialize'
1: from *
/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in method_missing' ****/vendor/bundle/ruby/2.6.0/gems/fastlane-**2.153.1/fastlane_core/lib/fastlane_core/ui/interface.rb:141:inuser_error!': Error: cannot find xctestrun file ''** (FastlaneCore::Interface::FastlaneError)

7: from */fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in run' 6: from *******/fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:innew'
5: from */fastlane-plugin-test_center-3.13.0/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:24:in `initialize'

1: from *bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in method_missing' *******/vendor/bundle/ruby/2.6.0/gems/fastlane-2.153.1/fastlane_core/lib/fastlane_core/ui/interface.rb:141:inuser_error!': [!] Error: cannot find xctestrun file '' (FastlaneCore::Interface::FastlaneError)

♻️ multi_scan 🐞bug

All 32 comments

I keep seeing this error as well

15: from Fastfile:35:inblock (2 levels) in parsing_binding' 35 line number is starting multi_scan function `

I also removed

clean: true,

        scan(
                app_identifier: "xxx",
                scheme: "xxx",
                devices: ["iPhone 11 Pro (13.3)"],
                only_testing: ["***"],
                include_simulator_logs: true,
                disable_concurrent_testing: true,
                disable_xcpretty: true,
                output_types:"",
                code_coverage: true,
                derived_data_path: "./fastlane/DerivedData",
                reinstall_app: true,
                reset_simulator: true,
                fail_build: false,
                test_without_building: true,
                result_bundle: true,
                xcargs: "-parallel-testing-enabled YES -parallel-testing-worker-count 6 -quiet",
                buildlog_path: "./fastlane/test_output/***",
                output_directory: "./fastlane/test_output/***"

            )

Scan function works fine

Here multi_scan.

    multi_scan(
        project: File.absolute_path('../ ****.xcodeproj'),
        only_testing: [" ****UITests"],
        app_identifier: " ****",
        scheme: " ****",
        devices: ["iPhone 11 Pro (13.3)"],
        include_simulator_logs: true,
        disable_concurrent_testing: true,
        disable_xcpretty: true,
        output_types:"",
        code_coverage: false,
        derived_data_path: "./fastlane/DerivedData",
        reinstall_app: true,
        reset_simulator: true,
        fail_build: false,
        clean: true,
            test_without_building: true,
        result_bundle: true,
        batch_count:6,
        try_count: 3, # retry _failing_ tests up to three times^1.
        testrun_completed_block: test_run_block,
        xcargs: "-parallel-testing-enabled YES -parallel-testing-worker-count 6 -quiet",
        buildlog_path: "./fastlane/test_output/ ****",
        output_directory: "./fastlane/test_output/ ****"
    )

end

@lyndsey-ferguson Do you know why multi scan doesn't generate xctestrun file

I also tried with workspace

@jambudi I'll respond with a gut level "feeling" right now as I don't have a lot of time to look into this.

I believe that it is failing because you have the :test_without_building set to true, and that multi_scan is expecting the path to the *.xctestrun file.

I think that scan is succeeding because it _may_ be finding a *.xctestrun file in your Derived Data folder, and I don't remember if multi_scan does this. If you know the name of your *.xctestrun, pass it in as the :xctestrun field.

I can look into making multi_scan operate similarly when I can prioritize this issue next.

My one ask is this: if my suggestion works, can you confirm or deny here in this Issue?

So, I can build for testing using scan, and multi_scan will find the xctestrun file without an issue

lane :integration_test_prebuilt_xctestrun do
  scan(
    workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
    scheme: 'AtomicBoy',
    build_for_testing: true,
    derived_data_path: "./fastlane/DerivedData"
  )
  multi_scan(
    workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
    scheme: 'AtomicBoy',
    fail_build: false,
    try_count: 2,
    clean: true,
    test_without_building: true,
    derived_data_path: "./fastlane/DerivedData",
    only_testing: ['AtomicBoyUITests']
  ) 
end

Can you attach an image of what is in your directory ./fastlane/DerivedData/Build/Products? There should be an *.xctestrun file there, but multi_scan is not finding one there.

./fastlane/DerivedData/Build/Products In this directory, I have only one folder that's /Debug-iphonesimulator. I think it is not generating *.xctestrun

Are there any .xctestrun files in any directories around that path?

my assumption:

After I remove : test_without_building: true, I can see .xctestrun file under './fastlane/DerivedData/Build/Products` . I am able to run tests without using test_without_building: true. I don't have answers to why.

I tested with different alternative and I am sure it is not generating .xctestrun when we have flags true for test_without_building:

When you remove test_without_building: true, you're telling multi_scan to go ahead and build your app before running the tests. That _will_ create the .xctestrun file.

Can you include the logs for scan when you call it instead of multi_scan in your :smoke_tests lane?

|                                                     Summary for scan 2.153.1                                                      |
+------------------------------------------------+----------------------------------------------------------------------------------+
| workspace                                      | *****  |
|                                                | *****                                                                            |
| only_testing                                   | ["***** "]                                                           |
| app_identifier                                 | *****                                                                  |
| scheme                                         | *****                                                                       |
| devices                                        | ["***** "]                                                         |
| include_simulator_logs                         | true                                                                             |
| disable_concurrent_testing                     | true                                                                             |
| disable_xcpretty                               | true                                                                             |
| code_coverage                                  | false                                                                            |
| derived_data_path                              | ./fastlane/DerivedData                                                           |
| reinstall_app                                  | true                                                                             |
| reset_simulator                                | true                                                                             |
| fail_build                                     | false                                                                            |
| result_bundle                                  | true                                                                             |
| buildlog_path                                  | ./fastlane/test_output/smoke_results                                             |
| output_directory                               | ./fastlane/test_output/smoke_results                                             |
| skip_detect_devices                            | false                                                                            |
| force_quit_simulator                           | false                                                                            |
| disable_slide_to_type                          | true                                                                             |
| clean                                          | false                                                                            |
| open_report                                    | false                                                                            |
| should_zip_build_products                      | false                                                                            |
| use_clang_report_name                          | false                                                                            |
| skip_build                                     | false                                                                            |
| slack_use_webhook_configured_username_and_icon | false                                                                            |
| slack_username                                 | fastlane                                                                         |
| slack_icon_url                                 | https://fastlane.tools/assets/img/fastlane_icon.png                              |
| skip_slack                                     | false                                                                            |
| slack_only_on_failure                          | false                                                                            |
| xcodebuild_command                             | env NSUnbufferedIO=YES xcodebuild                                                |
| xcode_path                                     | /Applications/Xcode.app                                                          |
+------------------------------------------------+----------------------------------------------------------------------------------+

That's the summary, and I don't see test_without_building: true as one of the options. I want to see the xcodebuild command too (to see how scan resolves the params).

xcode command

From Multi_scan command

$ set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace xxxx.xcworkspace -scheme xxxx -destination 'platform=iOS Simulator,id= xxxx' -derivedDataPath './fastlane/DerivedData' -disable-concurrent-testing -enableCodeCoverage NO -quiet -only-testing: xxxx build-for-testing | tee 'xxxx.log'

From Scan command

$ set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace ./xxxx.xcworkspace -scheme xxxx -destination 'platform=iOS Simulator,id= xxxx' -derivedDataPath './fastlane/DerivedData' -resultBundlePath '. xxxx.xcresult' -disable-concurrent-testing -enableCodeCoverage YES -parallel-testing-enabled YES -parallel-testing-worker-count 6 -quiet -only-testing: xxxx test-without-building | tee 'xxxx.log'

Why did you close this Issue? Did you find out something?

@lyndsey-ferguson I thought I found a workaround for my issue. Never mind I opened again.

Thanks! I would rather find the root of the problem even if you find a workaround. Others may face the same issue...

Please be patient as I don't have a lot of time I can dedicate to this right now.

Step by step, we will figure it out.

I cannot reproduce a successful run of scan if I configure my example run of scan in the same way that you have:

lane :integration_test_prebuilt_xctestrun do
  scan(
    workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
    scheme: 'AtomicBoy',
    fail_build: false,
    test_without_building: true,
    derived_data_path: "./fastlane/DerivedData",
    only_testing: ['AtomicBoyUITests'],
    include_simulator_logs: true,
    disable_concurrent_testing: true,
    disable_xcpretty: true,
    output_types:"",
    code_coverage: true,
    reinstall_app: true,
    app_identifier: "com.appian.AtomicBoy",
    reset_simulator: true,
    result_bundle: true,
    xcargs: "-parallel-testing-enabled YES -parallel-testing-worker-count 6 -quiet",
    buildlog_path: "./fastlane/test_output/***",
    output_directory: "./fastlane/test_output/***"
  ) 
end

And every time it fails to run tests because it cannot find the application. Can you please provide a sample project and Fastfile that demonstrates a successful run of this with scan? You can use the AtomicBoy.xcodeproject that is part of this plugin.

@lyndsey-ferguson in our scan file do not have workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'), I am not sure because of this you are not seeing error. I will try to reproduce that error as per your suggestion. Currently, I am investing other issues

  • Skipping selected tests from the schema (in our smoke tests we have 45 test cases and only ran 20 test cases)

Any tricks & tips always appreciate

I'm sorry, but I don't understand. Are you seeing a different issue? If yes, please create a new Issue with all the logs and other data requested in the Issue template 🙏.

Hi @lyndsey-ferguson I think I have somehow the same issue, so what the problem:
I have localization tests which I run with this Fastlane script:

desc 'Run localization UI tests'
lane :native_localization_ui_test do |options|
  clean_up_and_install_dependencies
  scheme = ENV["UI_TESTS_SCHEME"] || "Localization"
  workspace = "#{ENV["MAIN_TARGET"]}.xcworkspace"
  derived_data_path = "~/Library/Developer/Xcode/DerivedData"
  cloned_source_packages_path = "~/Library/Caches/SPMCloneCaches"
  devices = ['iPhone 11 Pro Max']
  output_dir = "./fastlane/test_output"

  scan(
    workspace: workspace,
    devices: devices,
    scheme: scheme,
    skip_slack: true,
    derived_data_path: derived_data_path,
    cloned_source_packages_path: cloned_source_packages_path,
    build_for_testing: true
  )

  snapshot(
    workspace: workspace,
    devices: devices,
    scheme: scheme,
    languages: ENV["UI_TESTS_LANGUAGE"],
    localize_simulator: true,
    output_directory: output_dir,
    clear_previous_screenshots: true,
    output_simulator_logs: true,
    erase_simulator: true,
    result_bundle: true,
    number_of_retries: 0,
    skip_open_summary: false,
    test_without_building: true,
    derived_data_path: derived_data_path,
    cloned_source_packages_path: cloned_source_packages_path
 )
  generateAllureReport(xcresultPath: File.absolute_path('./test_output/result.xcresult'))
end

So, as you can see I'm using scan to build app only once and then I'm using snapshot for localization ui tests, I want to use multi_scan instead of scan, but when I try to run tests with this script:

desc 'Run localization UI tests'
lane :native_localization_ui_test do |options|

  fastlane_require 'fastlane-plugin-test_center'

  clean_up_and_install_dependencies
  scheme = ENV["UI_TESTS_SCHEME"] || "Localization"
  workspace = "#{ENV["MAIN_TARGET"]}.xcworkspace"
  derived_data_path = "~/Library/Developer/Xcode/DerivedData"
  cloned_source_packages_path = "~/Library/Caches/SPMCloneCaches"
  devices = ['iPhone 11 Pro Max']
  output_dir = "./fastlane/test_output"

  multi_scan(
   workspace: workspace,
   devices: devices,
   output_directory: output_dir,
   scheme: scheme,
   skip_slack: true,
   derived_data_path: derived_data_path,
   cloned_source_packages_path: cloned_source_packages_path,
   build_for_testing: true
  )

  snapshot(
    workspace: workspace,
    devices: devices,
    scheme: scheme,
    languages: ENV["UI_TESTS_LANGUAGE"],
    localize_simulator: true,
    output_directory: output_dir,
    clear_previous_screenshots: true,
    output_simulator_logs: true,
    erase_simulator: true,
    result_bundle: true,
    number_of_retries: 0,
    skip_open_summary: false,
    test_without_building: true,
    derived_data_path: derived_data_path,
    cloned_source_packages_path: cloned_source_packages_path
 )
  pathes = Dir.glob("test_output/**/*.xcresult").map { |relpath| File.absolute_path(relpath) }
  result_bundle_path = File.join(output_dir, 'result.xcresult')
  collate_xcresults(
    xcresults: pathes,
    collated_xcresult: result_bundle_path
  )
  generateAllureReport(xcresultPath: File.absolute_path('./test_output/result.xcresult'))

  junits = Dir['test_output/**/*.junit'].map { |relpath| File.absolute_path(relpath) }
  collate_junit_reports(
    reports: junits.sort_by { |f| File.mtime(f) },
    collated_report: File.join(output_dir, 'collated_junit.junit')
  )
end

I'm receiving an error:


[!] Error: cannot find xctestrun file ''

I think it's pretty the same issue :(
P.S. test center version: 3.10.2

@alexnot95 can you run your lane with the --verbose flag and attach the logs to this Issue? Please obfuscate any sensitive data (but keep their uniqueness).

Also, what happens if you run multi_scan without build_for_testing? Also, what version of Xcode are you using?

@lyndsey-ferguson xcode 11.5 and tried with updated test_center plugin: 3.14.1

with --verbose flag:

DEBUG [2020-08-26 11:13:12.91]: After building, found xctestrun files [] (choosing 1st)
DEBUG [2020-08-26 11:13:12.91]: Removing report files generated by the build
DEBUG [2020-08-26 11:13:12.91]:   ./fastlane/test_output/report.html
DEBUG [2020-08-26 11:13:12.91]:   ./fastlane/test_output/report.junit
INFO [2020-08-26 11:13:12.92]: -----------------------------------
INFO [2020-08-26 11:13:12.92]: --- Step: clean_build_artifacts ---
INFO [2020-08-26 11:13:12.92]: -----------------------------------
INFO [2020-08-26 11:13:12.92]: Cleaned up build artifacts 🐙
WARN [2020-08-26 11:13:12.92]: Fail? with 'native_localization_ui_test' Exception Error: cannot find xctestrun file '' 
WARN [2020-08-26 11:13:12.92]: Lane Context:
INFO [2020-08-26 11:13:12.92]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>nil, :LANE_NAME=>"native_localization_ui_test", :SIGH_PROFILE_PATHS=>nil, :DSYM_PATHS=>nil}
ERROR [2020-08-26 11:13:12.93]: Error: cannot find xctestrun file ''
INFO [2020-08-26 11:13:12.93]: Successfully generated documentation at path '/Users/test/Documents/github/test/fastlane/README.md'

+------+----------------------------+-------------+
|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | Verifying fastlane version | 0           |
| 2    | default_platform           | 0           |
| 3    | Verifying fastlane version | 0           |
| 4    | default_platform           | 0           |
| 5    | import_from_git            | 5           |
| 6    | xcversion                  | 1           |
| 7    | clear_derived_data         | 72          |
| 8    | cocoapods                  | 8           |
| 9    | cd .. && ./.autogen.sh     | 64          |
| 💥   | multi_scan                 | 1448        |
| 11   | clean_build_artifacts      | 0           |
+------+----------------------------+-------------+

DEBUG [2020-08-26 11:13:13.04]: All plugins are up to date
ERROR [2020-08-26 11:13:13.04]: fastlane finished with errors
DEBUG [2020-08-26 11:13:13.04]: All plugins are up to date
Traceback (most recent call last):
    33: from /Users/test/.rbenv/versions/2.5.0/bin/fastlane:23:in `<main>'
    32: from /Users/test/.rbenv/versions/2.5.0/bin/fastlane:23:in `load'
    31: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/bin/fastlane:23:in `<top (required)>'
    30: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
    29: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
    28: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
    27: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
    26: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
    25: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
    24: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
    23: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
    22: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
    21: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
    20: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
    19: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
    18: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    17: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    16: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/lane.rb:33:in `call'
    15: from ../../../../../../var/folders/tq/1n2j7ky11b95mdnxd3__k4c40000gn/T/fl_clone20200826-62452-dx5giw/Fastlane.git/Fastfile:151:in `block in parsing_binding'
    14: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
    13: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
    12: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
    11: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
    10: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
     9: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
     8: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
     7: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in `run'
     6: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in `new'
     5: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:24:in `initialize'
     4: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:66:in `setup_testcollector'
     3: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:66:in `new'
     2: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/test_collector.rb:17:in `initialize'
     1: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': [!] Error: cannot find xctestrun file '' (FastlaneCore::Interface::FastlaneError)

Also, fastlane env:

<details><summary>🚫 fastlane environment 🚫</summary>

### Stack

| Key                         | Value                                       |
| --------------------------- | ------------------------------------------- |
| OS                          | 10.15.3                                     |
| Ruby                        | 2.5.0                                       |
| Bundler?                    | false                                       |
| Git                         | git version 2.24.0                          |
| Installation Source         | ~/.rbenv/versions/2.5.0/bin/fastlane        |
| Host                        | Mac OS X 10.15.3 (19D76)                    |
| Ruby Lib Dir                | ~/.rbenv/versions/2.5.0/lib                 |
| OpenSSL Version             | OpenSSL 1.1.1d  10 Sep 2019                 |
| Is contained                | false                                       |
| Is homebrew                 | false                                       |
| Is installed via Fabric.app | false                                       |
| Xcode Path                  | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version               | 11.5                                        |


### System Locale

| Error                       |
| --------------------------- |
| No Locale with UTF8 found 🚫 |


### fastlane files:

<details><summary>`./fastlane/Fastfile`</summary>

```ruby
#!/usr/bin/ruby
fastlane_version "2.130.0"
default_platform :ios
import("./download-local-content/local-content-helpers.rb")
import("./download-local-content/food-images.rb")
import("./download-local-content/program-images.rb")
import("./download-local-content/exercise-images.rb")
import("./download-local-content/workouts-videos.rb")
import("./localization-upload/analyze-and-upload.rb")

import_from_git(
  url: '[email protected]:test-dev/Fastlane.git',
  branch: 'update-localization',
  path: 'Fastfile'
)
lane :ui_test do |options|
  execute_ui_test(options)
end
lane :ui_test_archive do |options|
  options[:archive_only] = true
  execute_ui_test(options)
end
lane :test do |options|
  options[:scheme] = 'UnitTests'
  execute_test(options)
end
desc "Submit a new Crashlytics build from provided branch with badge"
lane :beta do |options|
  execute_beta(options)
end
desc "Submit a new AdHoc Build to Apple TestFlight from develop branch"
lane :release_appstore do |options|
  execute_release_appstore(options)
end
desc "Checks if all configs settings exists in *.info plists"
lane :fullfill_plists_with_configs do
  execute_fullfill_plists_with_configs
end
desc "Passes firebase analytics argument on launchtime"
lane :enable_firebase_debug_mode do
  execute_enable_firebase_debug_mode
end
desc "Downloads provision profiles"
lane :download_profiles do
 execute_download_profiles
end

desc 'Registers new device to the Apple Dev Portal and recreating adhoc & development provisioning profiles.'
desc 'name - Device name.'
desc 'udid - Device identifier.'
desc 'apple_id - Apple Developer email. (You should use your personal ID. By default takes from Appfile)'
lane :register_new_device do |options|
  execute_register_device(options)
end

### To enable automatic import of translations:
### Localize Localizable.strings file in Xcode project
### Enable supported languages in Xcode project
### Add calls for private import_translation lane for supported languages
# desc "Imports transtlated Localizable.strings from POEditor"
# lane :import_translations do 
  # execute_import_translation(lang: "ru")
  # execute_import_translation(lang: "zh-Hans")
  # execute_import_translation(lang: "zh-Hant")
  # execute_import_translation(lang: "es")
# end

fastlane gems

| Gem | Version | Update-Status |
| -------- | ------- | ------------- |
| fastlane | 2.156.1 | ✅ Up-To-Date |

Loaded fastlane plugins:

| Plugin | Version | Update-Status |
| ----------------------------------------------------- | ------- | ------------- |
| fastlane-plugin-update_provisioning_profile_specifier | 1.3.1 | ✅ Up-To-Date |
| fastlane-plugin-versioning | 0.4.3 | ✅ Up-To-Date |
| fastlane-plugin-badge | 1.4.0 | ✅ Up-To-Date |
| fastlane-plugin-slack_train | 0.2.0 | ✅ Up-To-Date |
| fastlane-plugin-xchtmlreport | 0.1.1 | ✅ Up-To-Date |
| fastlane-plugin-appcenter | 1.9.0 | ✅ Up-To-Date |
| fastlane-plugin-test_center | 3.14.1 | ✅ Up-To-Date |

generated on: 2020-08-26

```

@alexnot95 I don't know why the *.xctestrun file cannot be found. I've put more debugging code to try and determine where the file is.

Can you 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 => "issue-272-no-xctestrun-crash"

Attach the console output as a text file to this issue (makes it easier for me to review).

@lyndsey-ferguson
from your branch with --verbose flag:

DEBUG [2020-08-26 15:44:05.05]: After building, found xctestrun files [] (choosing 1st)
DEBUG [2020-08-26 15:44:05.05]: Removing report files generated by the build
DEBUG [2020-08-26 15:44:05.05]:   ./fastlane/test_output/report.html
DEBUG [2020-08-26 15:44:05.05]:   ./fastlane/test_output/report.junit
INFO [2020-08-26 15:44:05.06]: -----------------------------------
INFO [2020-08-26 15:44:05.06]: --- Step: clean_build_artifacts ---
INFO [2020-08-26 15:44:05.06]: -----------------------------------
INFO [2020-08-26 15:44:05.06]: Cleaned up build artifacts 🐙
WARN [2020-08-26 15:44:05.06]: Fail? with 'native_localization_ui_test' Exception Error: cannot find xctestrun file '' 
WARN [2020-08-26 15:44:05.06]: Lane Context:
INFO [2020-08-26 15:44:05.06]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>nil, :LANE_NAME=>"native_localization_ui_test", :SIGH_PROFILE_PATHS=>nil, :DSYM_PATHS=>nil}
ERROR [2020-08-26 15:44:05.06]: Error: cannot find xctestrun file ''
INFO [2020-08-26 15:44:05.06]: Successfully generated documentation at path '/Users/test/Documents/github/test/fastlane/README.md'

+------+----------------------------+-------------+
|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | Verifying fastlane version | 0           |
| 2    | default_platform           | 0           |
| 3    | Verifying fastlane version | 0           |
| 4    | default_platform           | 0           |
| 5    | import_from_git            | 2           |
| 6    | xcversion                  | 0           |
| 7    | clear_derived_data         | 16          |
| 8    | cocoapods                  | 7           |
| 9    | cd .. && ./.autogen.sh     | 39          |
| 💥   | multi_scan                 | 499         |
| 11   | clean_build_artifacts      | 0           |
+------+----------------------------+-------------+

DEBUG [2020-08-26 15:44:05.11]: All plugins are up to date
ERROR [2020-08-26 15:44:05.11]: fastlane finished with errors
DEBUG [2020-08-26 15:44:05.11]: All plugins are up to date
Traceback (most recent call last):
    33: from /Users/test/.rbenv/versions/2.5.0/bin/fastlane:23:in `<main>'
    32: from /Users/test/.rbenv/versions/2.5.0/bin/fastlane:23:in `load'
    31: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/bin/fastlane:23:in `<top (required)>'
    30: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
    29: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
    28: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
    27: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
    26: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
    25: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
    24: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
    23: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
    22: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
    21: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
    20: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
    19: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
    18: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    17: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    16: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/lane.rb:33:in `call'
    15: from ../../../../../../var/folders/tq/1n2j7ky11b95mdnxd3__k4c40000gn/T/fl_clone20200826-84105-150t7pz/Fastlane.git/Fastfile:151:in `block in parsing_binding'
    14: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
    13: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
    12: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
    11: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
    10: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
     9: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
     8: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
     7: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in `run'
     6: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in `new'
     5: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:24:in `initialize'
     4: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:66:in `setup_testcollector'
     3: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:66:in `new'
     2: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/test_collector.rb:17:in `initialize'
     1: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': [!] Error: cannot find xctestrun file '' (FastlaneCore::Interface::FastlaneError)

Hm. That's not at all what I expected. I put special code to log when that array of xctestrun files is empty. I've modified the code to put a little more logging.

Can you delete your Gemfile.lock file and, run bundle install, and retry your lane with the --verbose flag?

@lyndsey-ferguson is this one you are looking for? deleted Gemfile.lock + bundle install + run fastlane with --verbose from your branch:

DEBUG [2020-08-26 16:38:08.42]: After building, found xctestrun files [] (choosing 1st)
DEBUG [2020-08-26 16:38:08.42]: Removing report files generated by the build
DEBUG [2020-08-26 16:38:08.42]:   ./fastlane/test_output/report.html
DEBUG [2020-08-26 16:38:08.42]:   ./fastlane/test_output/report.junit
INFO [2020-08-26 16:38:08.42]: -----------------------------------
INFO [2020-08-26 16:38:08.42]: --- Step: clean_build_artifacts ---
INFO [2020-08-26 16:38:08.42]: -----------------------------------
INFO [2020-08-26 16:38:08.42]: Cleaned up build artifacts 🐙
WARN [2020-08-26 16:38:08.42]: Fail? with 'native_localization_ui_test' Exception Error: cannot find xctestrun file '' 
WARN [2020-08-26 16:38:08.42]: Lane Context:
INFO [2020-08-26 16:38:08.42]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>nil, :LANE_NAME=>"native_localization_ui_test", :SIGH_PROFILE_PATHS=>nil, :DSYM_PATHS=>nil}
ERROR [2020-08-26 16:38:08.42]: Error: cannot find xctestrun file ''
INFO [2020-08-26 16:38:08.43]: Successfully generated documentation at path '/Users/test/Documents/github/test/fastlane/README.md'

+------+----------------------------+-------------+
|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | Verifying fastlane version | 0           |
| 2    | default_platform           | 0           |
| 3    | Verifying fastlane version | 0           |
| 4    | default_platform           | 0           |
| 5    | import_from_git            | 4           |
| 6    | xcversion                  | 0           |
| 7    | clear_derived_data         | 12          |
| 8    | cocoapods                  | 7           |
| 9    | cd .. && ./.autogen.sh     | 43          |
| 💥   | multi_scan                 | 441         |
| 11   | clean_build_artifacts      | 0           |
+------+----------------------------+-------------+

DEBUG [2020-08-26 16:38:08.46]: All plugins are up to date
ERROR [2020-08-26 16:38:08.46]: fastlane finished with errors
DEBUG [2020-08-26 16:38:08.46]: All plugins are up to date
Traceback (most recent call last):
    33: from /Users/test/.rbenv/versions/2.5.0/bin/fastlane:23:in `<main>'
    32: from /Users/test/.rbenv/versions/2.5.0/bin/fastlane:23:in `load'
    31: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/bin/fastlane:23:in `<top (required)>'
    30: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
    29: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
    28: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
    27: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
    26: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
    25: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
    24: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
    23: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
    22: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
    21: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
    20: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
    19: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
    18: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    17: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    16: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/lane.rb:33:in `call'
    15: from ../../../../../../var/folders/tq/1n2j7ky11b95mdnxd3__k4c40000gn/T/fl_clone20200826-4633-1tdpcd5/Fastlane.git/Fastfile:151:in `block in parsing_binding'
    14: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
    13: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
    12: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
    11: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
    10: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
     9: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
     8: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
     7: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in `run'
     6: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/actions/multi_scan.rb:37:in `new'
     5: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:24:in `initialize'
     4: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:66:in `setup_testcollector'
     3: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/multi_scan_manager/runner.rb:66:in `new'
     2: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-test_center-3.14.1/lib/fastlane/plugin/test_center/helper/test_collector.rb:17:in `initialize'
     1: from /Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/test/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.156.1/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': [!] Error: cannot find xctestrun file '' (FastlaneCore::Interface::FastlaneError)

I accidentally deleted my comment: but no this isn't the log I'm expecting. At the very least, it should have "Hello!" when it states which xctestrun files it found:

https://github.com/lyndsey-ferguson/fastlane-plugin-test_center/compare/issue-272-no-xctestrun-crash#diff-b1627ddcb767b566591f53bc2ae1fcffR282

Can you make sure that the Gemfile.lock file was removed, bundle install was run, and you're calling this with bundle exec fastlane <yourlane name>?

I'm closing this issue as I don't have the information I need to reproduce the problem. I need better logs as I described above or a complete sample project that exhibits this problem so I can reproduce.

This issue can be reopened if I get that information.

Was this page helpful?
0 / 5 - 0 ratings