xcbeautify icon indicating copy to clipboard operation
xcbeautify copied to clipboard

Simulator failures not captured

Open dalemyers opened this issue 3 years ago • 2 comments

If the simulator fails for whatever reason then the output isn't captured. Here's a sample (test names and classes replaced with snipped):

Test Case '-[snipped]' passed (0.416 seconds).
Test Suite 'snipped' passed at 2020-09-30 03:49:19.794.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.416 (0.418) seconds
Test Suite 'snipped.xctest' passed at 2020-09-30 03:49:19.796.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.416 (0.421) seconds
Test Suite 'All tests' passed at 2020-09-30 03:49:19.797.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.416 (0.423) seconds
2020-09-30 03:49:23.416 xcodebuild[13914:99691] [MT] IDETestOperationsObserverDebug: 335.611 elapsed -- Testing started completed.
2020-09-30 03:49:23.416 xcodebuild[13914:99691] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2020-09-30 03:49:23.416 xcodebuild[13914:99691] [MT] IDETestOperationsObserverDebug: 335.611 sec, +335.611 sec -- end

Test session results, code coverage, and logs:
	/Users/runner/work/1/s/app-ios/Builds/xcresults/snipped.xcresult

Testing failed:
	snipped:
		The test runner encountered an error (Failed to prepare device 'Test - f204ffed - 20200930' for impending launch. If you believe this error represents a bug, please attach the result bundle at /Users/runner/work/1/s/app-ios/Builds/xcresult. (Underlying Error: Unable to boot the Simulator. launchd failed to respond. (Underlying Error: Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding)))

** TEST EXECUTE FAILED **

The actual output of this is:

Test Suite snipped.xctest started
snipped
    ✔ snipped (0.416 seconds)
Tests Passed: 0 failed, 1 total (0.423 seconds)

I'd have expected to see something more like:

Test Suite snipped.xctest started
snipped
    ✔ snipped (0.416 seconds)
Tests Passed: 0 failed, 1 total (0.423 seconds)
❌The test runner encountered an error (Failed to prepare device 'Test - f204ffed - 20200930' for impending launch. If you believe this error represents a bug, please attach the result bundle at /Users/runner/work/1/s/app-ios/Builds/xcresult. (Underlying Error: Unable to boot the Simulator. launchd failed to respond. (Underlying Error: Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding)))

I can share the full log privately if that's more helpful.

dalemyers avatar Sep 30 '20 08:09 dalemyers

Have you found any similar errors? I have some similar errors from the past: https://github.com/lyndsey-ferguson/fastlane-plugin-test_center/issues/202#issue-574232096 It seems like the best would be to match for 3 lines:

Testing failed:
\s(TargetName):
\s(ErrorMessage)

This might be also useful: https://github.com/lyndsey-ferguson/fastlane-plugin-test_center/blob/master/lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan_helper.rb#L324-L343

Cyberbeni avatar Dec 08 '20 22:12 Cyberbeni

@thii I think the easiest would be for Parser.parse(...) to get an additional input where it can request the next line for multiline matches. What do you think?

Cyberbeni avatar Dec 08 '20 22:12 Cyberbeni

Hola 👋,

We want to inform you that the issue has been marked as stale. This means that there hasn't been any activity or updates on it for quite some time, and it's possible that it may no longer be relevant or actionable. If you still believe that this issue is valid and requires attention, please provide an update or any additional information that can help us address it. Otherwise, we may consider closing it in the near future. Thank you for your understanding.

github-actions[bot] avatar Jul 06 '23 02:07 github-actions[bot]

Hola 👋,

We want to inform you that the issue has been marked as stale. This means that there hasn't been any activity or updates on it for quite some time, and it's possible that it may no longer be relevant or actionable. If you still believe that this issue is valid and requires attention, please provide an update or any additional information that can help us address it. Otherwise, we may consider closing it in the near future. Thank you for your understanding.

github-actions[bot] avatar Aug 06 '23 01:08 github-actions[bot]

Hola 👋,

We want to inform you that we have decided to close this stale issue as there hasn't been any activity or response regarding it after marking it as stale.

We understand that circumstances may have changed or priorities may have shifted, and that's completely understandable. If you still believe that this issue needs to be addressed, please feel free to reopen it and provide any necessary updates or additional information.

We appreciate your understanding and look forward to your continued contributions to the project.

Thank you.

github-actions[bot] avatar Aug 12 '23 01:08 github-actions[bot]