【发布时间】:2020-10-30 17:54:08
【问题描述】:
Detox 是否支持 Apple TV 模拟器?是的,能否请您提供配置?
我尝试了以下配置,但出现超时问题。
"appleTV": {
"type": "ios.simulator",
"binaryPath": "/Users/sudheerreddy/Library/Developer/Xcode/DerivedData/TenFoot-dovkmoynmpydiwaergfenhdoccps/Build/Products/Debug-appletvsimulator/TenFoot-tvOS.app",
"build": "cd .. && cd ten-foot && cd ios && xcodebuild -workspace TenFoot.xcworkspace -configuration Debug -scheme TenFoot-tvOS -sdk appletvsimulator",
"device": {
"type": "Apple TV"
},
"name": "Apple TV"
下面是输出:
DETOX_START_TIMESTAMP=1603998688111 reportSpecs=true jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' --maxWorkers 1 e2e
detox[20401] INFO: [DetoxServer.js] server listening on localhost:52628...
detox[20401] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:52628
detox[20401] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=d820bc7a-1559-8038-cca0-a840c85e2dc9
detox[20401] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=d820bc7a-1559-8038-cca0-a840c85e2dc9
detox[20401] DEBUG: [exec.js/EXEC_CMD, #0] applesimutils --list --byType "Apple TV"
detox[20401] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byId 9CCF99A4-E856-4426-8566-14E51175ECF4 --maxResults 1
detox[20401] DEBUG: [exec.js/EXEC_CMD, #2] /usr/bin/xcrun simctl uninstall 9CCF99A4-E856-4426-8566-14E51175ECF4 com.*.*-dev
detox[20401] DEBUG: [exec.js/EXEC_TRY, #2] Uninstalling com.*.*-dev...
detox[20401] DEBUG: [exec.js/EXEC_SUCCESS, #2] com.*.*-dev uninstalled
detox[20401] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl install 9CCF99A4-E856-4426-8566-14E51175ECF4 "/Users/sudheerreddy/Library/Developer/Xcode/DerivedData/TenFoot-dovkmoynmpydiwaergfenhdoccps/Build/Products/Debug-appletvsimulator/TenFoot-tvOS.app"
detox[20401] DEBUG: [exec.js/EXEC_TRY, #3] Installing /Users/sudheerreddy/Library/Developer/Xcode/DerivedData/TenFoot-dovkmoynmpydiwaergfenhdoccps/Build/Products/Debug-appletvsimulator/TenFoot-tvOS.app...
detox[20401] DEBUG: [exec.js/EXEC_SUCCESS, #3] /Users/sudheerreddy/Library/Developer/Xcode/DerivedData/TenFoot-dovkmoynmpydiwaergfenhdoccps/Build/Products/Debug-appletvsimulator/TenFoot-tvOS.app installed
detox[20401] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl terminate 9CCF99A4-E856-4426-8566-14E51175ECF4 com.*.*-dev
detox[20401] DEBUG: [exec.js/EXEC_TRY, #4] Terminating com.*.*-dev...
detox[20401] DEBUG: [exec.js/EXEC_SUCCESS, #4] com.*.*-dev terminated
detox[20401] DEBUG: [exec.js/EXEC_CMD, #5] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/sudheerreddy/Library/Detox/ios/5c0aa17e9008ad73710fb6d6131bf050c89aadad/Detox.framework/Detox" /usr/bin/xcrun simctl launch 9CCF99A4-E856-4426-8566-14E51175ECF4 com.*.*-dev --args -detoxServer "ws://localhost:52628" -detoxSessionId "d820bc7a-1559-8038-cca0-a840c85e2dc9" -detoxDisableHierarchyDump "true"
detox[20401] DEBUG: [exec.js/EXEC_TRY, #5] Launching com.*.*-dev...
detox[20401] DEBUG: [exec.js/EXEC_CMD, #6] /usr/bin/xcrun simctl get_app_container 9CCF99A4-E856-4426-8566-14E51175ECF4 com.*.*-dev
detox[20401] INFO: [AppleSimUtils.js] com.*.*-dev launched. To watch simulator logs, run:
/usr/bin/xcrun simctl spawn 9CCF99A4-E856-4426-8566-14E51175ECF4 log stream --level debug --style compact --predicate 'process == "TenFoot-tvOS"'
detox[20401] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=d820bc7a-1559-8038-cca0-a840c85e2dc9)
detox[20401] ERROR: Error: Exceeded timeout of 300000ms while handling jest-circus "setup" event
detox[20401] INFO: Example is assigned to undefined
detox[20401] INFO: Example: should show Home
detox[20401] INFO: Example: should show Home [SKIPPED]
detox[20401] ERROR: DetoxRuntimeError: Aborted detox.init() execution, and now running detox.cleanup()
HINT: Most likely, your test runner is tearing down the suite due to the timeout error
detox[20401] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below:
(id = -1000) isReady: {}
Unresponded network requests might result in timeout errors in Detox tests.
detox[20401] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=d820bc7a-1559-8038-cca0-a840c85e2dc9
detox[20401] DEBUG: [DetoxServer.js/WS_CLOSE] Detox server connections terminated gracefully
detox[20400] ERROR: [cli.js] Error: Command failed: jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' --maxWorkers 1 e2e
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
MacBook-Pro-2:testing sudheerreddy$
【问题讨论】:
标签: detox