• 我用的 mac 电脑,然后把相应的日志生成路径改了之后,运行你的 demo,发现在 MacacaServer.py 文件中报错:

    wait macaca server all ready...
    wait macaca server all ready...
    macaca server all ready
    Traceback (most recent call last):
    File "run_all_cases.py", line 13, in
    Drivers().run(cases)
    File "../Public/Drivers.py", line 78, in run
    macaca_server.start_server()
    File "../Public/MacacaServer.py", line 47, in start_server
    with open(file, 'r') as f:
    IOError: [Errno 2] No such file or directory: '/Users/bita/Downloads/macacatest-master/TestReport/2017-07-11_11_47_53-4LWCAY9T99999999/macaca_server_port_3456.log'

    实际上我看到生成的路径/Users/bita/Downloads/macacatest-master/TestReport/2017-07-11_11_47_53-4LWCAY9T99999999/直到这个目录都能正常生成,但是 macaca_server_port_3456.log 这个文件在相应的路径下没有,我是不是还有哪个地方没改对?

    另外,我在 macaca server --verbose 中看到的数据

    responseHandler.js:11:12 [master] pid:2002 Recieve HTTP Request from Client[2017-07-11 11:48:08]: method: GET url: /wd/hub/status, jsonBody: {}
    responseHandler.js:47:14 [master] pid:2002 Send HTTP Respone to Client[2017-07-11 11:48:08]: {"sessionId":"","status":0,"value":"{\"build\":{},\"os\":{\"arch\":\"x64\",\"name\":\"darwin\",\"version\":\"\"}}"}

    jsonBody 这块的值都为空,正常我们运行单个用例时 Recieve HTTP Request from Client,不都是 Post 方法吗?但是你这个运行的是 get 方法,我不确认是不是 get 方法的原因导致 jsonbody 值取不到?

  • 为什么没有 Python 的报告生成文档呢,唉....

  • #12 楼 @mercynoo 那你把环境什么的删了,重新部属一次,估计能行。反正 ios9 上我怎么都弄不好,昨天把环境什么的全删了,重新部署了一次,现在换 ios10 的手机就好了。不过跑 case 跑结束时,也会出 socket hang up,但是之前写的 case 能跑了。

  • #8 楼 @mercynoo 解决了..是这个不支持 ios9 的手机,把手机升级 ios10 就行了。😭

  • #8 楼 @mercynoo 没解决,后来把 macaca 相关的全部删了,然后重新部署也没用,还是报那个错...之前写的 case 都跑不了了。

  • 我按照文档上 update 了,但是会报错
    Error: >> proxy.js:58:18 [master] pid:29343 xctest client proxy error with: Error: socket hang up

    更新完成后,我运行 macaca server --verbose 后去运行之前写的脚本,然后看到中间的 Log 有关于 WDA 的报错

    xctest-client.js:163:14 [master] pid:29035 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
    xctest-client.js:162:14 [master] pid:29035 2016-11-08 17:08:29.011 xcodebuild[29049:597969] Error Domain=com.apple.dtdevicekit Code=-402652994 "App installation failed" UserInfo={NSLocalizedFailureReason=This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed., com.apple.dtdevicekit.stacktrace=(
    0 DTDeviceKitBase 0x00000001171f237b DTDKCreateNSError + 113
    1 DTDeviceKitBase 0x00000001171f2ab9 DTDK_AMDErrorToNSError + 791
    2 DTDeviceKitBase 0x00000001172329df __90-[DTDKRemoteDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 158
    3 DVTFoundation 0x000000010ffae9c9 DVTInvokeWithStrongOwnership + 75
    4 DTDeviceKitBase 0x0000000117232725 -[DTDKRemoteDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1181
    5 IDEiOSSupportCore 0x0000000117128f2f __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.336 + 4597
    6 DVTFoundation 0x00000001100d2ce7 __DVTDispatchAsync_block_invoke + 827
    7 libdispatch.dylib 0x00007fff96ba6f5f _dispatch_call_block_and_release + 12
    8 libdispatch.dylib 0x00007fff96b9e128 _dispatch_client_callout + 8
    9 libdispatch.dylib 0x00007fff96bb4b97 _dispatch_queue_serial_drain + 896
    10 libdispatch.dylib 0x00007fff96ba6d41 _dispatch_queue_invoke + 1046
    11 libdispatch.dylib 0x00007fff96b9fee0 _dispatch_root_queue_drain + 476
    12 libdispatch.dylib 0x00007fff96b9fcb7 _dispatch_worker_thread3 + 99
    13 libsystem_pthread.dylib 0x00007fff96deb736 _pthread_wqthread + 1299
    14 libsystem_pthread.dylib 0x00007fff96deb211 start_wqthread + 13
    ), NSLocalizedRecoverySuggestion=This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed., NSLocalizedDescription=App installation failed}
    xctest-client.js:163:14 [master] pid:29035 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
    xctest-client.js:162:14 [master] pid:29035 2016-11-08 17:08:29.011 xcodebuild[29049:597969] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}

    xctest-client.js:163:14 [master] pid:29035 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
    xctest-client.js:162:14 [master] pid:29035
    Testing failed:
    Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
    ** TEST FAILED **

    然后我把真机上的 WDA 手动删了,这时候重装运行 macaca server --verbose,再去运行脚本时,依然报错,但是错误就变成了 socket hang up

    proxy.js:58:18 [master] pid:29035 xctest client proxy error with: Error: socket hang up
    /usr/local/lib/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:169
    throw new Error(res);
    ^

    Error: >> proxy.js:58:18 [master] pid:29035 xctest client proxy error with: Error: socket hang up
    at Logger.error (/usr/local/lib/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:169:9)
    at Request.request as _callback
    at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:199:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:821:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketOnEnd (_http_client.js:346:9)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

  • 我装完了后运行不起来,老是闪退...logo 上也没发现有用的错误。

  • Macaca iOS 真机测试 at 2016年10月13日

    我 build 的时候报错了,我看了一下,npm i macaca-ios -g 里面确实没有 WebDriverAgentTests。 我能不能把 github 上https://github.com/facebook/WebDriverAgentcopy 下面直接放进去?的那个

    error: could not read data from '/usr/local/lib/node_modules/.macaca-ios_npminstall/node_modules/.1.0.28@webdriveragent/WebDriverAgent/WebDriverAgentTests/IntegrationApp/Info.plist': The file “Info.plist” couldn’t be opened because there is no such file.

    此问题已解决。

  • #33 楼 @Lihuazhang 那是说现在在 xcode8 和 ios10 上,appium1.5.3 已经不能用了吗?没有任何的解决方案了吗?我也是跑 case 的时候会报错 “[Xcode] Could not find Automation.tracetemplate in any of...”

  • #153 楼 @Lihuazhang
    出现的是这个提示,谢谢,我先自己研究下这个问题怎么解决。谢谢给出查找问题的思路。