bytedance / Fastbot_iOS

About Fastbot(2.0) is a model-based testing tool for modeling GUI transitions to discover app stability problems
Other
563 stars 114 forks source link

duration设置的时长还未到,提前异常结束 #56

Closed xyd113 closed 3 years ago

xyd113 commented 3 years ago

duration设置720分钟,大概执行半个小时左右monkey会自动异常结束。

电脑:mac10.15.5,xcode:12.3 (12C33),iphone:13.3.1 (17D50)

执行指令: BUNDLEID=com.xxx.xxx duration=720 throttle=300 xcodebuild test -workspace Fastbot-iOS.xcworkspace -scheme FastbotRunner -configuration Release -destination 'platform=iOS,id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' -only-testing:FastbotRunner/FastbotRunner/testFastbot

执行开始日志: 2021-09-23 20:13:40.570 xcodebuild[73156:17004570] [MT] IDETestOperationsObserverDebug: (D74FDC80-C148-4D9D-AA95-349F0847D998) Finished requesting crash reports. Continuing with testing. 2021-09-23 20:13:44.882 xcodebuild[73156:17004646] DTDKRemoteDeviceConnection: Failed to start remote service "com.apple.instruments.remoteserver.DVTSecureSocketProxy" on device. Error: Error Domain=com.apple.dtdevicekit Code=811 "Failed to start remote service "com.apple.instruments.remoteserver.DVTSecureSocketProxy" on device." UserInfo={NSUnderlyingError=0x7fc264b4aec0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653150 "The service is invalid." UserInfo={MobileDeviceErrorCode=(0xE8000022), com.apple.dtdevicekit.stacktrace=( 0 DTDeviceKitBase 0x000000011d951c8f DTDKCreateNSErrorFromAMDErrorCode + 220 1 DTDeviceKitBase 0x000000011d9615a4 63-[DTDKRemoteDeviceConnection startFirstServiceOf:unlockKeybag:]_block_invoke + 613 2 DTDeviceKitBase 0x000000011d960c70 48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 22 3 DTDeviceKitBase 0x000000011d953def DTDKExecuteInSession_block_invoke_2 + 35 4 DTDeviceKitBase 0x000000011d9534c9 __DTDKExecuteWithConnection_block_invoke_2 + 218 5 DTDeviceKitBase 0x000000011d9533c6 DTDKExecuteWithConnection_block_invoke + 106 6 libdispatch.dylib 0x00007fff6cac4658 _dispatch_client_callout + 8 7 libdispatch.dylib 0x00007fff6cad06ec _dispatch_lane_barrier_sync_invoke_and_complete + 60 8 DVTFoundation 0x000000010c407cc3 DVTDispatchBarrierSync + 208 9 DVTFoundation 0x000000010c3ded76 -[DVTDispatchLock performLockedBlock:] + 60 10 DTDeviceKitBase 0x000000011d9532c7 DTDKExecuteWithConnection + 226 11 DTDeviceKitBase 0x000000011d953c93 DTDKExecuteInSession + 239 12 DTDeviceKitBase 0x000000011d960ac2 48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_2 + 131 13 DVTFoundation 0x000000010c40517e __DVT_CALLING_CLIENT_BLOCK + 7 14 DVTFoundation 0x000000010c406da0 __DVTDispatchAsync_block_invoke + 1191 15 libdispatch.dylib 0x00007fff6cac36c4 _dispatch_call_block_and_release + 12 16 libdispatch.dylib 0x00007fff6cac4658 _dispatch_client_callout + 8 17 libdispatch.dylib 0x00007fff6cac9c44 _dispatch_lane_serial_drain + 597 18 libdispatch.dylib 0x00007fff6caca609 _dispatch_lane_invoke + 414 19 libdispatch.dylib 0x00007fff6cad3c09 _dispatch_workloop_worker_thread + 596 20 libsystem_pthread.dylib 0x00007fff6cd1ea3d _pthread_wqthread + 290 21 libsystem_pthread.dylib 0x00007fff6cd1db77 start_wqthread + 15 ), DVTRadarComponentKey=261622, NSLocalizedDescription=The service is invalid.}}, NSLocalizedRecoverySuggestion=Please check your connection to your device., DVTRadarComponentKey=261622, NSLocalizedDescription=Failed to start remote service "com.apple.instruments.remoteserver.DVTSecureSocketProxy" on device.} 2021-09-23 20:13:44.882 xcodebuild[73156:17004635] DTDKRemoteDeviceConnection: Unable to start com.apple.instruments.remoteserver.DVTSecureSocketProxy on device “6c7e554590b7391704c6cbd4d7ca676089debe3f”. Falling back to service without proxy. 2021-09-23 20:13:45.764536+0800 FastbotRunner-Runner[266:4604] Running tests... Test Suite 'Selected tests' started at 2021-09-23 20:13:46.043 Test Suite 'FastbotRunner.xctest' started at 2021-09-23 20:13:46.044 Test Suite 'FastbotRunner' started at 2021-09-23 20:13:46.045 Test Case '-[FastbotRunner testFastbot]' started.

执行结束前日志: 2021-09-23 20:51:25.126 xcodebuild[73156:17004570] [MT] IDETestOperationsObserverDebug: 2264.853 elapsed -- Testing started completed. 2021-09-23 20:51:25.127 xcodebuild[73156:17004570] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start 2021-09-23 20:51:25.127 xcodebuild[73156:17004570] [MT] IDETestOperationsObserverDebug: 2264.853 sec, +2264.853 sec -- end 2021-09-23 20:51:25.248 xcodebuild[73156:17004570] [MT] IDEResultKit: Warning: While writing a result bundle to /Users/anker/Library/Developer/Xcode/DerivedData/Fastbot-iOS-grxdhcahydyfjhfsoiislbtxqtfg/Logs/Test/Test-FastbotRunner-2021.09.23_20-13-38-+0800.xcresult, not all contents have been imported, as the Staging directory still contains the following files/directories: ["1_Test"]

Test session results, code coverage, and logs: /Users/anker/Library/Developer/Xcode/DerivedData/Fastbot-iOS-grxdhcahydyfjhfsoiislbtxqtfg/Logs/Test/Test-FastbotRunner-2021.09.23_20-13-38-+0800.xcresult

Testing failed: FastbotRunner: testFastbot encountered an error (Test runner exited. If you believe this error represents a bug, please attach the result bundle at /Users/anker/Library/Developer/Xcode/DerivedData/Fastbot-iOS-grxdhcahydyfjhfsoiislbtxqtfg/Logs/Test/Test-FastbotRunner-2021.09.23_20-13-38-+0800.xcresult)

TEST FAILED

geron-cn commented 3 years ago

可参考 log 中的 DVTRadarComponentKey=261622, NSLocalizedDescription=The service is invalid.}}, NSLocalizedRecoverySuggestion=Please check your connection to your device., DVTRadarComponentKey=261622, NSLocalizedDescription=Failed to start remote service "com.apple.instruments.remoteserver.DVTSecureSocketProxy" on device.}

归因为连接不稳定, 可以 重启工具/重启手机/ 更换 USB 线 等。