macaca官方例子macaca-mobile-browser-sample.test.js报错
-
Macaca Version: 1.1.5
-
Macaca Doctor Logs: mac:macaca-test-sample mac$ macaca doctor
macaca-doctor version: 1.0.21
Node.js checklist:
node env: /usr/local/bin/node node version: v4.5.0
iOS checklist:
Xcode is installed at:
/Applications/Xcode.app/Contents/DeveloperXcode Command Line Tools is ready, version: 2345.1. ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxyAndroid checklist:
JAVA version is
1.8.0_91JAVA_HOME is set to/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/HomeANDROID_HOME is set to/Users/mac/software/android-sdk-macosxPlatforms is set to/Users/mac/software/android-sdk-macosx/platforms/android-24Android tools is set to/Users/mac/software/android-sdk-macosx/tools/androidADB tool is set to/Users/mac/software/android-sdk-macosx/platform-tools/adbInstalled driver list:
android: 1.0.38 chrome: 1.0.2 electron: 1.1.4 ios: 1.0.38
-
Operate System: mac os
-
Programming Language:
mac:macaca-test-sample mac$ macaca run -d macaca-test/macaca-mobile-browser-sample.test.js --verbose
>> request.js:23:12 [master] pid:18165 get remote update info failed.
>> index.js:17:12 [master] pid:18166 webdriver server start with config:
{ port: 3456,
ip: '172.16.250.12',
host: 'mac.local',
loaded_time: '2016-10-17 14:01:06' }
>> middlewares.js:17:10 [master] pid:18166 base middlewares attached
>> router.js:129:10 [master] pid:18166 router set
>> webdriver sdk launched
>>
>>
>> macaca mobile sample
>> responseHandler.js:11:12 [master] pid:18166 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"10.0","deviceName":"iPhone 5s","browserName":"Safari"}}
>> session.js:47:10 [master] pid:18166 Creating session, sessionId: 5ee9b155-f7d2-4ad3-8251-ee95d24ed4ea.
>> macaca-ios.js:189:10 [master] pid:18166 Get available devices [{"name":"iPhone 5","udid":"3ABA49D7-F607-41AD-8812-B05EBF32F8D5","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 5s","udid":"F2608289-32A7-47BD-A147-C00072B17B0C","state":"Booted","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 6","udid":"31E5C21F-1524-4906-B1DF-F860588FA011","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 6 Plus","udid":"7FFD96EC-3B66-45EF-87BF-B917724CF7B2","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 6s","udid":"7826246A-7008-46E9-87A8-32458AA3CD30","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 6s Plus","udid":"CBACB8AD-2152-4DF5-95EA-E517421F8437","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 7","udid":"23AD0DFD-6AD7-47E2-9155-534EFFEB38A3","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone 7 Plus","udid":"07672758-B92E-4D3A-BB13-1805FF840646","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPhone SE","udid":"F256001E-9A08-421D-B21E-FEF6AA2C29C8","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPad Retina","udid":"CA1A58E7-06FF-4379-85BC-9CD629F45D15","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPad Air","udid":"EA117FFC-C817-4A38-BC5B-664367D10E9B","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"iPad Air 2","udid":"B43EEFF8-23B7-400C-9BED-44FED333BF5B","state":"Shutdown","available":true,"runtime":"iOS 10.0"},{"name":"Apple TV 1080p","udid":"E09DC03A-3B01-46F4-A1FF-2063B16FEE0B","state":"Shutdown","available":true,"runtime":"tvOS 10.0"},{"name":"Apple Watch - 38mm","udid":"3CEC4400-711D-44D4-89CC-DA1D35510774","state":"Shutdown","available":true,"runtime":"watchOS 3.0"},{"name":"Apple Watch - 42mm","udid":"E90ED5BE-B3CD-46A9-A8FF-EFD018FD5825","state":"Shutdown","available":true,"runtime":"watchOS 3.0"},{"name":"Apple Watch Series 2 - 38mm","udid":"666A3536-23A7-4002-8300-F9D3D9D8F48B","state":"Shutdown","available":true,"runtime":"watchOS 3.0"},{"name":"Apple Watch Series 2 - 42mm","udid":"134BF95C-0513-4A62-91AB-76A23ECA07DC","state":"Shutdown","available":true,"runtime":"watchOS 3.0"}]
>> xctest-client.js:43:14 [master] pid:18166 project path: /usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
>> macaca-ios.js:133:10 [master] pid:18166 {
"bundleId": "com.apple.mobilesafari",
"platformName": "iOS",
"platformVersion": "10.0",
"browserName": "Safari"
}
>> xctest-client.js:183:12 [master] pid:18166 xcode version: 8.0
>> WebDriverAgent version: 1.0.28
>> xctest-client.js:156:14 [master] pid:18166 2016-10-17 14:01:11.379 xcodebuild[18176:201979] [MT] IDETestOperationsObserverDebug: (2E072753-B2BE-49B9-8363-558B4CEA8FB5) Beginning test session WebDriverAgentRunner-2E072753-B2BE-49B9-8363-558B4CEA8FB5 at 2016-10-17 14:01:11.378 with Xcode 8A218a on target <DVTiPhoneSimulator: 0x7ff8e4116640> {
SimDevice: SimDevice : iPhone 5s (F2608289-32A7-47BD-A147-C00072B17B0C) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-5s } runtime={ SimRuntime : 10.0 (14A345) - com.apple.CoreSimulator.SimRuntime.iOS-10-0 }
} (10.0 (14A345))
>> xctest-client.js:156:14 [master] pid:18166 2016-10-17 14:01:11.379 xcodebuild[18176:201995] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/mac/Library/Developer/Xcode/DerivedData/WebDriverAgent-drmzhetqodgefhaqpyureuezairh/Logs/Test/1801E425-D87A-4246-8649-315E5B6901AB/Session-WebDriverAgentRunner-2016-10-17_140111-0bytUa.log
>> proxy.js:54:14 [master] pid:18166 Proxy: /session:POST to http://172.16.250.12:8100/session:POST with body: {"desiredCapabilities":{"bundleId":"com.apple.mobilesafari"}}
>> responseHandler.js:54:12 [master] pid:18166 Send Error Respone to Client: Error: Command failed: /bin/sh -c xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/"
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.apple.mobilesafari" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
>> responseHandler.js:60:14 [master] pid:18166 Error: Command failed: /bin/sh -c xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/"
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.apple.mobilesafari" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:829:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Error: Command failed: /bin/sh -c xcrun simctl openurl "F2608289-32A7-47BD-A147-C00072B17B0C" "http://macacajs.github.io/macaca/"
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.apple.mobilesafari" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.apple.mobilesafari" is installing or uninstalling, and cannot be launched").
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:829:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
>>
>> 1) "before all" hook
>> responseHandler.js:11:12 [master] pid:18166 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
>> responseHandler.js:23:14 [master] pid:18166 Send HTTP Respone to Client: 405 Method Not Allowed
>>
>> 2) "after all" hook
>>
>>
>> 0 passing (16s)
>> 2 failing
>>
>> 1) macaca mobile sample "before all" hook:
Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"10.0","deviceName":"iPhone 5s","browserName":"Safari"})] The environment you requested was unavailable.
at node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/webdriver.js:134:15
at Request._callback (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
at endReadableNT (_stream_readable.js:921:12)
>> 2) macaca mobile sample "after all" hook:
Error: [quit()] Unexpected data in simpleCallback.
at exports.newError (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/utils.js:139:13)
at null.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/callbacks.js:42:12)
at cb (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/webdriver.js:165:22)
at node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/webdriver.js:179:5
at Request._callback (node_modules/webdriver-client/node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
at Request.self.callback (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:368:22)
at Request.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
at IncomingMessage.<anonymous> (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
at endReadableNT (_stream_readable.js:921:12)
>> Test completed!
运行官方例子macaca-mobile-browser-sample.test.js报错
https://testerhome.com/topics/6314