Code Monkey home page Code Monkey logo

macaca's Introduction

Macaca


查看源代码可以到 #源码说明


Macaca

English Edition

Macaca 是一套面向用户端软件的测试解决方案,提供了自动化驱动,环境配套,周边工具,集成方案,旨在解决终端上的测试、自动化、性能等方面的问题。

Macaca 是 Monkey 的一种,含义引自(Monkey Test),取灵动、敏捷之意。

多端支持

随着移动时代和智能终端时代的到来,为给用户带来更优质、完整的体验,我们的产品已经遍布各终端,同时单一的运行时架构往往不能满足工程的需要。Macaca 支持主流的移动技术平台 iOS,Android,以及两大平台的混合运行时 Webview,也支持以往的桌面端浏览器。

Macaca 的底层设计便于端的横向扩展,会根据开发平台提供的测试驱动及时调整集成方案。

系统架构

社区生态

标准化

Macaca 提供了标准化的驱动层,消除了各技术平台测试技术栈的差异。用户只需要遵从 W3C webdriver 标准即可多端无忧,理解成本降低。

多语言栈支持

Macaca 提供 Node.jsJavaPython 三大主流的语言栈,方便工程师和所在团队选择合适的开发语言。

由于 Macaca 的工具链基于 Node.js,这个因素使得 Node.js 技术栈提供的支持和周边工具会相对多。Java 与 Python 有大量用实践,社区共享与贡献较多,也是很好的选择。

集成和融合

Macaca 提供了多种持续集成方案和功能模块,方便集成到研发和测试的各个环节。

源代码

模块源代码位于macacajs.

因为模块众多,推荐从官网开始阅读。

帮助支持

License

The MIT License (MIT)

macaca's People

Contributors

brucejcw avatar gitter-badger avatar liangjun-jiang avatar liangjunjiang avatar paradite avatar snapre avatar xudafeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

macaca's Issues

请求提供一个Android 端 demo~

非常想了解并使用下macaca ,麻烦提供个Android端的使用demo ,谢谢~

同时想请教下,如何测试Android中 网页的加载速度,有么有准确的方法?

安装client的时候出现权限不足

➜ ~ npm -v
2.14.4
➜ ~ npm i macaca-client -g
npm WARN engine [email protected]: wanted: {"node":">=4.2.1"} (current: {"node":"4.1.1","npm":"2.14.4"})
npm ERR! tar.unpack untar error /Users/auto1/.npm/macaca-client/1.0.11/package.tgz
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "macaca-client" "-g"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! path /usr/local/lib/node_modules/macaca-client
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/macaca-client'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/macaca-client']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/macaca-client',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/macaca-client',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:82:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/auto1/npm-debug.log

macaca-test-sample PC执行macaca run无反应

Macaca Version:1.0.24

Macaca Doctor: node version:4.4.4

Platform:Windows, 32-bit.

macaca 安装成功后执行macaca-test-sample的PC段 make test-pc后显示“macaca不是内部或外部命令”是怎么回事啊?
如果直接执行“macaca run --verbose -d ./macaca-test/macaca-desktop-sample.test.js” 则根本没有反应。
image

Linux 系统运行 chrome 兼容问题

  1. macaca desktop sample "before all" hook:
    Error: [init({"autoAcceptAlerts":true,"browserName":"electron","platformName":"desktop"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  2. macaca desktop 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

PC端自动化无法解决两个frame嵌套后正确找到元素的问题

  • Macaca Version:
    1.0.24
  • Macaca Doctor:
    正常
  • Platform:
    Mac
        <div class="welcome">
            <form action="#" onsubmit="return sch()">
            <select name="tp" id="tp">
                <option value="1">用户名</option>
                <option value="2">姓名</option>
                <option value="3">手机号</option>
                <option value="4">手机号2</option>
                <option value="5">身份证号码</option>
            </select>
            <input name="val" id="val" onclick="return val_onclick()" />
            </form>
这个页面的元素分别中两个frame中,我查看了api的部分,没有任何函数支持这种进入frame获取元素的,请问有什么具体的解决办法吗?谢谢!

远程设备调用问题

场景:测试用例和环境部署到远程服务器,服务器上统一管理和维护脚本。测试人员会在自己的PC上连接设备,设备和环境分别属于两个环境。Macaca是否能支持,远程调用用例跑在测试人员自己的机器上。(有点像设备租用)。

sudo权限问题导致如图错误

执行下面的命令,以后就不需要sudo也可以运行命令行了

sudo chown -R $USER /usr/local

具体步骤:
1.通过npm下载github上的macaca-test-sample样例
2.进入到macaca-test-sample目录执行命令:npm install
3.运行命令:make test-ios或者make test-pc
错误,如图(图片显示不出来。。。):

platform=ios macaca run --server --verbose -d ./macaca-test/macaca-mobile-sample.test.js

index.js:62:12 [master] pid:91126 webdriver server start with config:
{ port: 3456,
ip: '10.10.1.20',
host: 'holysordeiMac.local',
loaded_time: '2016-03-31 11:03:05' }
middlewares.js:31:10 [master] pid:91126 base middlewares attached
router.js:101:10 [master] pid:91126 router set
webdriver sdk launched
events.js:154
throw er; // Unhandled 'error' event
^

Error: spawn /usr/local/lib/node_modules/.macaca-client_npminstall/mocha/2.2.4/.bin/mocha ENOENT
at exports._errnoException (util.js:890:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (node.js:383:13)
at process._tickCallback (node.js:407:11)

Uploading err.png…

make test-android error

  • Macaca Version:
    1.0.24

  • Macaca Doctor:
    Node.js checklist:
    node env: /usr/local/bin/node
    node version: v4.4.4

    Android checklist:
    JAVA version is 1.8.0_91
    JAVA_HOME is set to /usr/java/jdk1.8.0_91
    ANDROID_HOME is set to /home/zsmarter/.linuxbrew/opt/android-sdk

  • Platform:
    centos 6 64bit

  • command
    macaca test-android
  • npm-debug.log
    npm-debug.zip
  • error info

`npm WARN deprecated [email protected]: use cross-spawn or cross-spawn-async instead.
/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-android/node_modules/unlock-apk/script/build.js:28
throw e;
^

Error: build failed
at ChildProcess. (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-android/node_modules/unlock-apk/node_modules/ant-build/lib/ant-build.js:98:16)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
npm ERR! Linux 2.6.32-358.el6.x86_64
npm ERR! argv "/usr/local/node-v4.4.4-linux-x64/bin/node" "/usr/local/bin/npm" "install" "macaca-android" "--registry=https://registry.npmjs.org/"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node ./script/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./script/build.js'.
npm ERR! This is most likely a problem with the unlock-apk package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./script/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs unlock-apk
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls unlock-apk
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/npm-debug.log

npm install exited with code 1 and signal null
install macaca-android failed with Error: npm WARN deprecated [email protected]: use cross-spawn or cross-spawn-async instead.
/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-android/node_modules/unlock-apk/script/build.js:28
throw e;
^

Error: build failed
at ChildProcess. (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-android/node_modules/unlock-apk/node_modules/ant-build/lib/ant-build.js:98:16)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
npm ERR! Linux 2.6.32-358.el6.x86_64
npm ERR! argv "/usr/local/node-v4.4.4-linux-x64/bin/node" "/usr/local/bin/npm" "install" "macaca-android" "--registry=https://registry.npmjs.org/"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node ./script/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./script/build.js'.
npm ERR! This is most likely a problem with the unlock-apk package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./script/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs unlock-apk
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls unlock-apk
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/npm-debug.log

responseHandler.js:63:12 [master] pid:17860 Send Error Respone to Client: TypeError: Android is not a function
responseHandler.js:69:14 [master] pid:17860 TypeError: Android is not a function
at WebdriverServer.detectDevice (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:62:14)
at WebdriverServer.start (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:40:22)
at next (native)
at onFulfilled (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Object.co (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
at next (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:69:7)
at /usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5

TypeError: Android is not a function
at WebdriverServer.detectDevice (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:62:14)
at WebdriverServer.start (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:40:22)
at next (native)
at onFulfilled (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Object.co (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
at next (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:69:7)
at /usr/local/node-v4.4.4-linux-x64/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5

1) "before all" hook

responseHandler.js:24:12 [master] pid:17860 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:17860 Send HTTP Respone to Client: 405 Method Not Allowed

2) "after all" hook

0 passing (1m)

2 failing

  1. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"Android","app":"/home/zsmarter/works/macaca-test-sample/app/android-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"Android","app":"app/android-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913: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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)
    `

try the Android demo under mac pro and show this:

BUILD FAILED
/Users/yanyan/Install/android-sdk-macosx/tools/ant/build.xml:538: For 'MNC' SDK Preview, attribute minSdkVersion in AndroidManifest.xml must be 'MNC' (current: )

Total time: 0 seconds

install macaca-android success
install macaca-android failed with Error: Cannot find module 'macaca-android'

responseHandler.js:56:12 [master] pid:8134 Send Error Respone to Client TypeError: Android is not a function
responseHandler.js:62:14 [master] pid:8134 TypeError: Android is not a function
at WebdriverServer.detectDevice (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/index.js:56:14)
at WebdriverServer.start (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/index.js:38:22)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:69:7)
at /usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
responseHandler.js:81:14 [master] pid:8134 Unexcepted error TypeError

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-client/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/responseHandler.js:82:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:412:9)

  1. "before all" hook
    responseHandler.js:24:12 [master] pid:8134 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
    responseHandler.js:48:14 [master] pid:8134 Send HTTP Respone to Client: {"sessionId":"","status":0}

0 passing (3s)
1 failing

  1. macaca mobile sample "before all" hook:
    [init({"platformName":"Android","app":"/Users//work/testfor58/tools/macaca/testDemo/samplemacaca/app/android-app-bootstrap.zip","udid":"HEF68H794DJ7EEUC"})] The environment you requested was unavailable.
    Error: [init({"platformName":"Android","app":"app/android-app-bootstrap.zip","udid":"HEF68H794DJ7EEUC"})] The environment you requested was unavailable.
    at endReadableNT (_stream_readable.js:913:12)

Test completed!

macaca doctor is good for IOS and Android env

And the Android udid refer to what ? adb devices -- device id?

make test-pc, the browser is not shown

  • Macaca Version:

    1.0.24

  • Macaca Doctor:

    Node.js checklist:
    node env: C:\Program Files\nodejs\node.exe
    node version: v5.2.0

    Android checklist:

  • Platform:

    Windows 7 64bit

  • Q Details:

    these are what I have done:
    1、clone macaca-test-sample
    2、npm install
    3、download ’make‘ and install(to solve ''make' is not recognized as an internal or external command' problem)
    4、cd macaca-test-sample
    5、export CHROMEDRIVER_CDNURL=http://npm.taobao.org/mirrors/chromedriver
    6、export ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron
    7、make test-pc

    then show:
    image

    Q: the browser is not opened like your test-PC demo shows

    *If there are some errors in my operations? Hope for your help, thx~ *

Android SDK 版本引起出现异常信息

18-22 其余sdk目录删除,构建即可成功

1、系统:
LINUX 3.13.0-83-generic #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
2、macac 依赖信息:
* Node.js checklist:*
node env: /usr/local/bin/node
node version: v4.4.0
* Android checklist:*
JAVA version is 1.7.0_67
JAVA_HOME is set to /home/java/jdk1.7.0_67
ANDROID_HOME is set to /home/XX/Android/Sdk
3、执行macac test-android 出现如下错误信息:
platform=android macaca run --server --verbose -d ./macaca-test/macaca-mobile-sample.test.js

index.js:62:12 [master] pid:11332 webdriver server start with config:
{ port: 3456,
ip: '192.168.5.40',
host: 'xxx',
loaded_time: '2016-03-29 20:45:17' }
middlewares.js:31:10 [master] pid:11332 base middlewares attached
router.js:101:10 [master] pid:11332 router set
webdriver sdk launched
events.js:141
throw er; // Unhandled 'error' event
^

Error: spawn /usr/local/lib/node_modules/.macaca-client_npminstall/mocha/2.2.4/.bin/mocha ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:438:9)
at process._tickCallback (node.js:352:17)

请给予分析和指导

make test-pc problem

  • Macaca Version:
    1.0.24

  • Macaca Doctor:
    Node.js checklist:

    node env: /usr/local/bin/node
    node version: v5.5.0

    iOS checklist:

    Xcode is installed at: /Applications/Xcode.app/Contents/Developer
    Xcode Command Line Tools is ready, version: 2343.
    ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

    Android checklist:

    JAVA version is 1.8.0_31
    JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
    ANDROID_HOME is set to /Users/edison/Library/Android/sdk

  • Platform:
    OS X E Capitan 10.11.4

macaca-electron is installing for the first time with args: ["install","macaca-electron","--registry=https://registry.npmjs.org/"]

| loading...

[email protected] postinstall /usr/local/lib/node_modules/macaca-cli/node_modules/node-installer/node_modules/electron-prebuilt
node install.js

Downloading electron-v0.37.8-darwin-x64.zip
Error: read ECONNRESET
[email protected] /usr/local/lib/node_modules/macaca-cli/node_modules/node-installer
├── [email protected] extraneous
├── [email protected] extraneous
├── [email protected] extraneous
├── [email protected] extraneous
└── [email protected] extraneous

/usr/local/lib/node_modules/macaca-cli/node_modules/node-installer/node_modules/electron-prebuilt/install.js:22
throw err
^

Error: read ECONNRESET
at exports._errnoException (util.js:856:11)
at TLSWrap.onread (net.js:544:26)
npm WARN install:[email protected] [email protected] postinstall: node install.js
npm WARN install:[email protected] Exit status 1

install macaca-electron failed with Error: Cannot find module 'macaca-electron'

responseHandler.js:63:12 [master] pid:14909 Send Error Respone to Client: TypeError: Electron is not a function
responseHandler.js:69:14 [master] pid:14909 TypeError: Electron is not a function
at WebdriverServer.detectDevice (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:80:14)
at WebdriverServer.start (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:40:22)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:69:7)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5

TypeError: Electron is not a function
at WebdriverServer.detectDevice (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:80:14)
at WebdriverServer.start (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:40:22)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:69:7)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5

关于元素判断的回调问题

登陆App正常工作的case:

return driver
          .elementByName('我  的')
          .tap()
          .elementByName('登录/注册')
          .click()
          .sleep(1000)
          .waitForElementByXPath('//UIATextField[1]')
          .sendKeys('123456')
          .waitForElementByXPath('//UIASecureTextField[1]')
          .sendKeys('123')
          .sleep(1000)
          .sendKeys('\n')
          .sleep(5000)
          .takeScreenshot();

如果需要对是否登陆做判断,根据是否有登陆按钮:

return driver
          .elementByName('我  的')
          .tap()
          .elementByNameOrNull('登录/注册',function(err,el){
            if(el){
               el.click()
               .waitForElementByXPath('//UIATextField[1]')
               .sendKeys('123456')
               .waitForElementByXPath('//UIASecureTextField[1]')
               .sendKeys('123')
               .sleep(1000)
               .sendKeys('\n')
               .sleep(5000)
               .takeScreenshot();
            }else{
               driver
               .elementByName('首  页')
               .tap();
            }
          })

当case运行到el.click后,后面的填写用户名不会再继续执行下去,测试结束。不知道是否是我使用的问题?

What happend for Android?

If run:

macaca doctor

Then output:

JAVA_HOME is not set

If run:

echo $JAVA_HOME

Then output:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

So? What happend?

macaca output report error

error info:

5 passing (1m)
2 failing

  1. macaca test sample #4 should go into webview:
    Error: [windowHandles()] Not JSON response
    at endReadableNT (_stream_readable.js:906:12)

  2. macaca test sample #6 should works with web:
    Error: [windowHandles()] Not JSON response
    at endReadableNT (_stream_readable.js:906:12)
    Error happened when writing to output html.

command usage: macaca run -o /Users/yb.wang/Test/macaca --server --verbose

Android Run Sample Error

platform=android macaca run --server --verbose



index.js:62:12 [master] pid:29843 webdriver server start with config:
{ port: 3456,
ip: '10.32.24.19',
host: 'dst63460.cn1.global.ctrip.com',
loaded_time: '2016-04-01 16:07:04' }
middlewares.js:31:10 [master] pid:29843 base middlewares attached
router.js:101:10 [master] pid:29843 router set
webdriver sdk launched

macaca test sample
responseHandler.js:24:12 [master] pid:29843 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"android","platformVersion":"9.2","deviceName":"iPhone 5s","app":"/Users/yb.wang/Work/Android/OpenSourceCode/macaca-test-sample/app/android-app-bootstrap.zip","udid":"5afcd2be"}}
session.js:22:10 [master] pid:29843 Creating session, sessionId: 4b24ff8f-2d60-44ea-a753-17af7026d7d8.
helper.js:202:12 [master] pid:29843 Unzipping local app form /Users/yb.wang/Work/Android/OpenSourceCode/macaca-test-sample/app/android-app-bootstrap.zip
responseHandler.js:56:12 [master] pid:29843 Send Error Respone to Client Error: Command failed: /bin/sh -c /Users/yb.wang/Android_SDK/sdk/platform-tools/adb -s 5afcd2be push /usr/local/lib/node_modules/macaca-client/node_modules/node-installer/node_modules/uiautomator-client/bin/uiautomator-bootstrap.jar /data/local/tmp
cannot stat '/usr/local/lib/node_modules/macaca-client/node_modules/node-installer/node_modules/uiautomator-client/bin/uiautomator-bootstrap.jar': No such file or directory

responseHandler.js:62:14 [master] pid:29843 Error: Command failed: /bin/sh -c /Users/yb.wang/Android_SDK/sdk/platform-tools/adb -s 5afcd2be push /usr/local/lib/node_modules/macaca-client/node_modules/node-installer/node_modules/uiautomator-client/bin/uiautomator-bootstrap.jar /data/local/tmp
cannot stat '/usr/local/lib/node_modules/macaca-client/node_modules/node-installer/node_modules/uiautomator-client/bin/uiautomator-bootstrap.jar': No such file or directory

at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:821:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:469:12)

responseHandler.js:81:14 [master] pid:29843 Unexcepted error Error

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-client/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/responseHandler.js:82:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:81:24)

真机断点调试error



`>> index.js:62:12 [master] pid:27215 webdriver server start with config:
{ port: 3456,
verbose: true,
always: true,
ip: '',
host: ,
loaded_time: '2016-04-12 10:00:08' }

middlewares.js:31:10 [master] pid:27215 base middlewares attached
router.js:101:10 [master] pid:27215 router set
webdriver sdk launched
responseHandler.js:24:12 [master] pid:27215 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"ios","platformVersion":"8.3","deviceName":"iPhone 5s","udid":"18e4f6e47b28db5adad04c6feab0d3a6716a6ddc","bundleId":"com.example.test"}}
session.js:22:10 [master] pid:27215 Creating session, sessionId: 8b58a0ce-61c5-420d-819a-30fd305ed549.
responseHandler.js:56:12 [master] pid:27215 Send Error Respone to Client TypeError: Cannot read property 'substring' of undefined
responseHandler.js:62:14 [master] pid:27215 TypeError: Cannot read property 'substring' of undefined
at Function..sleep..retry..waitForCondition..exec..spawn.child.on..configApp (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/common/helper.js:174:10)
at WebdriverServer.start (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/index.js:39:16)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:69:7)
at /usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:69:7)
at /usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:50:10)
responseHandler.js:81:14 [master] pid:27215 Unexcepted error TypeError

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/responseHandler.js:82:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:369:9)`

文档有点少啊

丰富下分档吧。
比如安装环境要求,一个可以跑起来的教程。还有实现原理

Macaca【建议】and【需求】

  1. Macaca 关于Keyboard使用过程的KeyCode的支持,例如完成Done,delete按钮等
  2. Macaca 有强大的Assert,能否提供相应的sample或者document。断言在case中是非常关键的
  3. Macaca 创建模块化的sample,比如公共组件可以模块化被调用测试。

重新安装cli后运行 macaca run 报错

  • Macaca Version:
    1.0.24

  • Macaca Doctor:
    Node.js checklist:

    node env: /usr/local/bin/node
    node version: v5.5.0

    iOS checklist:

    Xcode is installed at: /Applications/Xcode.app/Contents/Developer
    Xcode Command Line Tools is ready, version: 2343.
    ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

    Android checklist:

    JAVA version is 1.8.0_31
    JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
    ANDROID_HOME is set to /Users/edison/Library/Android/sdk

  • Platform:
    MAC

    { '0':
    { [Error: spawn /usr/local/lib/node_modules/.macaca-cli_npminstall/mocha/2.4.5/.bin/mocha ENOENT]
    code: 'ENOENT',
    errno: 'ENOENT',
    syscall: 'spawn /usr/local/lib/node_modules/.macaca-cli_npminstall/mocha/2.4.5/.bin/mocha',
    path: '/usr/local/lib/node_modules/.macaca-cli_npminstall/mocha/2.4.5/.bin/mocha',
    spawnargs: [ '--colors', 'macaca-test', '--require', 'should' ] } } true 'digest'
    TypeError: res.match is not a function
    at Logger._format (/usr/local/lib/node_modules/.macaca-cli_npminstall/xlogger/1.0.2/xlogger/lib/xlogger.js:86:17)
    at Logger.warn (/usr/local/lib/node_modules/.macaca-cli_npminstall/xlogger/1.0.2/xlogger/lib/xlogger.js:149:18)
    at Runner. (/usr/local/lib/node_modules/.macaca-cli_npminstall/macaca-cli/1.0.24/macaca-cli/bin/macaca-cli-run:89:10)
    at emitOne (events.js:90:13)
    at Runner.emit (events.js:182:7)
    at ChildProcess. (/usr/local/lib/node_modules/.macaca-cli_npminstall/macaca-cli/1.0.24/macaca-cli/lib/run/index.js:72:10)
    at emitOne (events.js:90:13)
    at ChildProcess.emit (events.js:182:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    at onErrorNT (internal/child_process.js:344:16)

PC端驱动支持多window切换

  • Macaca Version:
    1.0.24

  • Macaca Doctor:
    Node.js checklist:

    node env: /usr/local/bin/node
    node version: v5.5.0

    iOS checklist:

    Xcode is installed at: /Applications/Xcode.app/Contents/Developer
    Xcode Command Line Tools is ready, version: 2343.
    ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

    Android checklist:

    JAVA version is 1.8.0_31
    JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
    ANDROID_HOME is set to /Users/edison/Library/Android/sdk

  • Platform:
    OS X E Capitan 10.11.4

macaca-electron is installing for the first time with args: ["install","macaca-electron","--registry=https://registry.npmjs.org/"]

| loading...

[email protected] postinstall /usr/local/lib/node_modules/macaca-cli/node_modules/node-installer/node_modules/electron-prebuilt
node install.js

Downloading electron-v0.37.8-darwin-x64.zip
Error: read ECONNRESET
[email protected] /usr/local/lib/node_modules/macaca-cli/node_modules/node-installer
├── [email protected] extraneous
├── [email protected] extraneous
├── [email protected] extraneous
├── [email protected] extraneous
└── [email protected] extraneous

/usr/local/lib/node_modules/macaca-cli/node_modules/node-installer/node_modules/electron-prebuilt/install.js:22
throw err
^

Error: read ECONNRESET
at exports._errnoException (util.js:856:11)
at TLSWrap.onread (net.js:544:26)
npm WARN install:[email protected] [email protected] postinstall: node install.js
npm WARN install:[email protected] Exit status 1

install macaca-electron failed with Error: Cannot find module 'macaca-electron'

responseHandler.js:63:12 [master] pid:14909 Send Error Respone to Client: TypeError: Electron is not a function
responseHandler.js:69:14 [master] pid:14909 TypeError: Electron is not a function
at WebdriverServer.detectDevice (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:80:14)
at WebdriverServer.start (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:40:22)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:69:7)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5

TypeError: Electron is not a function
at WebdriverServer.detectDevice (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:80:14)
at WebdriverServer.start (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/index.js:40:22)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:69:7)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5

重新安装cli后运行 macaca run 报错

  • Macaca Version:
    1.0.24

  • Macaca Doctor:
    Node.js checklist:

    node env: /usr/local/bin/node
    node version: v5.5.0

    iOS checklist:

    Xcode is installed at: /Applications/Xcode.app/Contents/Developer
    Xcode Command Line Tools is ready, version: 2343.
    ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

    Android checklist:

    JAVA version is 1.8.0_31
    JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
    ANDROID_HOME is set to /Users/edison/Library/Android/sdk

  • Platform:
    MAC

    { '0':
    { [Error: spawn /usr/local/lib/node_modules/.macaca-cli_npminstall/mocha/2.4.5/.bin/mocha ENOENT]
    code: 'ENOENT',
    errno: 'ENOENT',
    syscall: 'spawn /usr/local/lib/node_modules/.macaca-cli_npminstall/mocha/2.4.5/.bin/mocha',
    path: '/usr/local/lib/node_modules/.macaca-cli_npminstall/mocha/2.4.5/.bin/mocha',
    spawnargs: [ '--colors', 'macaca-test', '--require', 'should' ] } } true 'digest'
    TypeError: res.match is not a function
    at Logger._format (/usr/local/lib/node_modules/.macaca-cli_npminstall/xlogger/1.0.2/xlogger/lib/xlogger.js:86:17)
    at Logger.warn (/usr/local/lib/node_modules/.macaca-cli_npminstall/xlogger/1.0.2/xlogger/lib/xlogger.js:149:18)
    at Runner. (/usr/local/lib/node_modules/.macaca-cli_npminstall/macaca-cli/1.0.24/macaca-cli/bin/macaca-cli-run:89:10)
    at emitOne (events.js:90:13)
    at Runner.emit (events.js:182:7)
    at ChildProcess. (/usr/local/lib/node_modules/.macaca-cli_npminstall/macaca-cli/1.0.24/macaca-cli/lib/run/index.js:72:10)
    at emitOne (events.js:90:13)
    at ChildProcess.emit (events.js:182:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    at onErrorNT (internal/child_process.js:344:16)

需要的几点帮助

1.代码过程中控件元素命名的规范化指导建议
2.测试用例脚本中除了tap,click外的操作是否有帮助,比如滑屏等。

IOS 无序Alert弹窗Case

场景:启动后会有3个弹窗,顺序是无序的。
脚本:

it('#2 should click alert_view',function(){
    return driver
          .elementByNameOrNull('Allow',
            function(err,el){
              if(el){
                el.click();
              }else{
               driver.elementByNameOrNull('知道了',
                function(err,el){
                  if(el){
                    el.click();
                  }else{
                    driver.elementByNameOrNull('OK',
                      function(err,el){
                        if(el){
                          el.click();
                        }
                      })
                  }
                })
              }
            })
          .sleep(1000)
          .elementByNameOrNull('知道了',
            function(err,el){
              if(el){
                el.click();
              }else{
               driver.elementByNameOrNull('Allow',
                function(err,el){
                  if(el){
                    el.click();
                  }else{
                    driver.elementByNameOrNull('OK',
                      function(err,el){
                        if(el){
                          el.click();
                        }
                      })
                  }
                })
              }
            })
          .sleep(1000)
          .elementByNameOrNull('OK',
            function(err,el){
              if(el){
                el.click();
              }else{
               driver.elementByNameOrNull('Allow',
                function(err,el){
                  if(el){
                    el.click();
                  }else{
                    driver.elementByNameOrNull('知道了',
                      function(err,el){
                        if(el){
                          el.click();
                        }
                      })
                  }
                })
              }
            })
          .sleep(1000);
  });

这个脚本不能点掉弹窗,帮忙看看如何撰写。感谢

安卓真机path问题

  • Macaca Version:
    1.0.24
  • Macaca Doctor:
    正常
  • Platform:
    android 在macaca run后显示错误:
    [init({"platformName":"Android","app":"/NodeJs/Macaca/MXD-IOS-macaca/app/app-debug.apk","udid":"85875fccd2fc08bc"})] The environment you requested was unavailable.
    Error: [init({"platformName":"Android","app":"app/app-debug.apk","udid":"85875fccd2fc08bc"})] The environment you requested was unavailable.

在macaca server --verbose显示的错误:

responseHandler.js:63:12 [master] pid:43223 Send Error Respone to Client: TypeError: Path must be a string. Received undefined
responseHandler.js:69:14 [master] pid:43223 TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.posix.resolve (path.js:426:5)
at Function.ADB.startApp.Promise.getApiLevel.ADB.unInstall.Promise.forceStop.ADB.isInstalled.ADB.isScreenLocked.ADB.waitActivityReady.ADB.killProcess.ADB.getPIds.ADB.getDevices.ADB.getEmulators.ADB.getApkMainifest.promise.then as getApkMainifest
at Android.initDevice.data.filter.Android.getApkInfo (/usr/local/lib/node_modules/macaca-android/lib/macaca-android.js:154:30)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:99:29)

TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.posix.resolve (path.js:426:5)
at Function.ADB.startApp.Promise.getApiLevel.ADB.unInstall.Promise.forceStop.ADB.isInstalled.ADB.isScreenLocked.ADB.waitActivityReady.ADB.killProcess.ADB.getPIds.ADB.getDevices.ADB.getEmulators.ADB.getApkMainifest.promise.then as getApkMainifest
at Android.initDevice.data.filter.Android.getApkInfo (/usr/local/lib/node_modules/macaca-android/lib/macaca-android.js:154:30)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:99:29)
请问下,如何解决该问题?udid是通过如下代码获取的:
String android_id =Secure.getString(getActivity().getContentResolver(),Secure.ANDROID_ID);
请问是哪个问题导致呢?谢谢!

ios 真机测试时,遇到签名null

macaca run --verbose

index.js:93:12 [master] pid:11231 webdriver server start with config:
{ port: 3456,
window: true,
ip: '172.16.10.129',
host: 'SamuelMac.local',
loaded_time: '2016-05-10 17:21:29' }
middlewares.js:30:10 [master] pid:11231 base middlewares attached
router.js:117:10 [master] pid:11231 router set
webdriver sdk launched

macaca mobile sample

responseHandler.js:24:12 [master] pid:11231 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","udid":"b9f8d33xxxxxxxxxxxxxxxxxxxxxxxxxx","bundleId":"com.Samuel.UIAutomation.UIAutomation"}}
session.js:24:10 [master] pid:11231 Creating session, sessionId: 04a967c5-3812-4ca9-add6-b3132999785f.
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:11231 {
"bundleId": "com.Samuel.UIAutomation.UIAutomation",
"platformName": "iOS",
"platformVersion": "9.3"
}
xctest-client.js:246:12 [master] pid:11231 xcode version: 7.3
xctest-client.js:219:14 [master] pid:11231 2016-05-10 17:21:32.043 xcodebuild[11238:140775] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/samuel/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/367D29A4-225F-40AC-8954-C8965F9CE5EC/Session-2016-05-10_17:21:32-F1MyFL.log

xctest-client.js:219:14 [master] pid:11231 2016-05-10 17:21:32.043 xcodebuild[11238:140749] [MT] IDETestOperationsObserverDebug: (B733D915-544C-4DD0-9DC5-D3BF42127446) Beginning test session B733D915-544C-4DD0-9DC5-D3BF42127446 with Xcode 7D175 on target <DVTiOSDevice: 0x7fb769d24a60> {
deviceSerialNumber: F2xxxxxxxxx
identifier: b9f8d339xxxxxxxxxxxxxxxxxxx
deviceClass: iPhone
deviceName: Samuel iPhone 6s
deviceIdentifier: b9f8d339xxxxxxxxxxxxxxxxxxx
productVersion: 9.3.1
buildVersion: 13E238
deviceSoftwareVersion: 9.3.1 (13E238)
deviceArchitecture: arm64
deviceTotalCapacity: 59448537088
deviceAvailableCapacity: 13976784896
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
deviceType: <DVTDeviceType:0x7fb76b2ba7a0 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
activityProgress: -2
activityTitle:
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
} (9.3.1 (13E238))

xctest-client.js:219:14 [master] pid:11231
Testing failed:

xctest-client.js:219:14 [master] pid:11231 No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.facebook.xctweb-driver-agent” were found.
** TEST FAILED **

The following build commands failed:
Check dependencies
(1 failure)

xctest-client.js:227:14 [master] pid:11231 xctest client exit with code: 65, signal: null

Android 支持 "elementByXPath"

  • Macaca Version:
 1.0.20
  • Macaca Doctor:
Node.js checklist:

  node env: /Users/fishman/.nvm/versions/node/v5.0.0/bin/node
  node version: v5.0.0

  iOS checklist:

  Xcode is installed at: `/Applications/Xcode.app/Contents/Developer`
  Xcode Command Line Tools is ready, version: 2343.
  ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

  Android checklist:

  JAVA version is `1.8.0_60`
  JAVA_HOME is set to `/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home`
  ANDROID_HOME is set to `/Users/fishman/Library/Android/sdk`
  • Platform:
Darwin fishmanadeMBP.lan 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_6

Hi There,
I tried to locate the element in Android with xpath but failed all the time. I got the xpath from Appium, something like : //android.widget.TextView[@text="消息"], and I tested in Appium it can get the target element.
But when I reach to macaca, the xpath doesn't work. If I tried to elementByClassName it will return all the elements, but for the QA guys, they are unable to find the target index of the element, as there could be a lot.

The xpath works fine with iOS app, maybe I made something wrong in android?

Thanks in advance!

使用自己这边的app,模拟器有打开。app无法运行

Last login: Wed Mar 23 16:08:02 on ttys000
clydeiMac:~ cly$ cd /Users/cly/Desktop/macaca-test/
clydeiMac:macaca-test cly$ make test
platform= macaca run --server --verbose

index.js:62:12 [master] pid:95872 webdriver server start with config:
{ port: 3456,
ip: '192.168.3.70',
host: 'clydeiMac.local',
loaded_time: '2016-03-23 16:22:55' }
middlewares.js:31:10 [master] pid:95872 base middlewares attached
router.js:101:10 [master] pid:95872 router set
webdriver sdk launched

macaca test sample
responseHandler.js:24:12 [master] pid:95872 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.2","deviceName":"iPhone 5s","app":"/Users/cly/Desktop/macaca-test/app/Surfboard.zip"}}
session.js:22:10 [master] pid:95872 Creating session, sessionId: 6dc40f1c-90e4-410f-b8ff-7043a3d50878.
helper.js:202:12 [master] pid:95872 Unzipping local app form /Users/cly/Desktop/macaca-test/app/Surfboard.zip
Get bundleId com.mosheberman.Surfboard from plist /var/folders/rf/1xrmds252jz7_j_pn27tkd380000gn/T/Surfboard.app/Info.plist
macaca-ios.js:128:10 [master] pid:95872 Get available devices [{"name":"iPhone 4s","udid":"13206806-16B8-409E-925B-A810C97B14C9","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 5","udid":"80EE788F-1100-4F5C-9647-CD45475A611A","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 5s","udid":"D631C120-FE43-4868-A603-78C06D7A41AC","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6","udid":"B5234B6C-BAD4-4C7C-BD47-77072EDB860C","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6 Plus","udid":"D604121E-0972-4CCB-AE77-AB09C1B93BD7","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6s","udid":"55022D79-D177-48FE-BFFA-C69155A7A037","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6s Plus","udid":"4FC6AA02-E6B9-416F-94B7-37569513BE94","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad 2","udid":"619F0A8C-9656-4BE2-98E3-96FEDEB31D07","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Retina","udid":"2BC7D133-D644-43A9-BE9E-7837351D0557","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Air","udid":"157C433B-644E-4957-A117-C68B3B8B51B2","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Air 2","udid":"981A2A6D-34D4-4933-9BA2-67F571C9DF76","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Pro","udid":"646D9BC8-CE0F-4B6F-8D5A-9199EF3ED6D0","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"Apple TV 1080p","udid":"27B45B68-8D4C-430A-9EE1-8F7D0E27CC33","state":"Shutdown","available":true,"runtime":"tvOS 9.1"},{"name":"Apple Watch - 38mm","udid":"D8D4DE1D-09EF-4B56-970C-2B6AA37A47CC","state":"Shutdown","available":true,"runtime":"watchOS 2.1"},{"name":"Apple Watch - 42mm","udid":"F091E9FB-889C-4CEF-BE24-CE311DEA993C","state":"Shutdown","available":true,"runtime":"watchOS 2.1"}]
macaca-ios.js:94:12 [master] pid:95872 Kill simulator failed Error: Command failed: /bin/sh -c killAll Simulator
No matching processes belonging to you were found

macaca-ios.js:100:12 [master] pid:95872 Shutdown simulator D631C120-FE43-4868-A603-78C06D7A41AC failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "D631C120-FE43-4868-A603-78C06D7A41AC"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

agent path: /Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:75:10 [master] pid:95872 {"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.2","deviceName":"iPhone 5s","app":"/var/folders/rf/1xrmds252jz7_j_pn27tkd380000gn/T/Surfboard.app/"}
xctest-client.js:122:14 [master] pid:95872 2016-03-23 16:23:40.805 xcodebuild[96002:305784] [MT] IDETestOperationsObserverDebug: (9EE233E5-906D-4875-9EA0-0B58DC5F6A39) Beginning test session 9EE233E5-906D-4875-9EA0-0B58DC5F6A39 with Xcode 7C68 on target <DVTiPhoneSimulator: 0x7fb8ee2dd3e0> {
SimDevice: SimDevice : iPhone 5s (D631C120-FE43-4868-A603-78C06D7A41AC) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-5s } runtime={ SimRuntime : 9.2 (13C75) - com.apple.CoreSimulator.SimRuntime.iOS-9-2 }
} (9.2 (13C75))

Proxy: /session:POST to http://127.0.0.1:8100/session:POST with body: {"desiredCapabilities":{"platformName":"iOS","platformVersion":"9.2","deviceName":"iPhone 5s","autoAcceptAlerts":true,"app":"/var/folders/rf/1xrmds252jz7_j_pn27tkd380000gn/T/Surfboard.app/","bundle...
responseHandler.js:24:12 [master] pid:95872 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.2","deviceName":"iPhone 5s","app":"/Users/cly/Desktop/macaca-test/app/Surfboard.zip"}}
session.js:22:10 [master] pid:95872 Creating session, sessionId: fcbd35c2-5e7a-48a5-95f9-72d971e05b88.
helper.js:202:12 [master] pid:95872 Unzipping local app form /Users/cly/Desktop/macaca-test/app/Surfboard.zip
Get bundleId com.mosheberman.Surfboard from plist /var/folders/rf/1xrmds252jz7_j_pn27tkd380000gn/T/Surfboard.app/Info.plist
macaca-ios.js:128:10 [master] pid:95872 Get available devices [{"name":"iPhone 4s","udid":"13206806-16B8-409E-925B-A810C97B14C9","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 5","udid":"80EE788F-1100-4F5C-9647-CD45475A611A","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 5s","udid":"D631C120-FE43-4868-A603-78C06D7A41AC","state":"Booted","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6","udid":"B5234B6C-BAD4-4C7C-BD47-77072EDB860C","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6 Plus","udid":"D604121E-0972-4CCB-AE77-AB09C1B93BD7","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6s","udid":"55022D79-D177-48FE-BFFA-C69155A7A037","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6s Plus","udid":"4FC6AA02-E6B9-416F-94B7-37569513BE94","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad 2","udid":"619F0A8C-9656-4BE2-98E3-96FEDEB31D07","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Retina","udid":"2BC7D133-D644-43A9-BE9E-7837351D0557","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Air","udid":"157C433B-644E-4957-A117-C68B3B8B51B2","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Air 2","udid":"981A2A6D-34D4-4933-9BA2-67F571C9DF76","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Pro","udid":"646D9BC8-CE0F-4B6F-8D5A-9199EF3ED6D0","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"Apple TV 1080p","udid":"27B45B68-8D4C-430A-9EE1-8F7D0E27CC33","state":"Shutdown","available":true,"runtime":"tvOS 9.1"},{"name":"Apple Watch - 38mm","udid":"D8D4DE1D-09EF-4B56-970C-2B6AA37A47CC","state":"Shutdown","available":true,"runtime":"watchOS 2.1"},{"name":"Apple Watch - 42mm","udid":"F091E9FB-889C-4CEF-BE24-CE311DEA993C","state":"Shutdown","available":true,"runtime":"watchOS 2.1"}]
proxy.js:71:18 [master] pid:95872 xctest client proxy error with: Error: socket hang up
/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:155
throw new Error(res);
^

Error: >> proxy.js:71:18 [master] pid:95872 xctest client proxy error with: Error: socket hang up
at Logger.error (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:155:9)
at Request._callback (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/lib/proxy.js:71:18)
at self.callback (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:199:22)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at Request.onRequestError (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:821:8)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketOnEnd (_http_client.js:292:9)
at emitNone (events.js:72:20)
at Socket.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
clydeiMac:macaca-test cly$

换包后安装包出错

第一次用新版本的测试包能正常的工作,然后用上个版本的包进行测试报错,错误信息:

responseHandler.js:24:12 [master] pid:57356 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/yb.wang/Test/macaca/app/ios-app-bootstrap.zip"}}
session.js:22:10 [master] pid:57356 Creating session, sessionId: d5bbc783-4dbc-48e9-9acf-941ddbac2980.
helper.js:205:12 [master] pid:57356 Unzipping local app form /Users/yb.wang/Test/macaca/app/ios-app-bootstrap.zip
responseHandler.js:56:12 [master] pid:57356 Send Error Respone to Client There is a file in the way: /var/folders/xl/fqsc3cgd4bj8mhsc67_7xy6m0000gn/T/CTRIP_WIRELESS.app/CTHomeSalesViewCell.nib

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-client/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/responseHandler.js:59:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:401:9)

两个包通过xcode在模拟器上都能正常工作。

How to build a testcase with macaca?

http://macacajs.github.io/macaca/guide.html#/getting-started?_k=637wcc

An error occurred while I was operating at this step :“npm install”

[email protected] install /Users/king/workspace/macaca/macaca-test-sample/node_modules/bufferutil
node-gyp rebuild

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/bufferutil.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/5.9.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/king/workspace/macaca/macaca-test-sample/node_modules/bufferutil
gyp ERR! node -v v5.9.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: node-gyp rebuild
npm WARN install:[email protected] Exit status 1

[email protected] install /Users/king/workspace/macaca/macaca-test-sample/node_modules/utf-8-validate
node-gyp rebuild

CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/validation.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/5.9.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/king/workspace/macaca/macaca-test-sample/node_modules/utf-8-validate
gyp ERR! node -v v5.9.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: node-gyp rebuild
npm WARN install:[email protected] Exit status 1

AlertView 无效

IOS的AlertView弹出后,希望通过脚本去点击。
使用elementByXPath和Name都无法生效。

运行demo 跑完浏览器的案例后,跑移动端案例时出错,求解

macaca desktop sample

✓ #0 should go into macaca (9273ms)

#1 should works with macaca (8873ms)

#2 should go into web (3774ms)

#3 should works with web (8682ms)

macaca mobile sample
responseHandler.js:24:12 [master] pid:30813 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","browserName":"chrome","app":"/Users/kasi/Downloads/demo/macaca-test-sample/app/ios-app-bootstrap.zip"}}
session.js:22:10 [master] pid:30813 Creating session, sessionId: 932b75c9-9763-4525-8e6b-c22053d5ab57.
helper.js:205:12 [master] pid:30813 Unzipping local app form /Users/kasi/Downloads/demo/macaca-test-sample/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/8g/fzl_x6l92j5418ftsb_8g95w0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:131:10 [master] pid:30813 Get available devices [{"name":"iPhone 4s","udid":"389C1D16-AE19-4F42-9DA1-C942595CBF5D","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 5","udid":"C14D3EFF-E3A9-4F1D-A719-560B3D123821","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 5s","udid":"20820324-B9C1-47BB-8618-79979AB8028A","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6","udid":"2F05E47C-F841-42CF-9078-6499E5B04CFB","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6 Plus","udid":"CFCECE36-5042-4167-8A7B-9B319BFC11E7","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6s","udid":"18D074B5-F6D4-421B-8213-2D7A7F630FC6","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPhone 6s Plus","udid":"7591CC7F-E3FA-4DF0-9D03-79E8FC22EDDB","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad 2","udid":"1508DD5B-6E06-49AF-8E85-1EC02DDBCC9D","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Retina","udid":"F78F69BD-781C-4469-9B3C-D3EE18A0F79A","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Air","udid":"F33E17A1-5DD5-4E28-AA76-50BD373E9893","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Air 2","udid":"60EE0546-E4EF-482B-B5EF-86A3A6DB00FE","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"iPad Pro","udid":"A14BCDDE-C7C0-48EA-B32A-E5B2CAE1909A","state":"Shutdown","available":true,"runtime":"iOS 9.2"},{"name":"Apple TV 1080p","udid":"345C11EC-17A7-4BDB-8BC5-B3FDB74F4DC7","state":"Shutdown","available":true,"runtime":"tvOS 9.1"},{"name":"Apple Watch - 38mm","udid":"AFC22206-61AF-4A1C-8D75-60C53AE8D078","state":"Shutdown","available":true,"runtime":"watchOS 2.1"},{"name":"Apple Watch - 42mm","udid":"92091FC0-7BD7-481D-BA85-84DFAE0E235B","state":"Shutdown","available":true,"runtime":"watchOS 2.1"}]
macaca-ios.js:149:12 [master] pid:30813 Kill simulator failed Error: Command failed: /bin/sh -c killAll Simulator
No matching processes belonging to you were found

macaca-ios.js:155:12 [master] pid:30813 Shutdown simulator 20820324-B9C1-47BB-8618-79979AB8028A failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "20820324-B9C1-47BB-8618-79979AB8028A"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:56:12 [master] pid:30813 Send Error Respone to Client Error: Command failed: /bin/sh -c open -a Simulator --args -CurrentDeviceUDID "20820324-B9C1-47BB-8618-79979AB8028A"
The application /Applications/Cocos/cocos-simulator-bin/ios/Simulator.app cannot be opened because it has an incorrect executable format.

responseHandler.js:62:14 [master] pid:30813 Error: Command failed: /bin/sh -c open -a Simulator --args -CurrentDeviceUDID "20820324-B9C1-47BB-8618-79979AB8028A"
The application /Applications/Cocos/cocos-simulator-bin/ios/Simulator.app cannot be opened because it has an incorrect executable format.

at ChildProcess.exithandler (child_process.js:203:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)

responseHandler.js:81:14 [master] pid:30813 Unexcepted error Error

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/responseHandler.js:82:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:81:24)

  1. "before all" hook
    responseHandler.js:24:12 [master] pid:30813 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
    responseHandler.js:48:14 [master] pid:30813 Send HTTP Respone to Client: {"sessionId":"","status":0}

4 passing (35s)
1 failing

  1. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","browserName":"chrome","app":"/Users/kasi/Downloads/demo/macaca-test-sample/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","browserName":"chrome","app":"app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    at endReadableNT (_stream_readable.js:905:12)

Test completed!

npm i macaca-android -g命令执行异常:For 'N' SDK Preview, attribute minSdkVersion in AndroidManifest.xml must be 'N'

[email protected] install /usr/local/lib/node_modules/macaca-android/node_modules/unlock-apk
node ./script/build.js

JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
Buildfile: /usr/local/lib/node_modules/macaca-android/node_modules/unlock-apk/build.xml

-set-mode-check:

-set-debug-files:

-check-env:

[checkenv] Android SDK Tools Revision 25.1.3

[checkenv] Installed at /Users/edison/Library/Android/sdk

-setup:

 [echo] Project Name: unlock_apk

[gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:

[getbuildtools] Using latest Build Tools: 23.0.3

 [echo] Resolving Build Target for unlock_apk...

[gettarget] Project Target: Android N (Preview)

[gettarget] API level: N

BUILD FAILED
/Users/edison/Library/Android/sdk/tools/ant/build.xml:538: For 'N' SDK Preview, attribute minSdkVersion in AndroidManifest.xml must be 'N' (current: )

Total time: 1 second

[Error: build failed]
/usr/local/lib/node_modules/macaca-android/node_modules/unlock-apk/script/build.js:28
throw e;
^

Error: build failed
at ChildProcess. (/usr/local/lib/node_modules/macaca-android/node_modules/ant-build/lib/ant-build.js:98:16)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
npm WARN install:[email protected] [email protected] install: node ./script/build.js
npm WARN install:[email protected] Exit status 1

[email protected] install /usr/local/lib/node_modules/macaca-android/node_modules/macaca-chromedriver
./bin/macaca-chromedriver install

chromedriver cdn url: http://chromedriver.storage.googleapis.com/2.20/chromedriver_mac32.zip
chromedriver local in /usr/local/lib/node_modules/macaca-android/node_modules/macaca-chromedriver/exec/chromedriver
Fixed file permissions

[email protected] install /usr/local/lib/node_modules/macaca-android/node_modules/uiautomator-client
node ./scripts/build.js

JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
Updated
file ./build.xml

Buildfile: /usr/local/lib/node_modules/macaca-android/node_modules/uiautomator-client/build.xml

-check-env:

[checkenv] Android SDK Tools Revision 25.1.3

[checkenv] Installed at /Users/edison/Library/Android/sdk

-build-setup:

[getbuildtools] Using latest Build Tools: 23.0.3

 [echo] Resolving Build Target for uiautomator-bootstrap...

[getuitarget] Project Target: Android N (Preview)

[getuitarget] API level: N

 [echo] ----------


 [echo] Creating output directories if needed...


[mkdir] Created dir: /usr/local/lib/node_modules/macaca-android/node_modules/uiautomator-client/bin


[mkdir] Created dir: /usr/local/lib/node_modules/macaca-android/node_modules/uiautomator-client/bin/classes

-pre-compile:

compile:

[javac] Compiling 15 source files to /usr/local/lib/node_modules/macaca-android/node_modules/uiautomator-client/bin/classes


[javac] 警告: [options] 源值1.5已过时, 将在未来所有发行版中删除


[javac] 警告: [options] 目标值1.5已过时, 将在未来所有发行版中删除


[javac] 警告: [options] 要隐藏有关已过时选项的警告, 请使用 -Xlint:-options。


[javac] 3 个警告

-post-compile:

-dex:

  [dex] input: /usr/local/lib/node_modules/macaca-android/node_modules/uiautomator-client/bin/classes

  [dex] Converting compiled files and external libraries into /usr/local/lib/node_modules/macaca-android/node_modules/uiautomator-client/bin/classes.dex...

-post-dex:

-jar:

  [jar] Building jar: /usr/local/lib/node_modules/macaca-android/node_modules/uiautomator-client/bin/uiautomator-bootstrap.jar

-post-jar:

build:

BUILD SUCCESSFUL
Total time: 3 seconds

uiautomator-bootstrap build success!
/usr/local/lib
└── (empty)

npm ERR! code 1

iOS不断重启模拟器

Macaca Version: 1.0.24
Macaca Doctor:
Node.js checklist:

node env: /usr/local/bin/node
node version: v4.4.4

iOS checklist:

Xcode is installed at: /Applications/Xcode.app/Contents/Developer
Xcode Command Line Tools is ready, version: 2343.
ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

Android checklist:

Platform: Mac OSX 10.11.4

以下是log

`Last login: Sun May 8 22:30:30 on ttys000
admindeMBP:~ admin$ xcodebuild -showsdks
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun
admindeMBP:~ admin$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
admindeMBP:~ admin$ xcode-select
xcode-select: error: no command option given
Usage: xcode-select [options]

Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).

Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s , --switch set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
admindeMBP:~ admin$ xcode-select -v
xcode-select version 2343.
admindeMBP:~ admin$ xcode-select -install
xcode-select: error: invalid argument '-install'
Usage: xcode-select [options]

Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).

Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s , --switch set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
admindeMBP:~ admin$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
admindeMBP:~ admin$ pwd
/Users/admin
admindeMBP:~ admin$ cd ~/Downloads/
admindeMBP:Downloads admin$ ls
Sublime Text Build 3103.dmg node-v4.4.4.pkg
googlechrome_46.0.2490.71.1450163790.dmg node-v4.4.4.pkg.download
macaca-test-sample-master
admindeMBP:Downloads admin$ cd macaca-test-sample-master/
admindeMBP:macaca-test-sample-master admin$ ls
HISTORY.md Makefile app macaca-test package.json
LICENSE README.md index.js node_modules
admindeMBP:macaca-test-sample-master admin$ macaca run --verbose

index.js:93:12 [master] pid:663 webdriver server start with config:
{ port: 3456,
window: true,
ip: '192.168.1.38',
host: 'admindeMBP',
loaded_time: '2016-05-08 23:09:41' }
middlewares.js:30:10 [master] pid:663 base middlewares attached
router.js:117:10 [master] pid:663 router set
webdriver sdk launched
fs.js:60
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
^

Error: EACCES: permission denied, open '/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/logs/digest-2016_05_08.log'
at Error (native)
admindeMBP:macaca-test-sample-master admin$ sudo macaca run --verbose
Password:

index.js:93:12 [master] pid:666 webdriver server start with config:
{ port: 3456,
window: true,
ip: '192.168.1.38',
host: 'admindeMBP',
loaded_time: '2016-05-08 23:10:02' }
middlewares.js:30:10 [master] pid:666 base middlewares attached
router.js:117:10 [master] pid:666 router set
webdriver sdk launched

macaca desktop sample

responseHandler.js:24:12 [master] pid:666 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:666 Creating session, sessionId: 0bb1db2f-4234-4c3e-814a-fcec9ceb0980.
helper.js:205:12 [master] pid:666 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
responseHandler.js:63:12 [master] pid:666 Send Error Respone to Client: Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

responseHandler.js:69:14 [master] pid:666 Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

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:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

  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:827:16)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
1) "before all" hook

responseHandler.js:24:12 [master] pid:666 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:666 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:666 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:666 Creating session, sessionId: 213913b3-3ac9-4351-811c-81df293c4a8f.
helper.js:205:12 [master] pid:666 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
responseHandler.js:63:12 [master] pid:666 Send Error Respone to Client: Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

responseHandler.js:69:14 [master] pid:666 Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

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:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:477:12)

Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

  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:827:16)
  at Socket.<anonymous> (internal/child_process.js:319:11)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:169:7)
  at Pipe._onclose (net.js:477:12)

3) "before all" hook

responseHandler.js:24:12 [master] pid:666 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:666 Send HTTP Respone to Client: 405 Method Not Allowed

4) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:666 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:666 Creating session, sessionId: 4cfbc3b2-2198-4a4b-9245-0ce0c15bc17e.
helper.js:205:12 [master] pid:666 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
responseHandler.js:63:12 [master] pid:666 Send Error Respone to Client: Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

responseHandler.js:69:14 [master] pid:666 Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

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:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:477:12)

Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

  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:827:16)
  at Socket.<anonymous> (internal/child_process.js:319:11)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:169:7)
  at Pipe._onclose (net.js:477:12)
5) "before all" hook

responseHandler.js:24:12 [master] pid:666 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:666 Send HTTP Respone to Client: 405 Method Not Allowed

6) "after all" hook

0 passing (16s)

6 failing

  1. macaca desktop sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)
  1. macaca desktop 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  2. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  3. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  4. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  5. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

Test completed!
admindeMBP:macaca-test-sample-master admin$ sudo macaca run --verbose
Password:
index.js:93:12 [master] pid:834 webdriver server start with config:
{ port: 3456,
window: true,
ip: '192.168.1.38',
host: 'admindeMBP',
loaded_time: '2016-05-08 23:40:00' }
middlewares.js:30:10 [master] pid:834 base middlewares attached
router.js:117:10 [master] pid:834 router set
webdriver sdk launched

macaca desktop sample

responseHandler.js:24:12 [master] pid:834 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:834 Creating session, sessionId: d7d5f9ba-3660-4290-be8e-424e9bf39d46.
helper.js:205:12 [master] pid:834 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:834 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Creating","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:834 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:834 Send Error Respone to Client: Error: Command failed: /bin/sh -c open -a Simulator --args -CurrentDeviceUDID "3D19B580-57B3-4A01-BEF7-769FE01810B0"
The application /Users/admin/.Trash/Xcode 下午11.37.50.app/Contents/Developer/Applications/Simulator.app cannot be opened because it is in the Trash.

responseHandler.js:69:14 [master] pid:834 Error: Command failed: /bin/sh -c open -a Simulator --args -CurrentDeviceUDID "3D19B580-57B3-4A01-BEF7-769FE01810B0"
The application /Users/admin/.Trash/Xcode 下午11.37.50.app/Contents/Developer/Applications/Simulator.app cannot be opened because it is in the Trash.

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:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

Error: Command failed: /bin/sh -c open -a Simulator --args -CurrentDeviceUDID "3D19B580-57B3-4A01-BEF7-769FE01810B0"
The application /Users/admin/.Trash/Xcode 下午11.37.50.app/Contents/Developer/Applications/Simulator.app cannot be opened because it is in the Trash.

  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:827:16)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
1) "before all" hook

responseHandler.js:24:12 [master] pid:834 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:834 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:834 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:834 Creating session, sessionId: df31179c-b46c-4dc8-8b29-3c4b5e278c17.
helper.js:205:12 [master] pid:834 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:834 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:214:12 [master] pid:834 Kill simulator failed Error: Command failed: /bin/sh -c killAll Simulator
No matching processes were found

macaca-ios.js:220:12 [master] pid:834 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:834 Send Error Respone to Client: Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
responseHandler.js:69:14 [master] pid:834 Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20
at process._tickCallback (node.js:369:9)

Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20
at process._tickCallback (node.js:369:9)

3) "before all" hook

responseHandler.js:24:12 [master] pid:834 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:834 Send HTTP Respone to Client: 405 Method Not Allowed

4) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:834 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:834 Creating session, sessionId: a97de82e-a395-4ff4-b21d-ee7b6b76854c.
helper.js:205:12 [master] pid:834 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:834 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:834 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:834 Send Error Respone to Client: Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
responseHandler.js:69:14 [master] pid:834 Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

5) "before all" hook

responseHandler.js:24:12 [master] pid:834 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:834 Send HTTP Respone to Client: 405 Method Not Allowed

6) "after all" hook

0 passing (2m)

6 failing

  1. macaca desktop sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  2. macaca desktop 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  3. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  4. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  5. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  6. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

Test completed!
admindeMBP:macaca-test-sample-master admin$ sudo macaca run --verbose
Password:
index.js:93:12 [master] pid:1144 webdriver server start with config:
{ port: 3456,
window: true,
ip: '192.168.1.38',
host: 'admindeMBP',
loaded_time: '2016-05-09 00:04:37' }
middlewares.js:30:10 [master] pid:1144 base middlewares attached
router.js:117:10 [master] pid:1144 router set
webdriver sdk launched

macaca desktop sample

responseHandler.js:24:12 [master] pid:1144 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1144 Creating session, sessionId: 675b21a0-7ee6-4f6b-9886-dd810ccb94f6.
helper.js:205:12 [master] pid:1144 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1144 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1144 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1144 Send Error Respone to Client: Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
responseHandler.js:69:14 [master] pid:1144 Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

1) "before all" hook

responseHandler.js:24:12 [master] pid:1144 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1144 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:1144 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1144 Creating session, sessionId: 33ac6dff-7682-4a11-97b7-4a32e7a3146b.
helper.js:205:12 [master] pid:1144 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1144 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1144 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1144 Send Error Respone to Client: Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
responseHandler.js:69:14 [master] pid:1144 Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

3) "before all" hook

responseHandler.js:24:12 [master] pid:1144 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1144 Send HTTP Respone to Client: 405 Method Not Allowed

4) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:1144 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1144 Creating session, sessionId: 86682e7d-603d-409b-ab70-cec84faac600.
helper.js:205:12 [master] pid:1144 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1144 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1144 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1144 Send Error Respone to Client: Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
responseHandler.js:69:14 [master] pid:1144 Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

5) "before all" hook

responseHandler.js:24:12 [master] pid:1144 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1144 Send HTTP Respone to Client: 405 Method Not Allowed

6) "after all" hook

0 passing (2m)
6 failing

  1. macaca desktop sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  2. macaca desktop 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  3. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  4. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  5. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  1. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

Test completed!
admindeMBP:macaca-test-sample-master admin$ sudo macaca run --verbose
Password:
index.js:93:12 [master] pid:1550 webdriver server start with config:
{ port: 3456,
window: true,
ip: '192.168.1.38',
host: 'admindeMBP',
loaded_time: '2016-05-09 00:10:11' }
middlewares.js:30:10 [master] pid:1550 base middlewares attached
router.js:117:10 [master] pid:1550 router set
webdriver sdk launched

macaca desktop sample

responseHandler.js:24:12 [master] pid:1550 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1550 Creating session, sessionId: a804785b-f581-41cf-88f4-78015b1f3011.
helper.js:205:12 [master] pid:1550 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1550 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1550 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1550 Send Error Respone to Client: Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
responseHandler.js:69:14 [master] pid:1550 Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

1) "before all" hook

responseHandler.js:24:12 [master] pid:1550 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1550 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:1550 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1550 Creating session, sessionId: 2c582845-c01f-4456-9494-3c6e4e6813df.
helper.js:205:12 [master] pid:1550 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1550 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1550 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1550 Send Error Respone to Client: Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
responseHandler.js:69:14 [master] pid:1550 Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

3) "before all" hook

responseHandler.js:24:12 [master] pid:1550 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1550 Send HTTP Respone to Client: 405 Method Not Allowed
4) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:1550 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1550 Creating session, sessionId: 58ace2c7-9611-4a63-bc96-293a432f10ee.
helper.js:205:12 [master] pid:1550 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1550 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1550 Shutdown simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "3D19B580-57B3-4A01-BEF7-769FE01810B0"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1550 Send Error Respone to Client: Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
responseHandler.js:69:14 [master] pid:1550 Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator 3D19B580-57B3-4A01-BEF7-769FE01810B0 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

5) "before all" hook

responseHandler.js:24:12 [master] pid:1550 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1550 Send HTTP Respone to Client: 405 Method Not Allowed

6) "after all" hook

0 passing (2m)
6 failing

  1. macaca desktop sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  2. macaca desktop 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  1. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913: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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  3. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  1. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

Test completed!
admindeMBP:macaca-test-sample-master admin$ sudo macaca run --verbose
index.js:93:12 [master] pid:1810 webdriver server start with config:
{ port: 3456,
window: true,
ip: '192.168.1.38',
host: 'admindeMBP',
loaded_time: '2016-05-09 00:14:03' }
middlewares.js:30:10 [master] pid:1810 base middlewares attached
router.js:117:10 [master] pid:1810 router set
webdriver sdk launched

macaca desktop sample

responseHandler.js:24:12 [master] pid:1810 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1810 Creating session, sessionId: c745cea3-7ee3-4cc1-b2e2-d05635605fa5.
helper.js:205:12 [master] pid:1810 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1810 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1810 Shutdown simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "EE75DEDB-97F7-42DD-AC64-1B7E3592CD28"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1810 Send Error Respone to Client: Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
responseHandler.js:69:14 [master] pid:1810 Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

1) "before all" hook

responseHandler.js:24:12 [master] pid:1810 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1810 Send HTTP Respone to Client: 405 Method Not Allowed

2) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:1810 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1810 Creating session, sessionId: 9443e6b5-ff04-41b2-b50b-11f5bd81e73f.
helper.js:205:12 [master] pid:1810 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1810 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1810 Shutdown simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "EE75DEDB-97F7-42DD-AC64-1B7E3592CD28"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1810 Send Error Respone to Client: Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
responseHandler.js:69:14 [master] pid:1810 Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20
at process._tickCallback (node.js:369:9)

Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20
at process._tickCallback (node.js:369:9)

3) "before all" hook

responseHandler.js:24:12 [master] pid:1810 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1810 Send HTTP Respone to Client: 405 Method Not Allowed

4) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:1810 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:1810 Creating session, sessionId: 9ce783bc-7f1c-47d1-b432-b718d875adce.
helper.js:205:12 [master] pid:1810 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /tmp/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:1810 Get available devices [{"name":"iPhone 4s","udid":"BF868431-DB6D-49ED-AEC6-8BC2D47AD4AC","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"906647C3-3A02-4F54-A3CC-1BCE244EC56B","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"3D19B580-57B3-4A01-BEF7-769FE01810B0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"C7331FF1-A10C-4654-ADA0-144706809A41","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D2CCD036-DB6B-46A4-80FA-5624711A6566","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"4FAF9D44-E8D6-4CCD-8FB6-ED34F31D742C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"EE75DEDB-97F7-42DD-AC64-1B7E3592CD28","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"A6B304BE-3633-4E45-9ED8-48ED97B1C5B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"C48EE6C6-8A8D-4A26-B253-77DF73DA03C1","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"8D650329-590C-4581-B686-E70617CF938F","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"93B6D9BF-9CAF-4015-B903-19EA47A9FED9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"6723BB36-1615-4F22-A073-AA81E5D82758","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"92B02225-BFE2-4820-B2F1-A224A0F0D211","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"6B0D9D07-BF95-46E9-9AC2-891371811CB3","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"E405D02A-5F5F-4312-BDEB-0AFE5329C1E8","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:1810 Shutdown simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "EE75DEDB-97F7-42DD-AC64-1B7E3592CD28"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:1810 Send Error Respone to Client: Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
responseHandler.js:69:14 [master] pid:1810 Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20
at process._tickCallback (node.js:369:9)

Error: Simulator EE75DEDB-97F7-42DD-AC64-1B7E3592CD28 is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20
at process._tickCallback (node.js:369:9)

5) "before all" hook

responseHandler.js:24:12 [master] pid:1810 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:1810 Send HTTP Respone to Client: 405 Method Not Allowed

6) "after all" hook

0 passing (2m)
6 failing

  1. macaca desktop sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  2. macaca desktop 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  3. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  4. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  5. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  1. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

Test completed!
admindeMBP:macaca-test-sample-master admin$ $ brew install ios-webkit-debug-proxy
-bash: $: command not found
admindeMBP:macaca-test-sample-master admin$ brew install ios-webkit-debug-proxy
Warning: ios-webkit-debug-proxy-1.6 already installed
admindeMBP:macaca-test-sample-master admin$ brew reinstall ios-webkit-debug-proxy
==> Reinstalling ios-webkit-debug-proxy
==> Downloading https://homebrew.bintray.com/bottles/ios-webkit-debug-proxy-1.6.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/ios-webkit-debug-proxy-1.6.el_capitan.bottle.tar.gz
==> Pouring ios-webkit-debug-proxy-1.6.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/ios-webkit-debug-proxy/1.6: 19 files, 356.3K
admindeMBP:macaca-test-sample-master admin$ brew reinstall ios-webkit-debug-proxy
==> Reinstalling ios-webkit-debug-proxy
==> Downloading https://homebrew.bintray.com/bottles/ios-webkit-debug-proxy-1.6.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/ios-webkit-debug-proxy-1.6.el_capitan.bottle.tar.gz
==> Pouring ios-webkit-debug-proxy-1.6.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/ios-webkit-debug-proxy/1.6: 19 files, 356.3K
admindeMBP:macaca-test-sample-master admin$ pwd
/Users/admin/Downloads/macaca-test-sample-master
admindeMBP:macaca-test-sample-master admin$ macaca run --verbose
index.js:93:12 [master] pid:2256 webdriver server start with config:
{ port: 3456,
window: true,
ip: '192.168.1.38',
host: 'admindeMBP',
loaded_time: '2016-05-09 00:19:58' }
middlewares.js:30:10 [master] pid:2256 base middlewares attached
router.js:117:10 [master] pid:2256 router set
webdriver sdk launched
fs.js:60
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
^

Error: EACCES: permission denied, open '/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/logs/digest-2016_05_09.log'
at Error (native)
admindeMBP:macaca-test-sample-master admin$ npm i -g macaca-cli
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "macaca-cli"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! path /usr/local/lib/node_modules/macaca-cli
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall rmdir

npm ERR! Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/macaca-cli'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/macaca-cli']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rmdir',
npm ERR! path: '/usr/local/lib/node_modules/macaca-cli' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/macaca-cli'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/macaca-cli']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back syscall: 'rmdir',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/macaca-cli' }

npm ERR! Please include the following file with any support request:
npm ERR! /Users/admin/Downloads/macaca-test-sample-master/npm-debug.log
admindeMBP:macaca-test-sample-master admin$ npm i -g macaca-cli
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "macaca-cli"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! path /usr/local/lib/node_modules/macaca-cli/.config.json
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink

npm ERR! Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/macaca-cli/.config.json'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/macaca-cli/.config.json']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'unlink',
npm ERR! path: '/usr/local/lib/node_modules/macaca-cli/.config.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/macaca-cli/.config.json'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/macaca-cli/.config.json']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back syscall: 'unlink',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/macaca-cli/.config.json' }

npm ERR! Please include the following file with any support request:
npm ERR! /Users/admin/Downloads/macaca-test-sample-master/npm-debug.log
admindeMBP:macaca-test-sample-master admin$ npm i -g macaca-cli
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "macaca-cli"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! path /usr/local/lib/node_modules/macaca-cli/bin/macaca-cli
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink

npm ERR! Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/macaca-cli/bin/macaca-cli'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/macaca-cli/bin/macaca-cli']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'unlink',
npm ERR! path: '/usr/local/lib/node_modules/macaca-cli/bin/macaca-cli' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/macaca-cli/bin/macaca-cli'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/macaca-cli/bin/macaca-cli']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back syscall: 'unlink',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/macaca-cli/bin/macaca-cli' }

npm ERR! Please include the following file with any support request:
npm ERR! /Users/admin/Downloads/macaca-test-sample-master/npm-debug.log
admindeMBP:macaca-test-sample-master admin$ sudo chmod R 777 /usr/local/lib/node_modules
Password:
chmod: Invalid file mode: R
admindeMBP:macaca-test-sample-master admin$ sudo chmod -R 777 /usr/local/lib/node_modules
admindeMBP:macaca-test-sample-master admin$ npm i -g macaca-cli
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

[email protected] install /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer
node ./scripts/install.js

/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/installer.config.json write success
/usr/local/bin/macaca -> /usr/local/lib/node_modules/macaca-cli/bin/macaca-cli

[email protected] postinstall /usr/local/lib/node_modules/macaca-cli
node ./scripts/print.js

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@888@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0Lt111111tL0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0GCLCG8@01ii1fLCGGGGCC8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@80GLfCfL0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@80GCLLfttttt1i1tfffLCG08@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8GLti;;;;;;;;;;;;;;;;;;;;;;;;itfC0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@8Cti;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;i1LG8@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@0l1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1L0@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@8l1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;if0@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@880088@@@@0t;;;;;;;;;;;itLCG0000GCLt1;;;;itfCGG000GCLf1;;;;;;;;;;;;1C8@@@80008@@@@@@@@@@@
@@@@@@8Cti;;;;;;itLt;;;;;;;;;;tC8@@@@@@@@@@@@@@8GC0@@@@@@@@@@@@@@8Gfi;;;;;;;;;;;t1i;;;;;i1fG8@@@@@@
@@@@0t;;;;;;;;;;;;;;;;;;;;;;L8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@c1;;;;;;;;;;;;;;;;;;;;;if8@@@@
@@@l;;;;;;;;;;;;;;;;;;;;;;t8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C;;;;;;;;;;;;;;;;;;;;;;iG@@@
@@l;;;;;;;;;;;;;;;;;;;;;;L@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0;;;;;;;;;;;;;;;;;;;;;;;0@@
@8;;;;;;;;;;;;;;;;;;;;;;f@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g;;;;;;;;;;;;;;;;;;;;;;1@@
@g;;;;;;;;;;;;;;;;;;;;;;8@@@@@@@@@8CfLG@@@@@@@@@@@@@@@@@8CfLC@@@@@@@@@@@@@t;;;;;;;;;;;;;;;;;;;;;i@@
@8;;;;;;;;;;;;;;;;;;;;;t@@@@@@@@@g;;;;;t@@@@@@@@@@@@@@@8i;;;;i8@@@@@@@@@@@g;;;;;;;;;;;;;;;;;;;;;1@@
@@l;;;;;;;;;;;;;;;;;;;;t@@@@@@@@@g;;;;;1@@@@@@@@@@@@@@@8;;;;;i8@@@@@@@@@@@g;;;;;;;;;;;;;;;;;;;;;0@@
@@@l;;;;;;;;;;;;;;;;;;;i@@@@@@@@@@0LtfC@@@@@@@@@@@@@@@@@8LffC8@@@@@@@@@@@@l;;;;;;;;;;;;;;;;;;;iG@@@
@@@@0t;;;;;;;;;;;;;;;;;;C@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8;;;;;;;;;;;;;;;;;;;f8@@@@
@@@@@@0lti;;;;;;;;;;;;;;i8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ci;;;;;;;;;;;;;;1fC8@@@@@@
@@@@@@@@@@1;;;;;;;;;;;fG@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@gt;;;;;;;;;;;i@@@@@@@@@@
@@@@@@@@@@t;;;;;;;;;f8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@01;;;;;;;;;i@@@@@@@@@@
@@@@@@@@@@l;;;;;;;;G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@f;;;;;;;;t@@@@@@@@@@
@@@@@@@@@@0;;;;;;;0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1;;;;;;;C@@@@@@@@@@
@@@@@@@@@@@1;;;;;t@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g;;;;;;i8@@@@@@@@@@
@@@@@@@@@@@0;;;;;L@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;;;;;;C@@@@@@@@@@@
@@@@@@@@@@@@f;;;;f@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@i;;;;t@@@@@@@@@@@@
@@@@@@@@@@@@@t;;;i@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8;;;;i8@@@@@@@@@@@@
@@@@@@@@@@@@@@t;;;t@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@t;;;i8@@@@@@@@@@@@@
@@@@@@@@@@@@@@@f;;;t8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8t;;;t8@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@gi;;iG@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@gi;;;L@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@8f;;;tG@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8c1;;;t0@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@0t;;;ifG8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0cti;;;tG@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@0FI;;;;tLG8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@80Cti;;;;;f0@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@8gt;;;;;;itfLC008@@@@@@@@@@@@@@@@@@880GCLt1;;;;;;;tC8@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@8Gf1;;;;;;;;;;ii11ttfffLffftt11ii;;;;;;;;;;itC8@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8Gfti;;;;;;;;;;;;;;;;;;;;;;;;;;;;;i1fC0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8GCLt11i;;;;;;;;;;;;;ii1tfCG0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8880000000888@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Macaca was successfully installed!

Run macaca -h for further help.

[email protected] /usr/local/lib/node_modules/macaca-cli
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected])
admindeMBP:macaca-test-sample-master admin$ pwd
/Users/admin/Downloads/macaca-test-sample-master
admindeMBP:macaca-test-sample-master admin$ macaca run --verbose

index.js:93:12 [master] pid:2280 webdriver server start with config:
{ port: 3456,
window: true,
ip: '192.168.1.38',
host: 'admindeMBP',
loaded_time: '2016-05-09 00:28:57' }
middlewares.js:30:10 [master] pid:2280 base middlewares attached
router.js:117:10 [master] pid:2280 router set
webdriver sdk launched

macaca desktop sample

responseHandler.js:24:12 [master] pid:2280 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:2280 Creating session, sessionId: 60c55cae-a5fa-434e-88fd-e866aaa768f4.
macaca-ios is installing for the first time with args: ["install","macaca-ios","--registry=https://registry.npmjs.org/"]

\ loading...

[email protected] install /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent
unzip -o ./WebDriverAgent.zip -d ./ 1>/dev/null

[email protected] node_modules/macaca-ios
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])

install macaca-ios success

helper.js:205:12 [master] pid:2280 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:2280 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:2280 Shutdown simulator 2B47D1C8-0E80-4820-8000-0509B7DC01CF failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "2B47D1C8-0E80-4820-8000-0509B7DC01CF"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:2280 Send Error Respone to Client: Error: Command failed: /bin/sh -c open -a Simulator --args -CurrentDeviceUDID "2B47D1C8-0E80-4820-8000-0509B7DC01CF"
The application /Users/admin/.Trash/Xcode 下午11.37.50.app/Contents/Developer/Applications/Simulator.app cannot be opened because it is in the Trash.

responseHandler.js:69:14 [master] pid:2280 Error: Command failed: /bin/sh -c open -a Simulator --args -CurrentDeviceUDID "2B47D1C8-0E80-4820-8000-0509B7DC01CF"
The application /Users/admin/.Trash/Xcode 下午11.37.50.app/Contents/Developer/Applications/Simulator.app cannot be opened because it is in the Trash.

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:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:477:12)

Error: Command failed: /bin/sh -c open -a Simulator --args -CurrentDeviceUDID "2B47D1C8-0E80-4820-8000-0509B7DC01CF"
The application /Users/admin/.Trash/Xcode 下午11.37.50.app/Contents/Developer/Applications/Simulator.app cannot be opened because it is in the Trash.

  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:827:16)
  at Socket.<anonymous> (internal/child_process.js:319:11)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:169:7)
  at Pipe._onclose (net.js:477:12)
1) "before all" hook

responseHandler.js:24:12 [master] pid:2280 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:2280 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:2280 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:2280 Creating session, sessionId: cbb671c1-34cd-43d1-9856-64e167110ee6.
helper.js:205:12 [master] pid:2280 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:2280 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:214:12 [master] pid:2280 Kill simulator failed Error: Command failed: /bin/sh -c killAll Simulator
No matching processes belonging to you were found

macaca-ios.js:220:12 [master] pid:2280 Shutdown simulator 2B47D1C8-0E80-4820-8000-0509B7DC01CF failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "2B47D1C8-0E80-4820-8000-0509B7DC01CF"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

responseHandler.js:63:12 [master] pid:2280 Send Error Respone to Client: Error: Simulator 2B47D1C8-0E80-4820-8000-0509B7DC01CF is not booted.
responseHandler.js:69:14 [master] pid:2280 Error: Simulator 2B47D1C8-0E80-4820-8000-0509B7DC01CF is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

Error: Simulator 2B47D1C8-0E80-4820-8000-0509B7DC01CF is not booted.
at /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/lib/macaca-ios.js:237:20

3) "before all" hook

responseHandler.js:24:12 [master] pid:2280 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:2280 Send HTTP Respone to Client: 405 Method Not Allowed

4) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:2280 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:2280 Creating session, sessionId: fe95615d-7d0a-47bd-baf3-353dbe583cef.
helper.js:205:12 [master] pid:2280 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:2280 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:2280 Shutdown simulator 2B47D1C8-0E80-4820-8000-0509B7DC01CF failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "2B47D1C8-0E80-4820-8000-0509B7DC01CF"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:2280 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:2280 xcode version: 7.3.1
xctest-client.js:219:14 [master] pid:2280 2016-05-09 00:30:51.972 xcodebuild[2388:55843] [MT] IDETestOperationsObserverDebug: (36EEA3C7-4D96-4BF8-A6EA-3F52071B3BDA) Beginning test session 36EEA3C7-4D96-4BF8-A6EA-3F52071B3BDA with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7f9a0d468670> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

xctest-client.js:219:14 [master] pid:2280 2016-05-09 00:30:52.172 xcodebuild[2388:55853] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/91FF6D11-9426-4D2A-A199-FCD8EF978F98/Session-2016-05-09_00:30:52-9PsVwI.log

responseHandler.js:24:12 [master] pid:2280 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:2280 Creating session, sessionId: b206ce45-4ba6-46d7-83be-b495b877b260.
helper.js:205:12 [master] pid:2280 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:2280 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:2280 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:2280 xcode version: 7.3.1
xctest-client.js:219:14 [master] pid:2280 2016-05-09 00:33:28.782 xcodebuild[2565:58001] [MT] IDETestOperationsObserverDebug: (603225D4-C985-43F3-BEBA-6F17C11D93AF) Beginning test session 603225D4-C985-43F3-BEBA-6F17C11D93AF with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7fc8225e67a0> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

xctest-client.js:219:14 [master] pid:2280 2016-05-09 00:33:28.810 xcodebuild[2565:58580] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/948613DA-1C01-4DBC-A9EF-CD1632271AEF/Session-2016-05-09_00:33:28-P86QnB.log

xctest-client.js:219:14 [master] pid:2280 2016-05-09 00:34:21.427 xcodebuild[2565:58580] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-10150/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.mm:90
Details: Failed to read dependencies. Could not find colon in /Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Build/Intermediates/WebDriverAgent.build/Debug-iphonesimulator/XCTWebDriverAgentLib.build/Objects-normal/x86_64/FBElement.d''. Contents (0..100):<>''
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *__strong))
Thread: <NSThread: 0x7fc8223fbf30>{number = 9, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

responseHandler.js:24:12 [master] pid:2280 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:2280 Creating session, sessionId: 0a862139-4bc5-4489-b308-6d00dc6c2bb9.
helper.js:205:12 [master] pid:2280 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:2280 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:2280 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:2280 xcode version: 7.3.1
xctest-client.js:150:16 [master] pid:2280 tail: /Users/admin/Library/Logs/CoreSimulator/2B47D1C8-0E80-4820-8000-0509B7DC01CF/system.log: No such file or directory

xctest-client.js:158:16 [master] pid:2280 bootstrap exit with code: 1, signal: null
responseHandler.js:63:12 [master] pid:2280 Send Error Respone to Client: undefined

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/responseHandler.js:66:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:369:9)

5) "before all" hook

responseHandler.js:24:12 [master] pid:2280 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:2280 Send HTTP Respone to Client: 405 Method Not Allowed

6) "after all" hook

0 passing (6m)

6 failing

  1. macaca desktop sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  2. macaca desktop 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  1. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913: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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  3. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  1. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

Test completed!
admindeMBP:macaca-test-sample-master admin$
admindeMBP:macaca-test-sample-master admin$
admindeMBP:macaca-test-sample-master admin$ sudo chown -R admin /usr/local
Password:
admindeMBP:macaca-test-sample-master admin$ macaca run --verbose
index.js:93:12 [master] pid:3226 webdriver server start with config:
{ port: 3456,
window: true,
ip: '0.0.0.0',
host: 'admindeMacBook-Pro.local',
loaded_time: '2016-05-09 10:16:27' }
middlewares.js:30:10 [master] pid:3226 base middlewares attached
router.js:117:10 [master] pid:3226 router set
webdriver sdk launched

macaca desktop sample

responseHandler.js:24:12 [master] pid:3226 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3226 Creating session, sessionId: ffbf9fe3-b171-44c5-b268-33201703d766.
helper.js:205:12 [master] pid:3226 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:3226 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:3226 Shutdown simulator 2B47D1C8-0E80-4820-8000-0509B7DC01CF failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "2B47D1C8-0E80-4820-8000-0509B7DC01CF"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:3226 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:3226 xcode version: 7.3.1
xctest-client.js:158:16 [master] pid:3226 bootstrap exit with code: 1, signal: null
responseHandler.js:63:12 [master] pid:3226 Send Error Respone to Client: undefined

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/responseHandler.js:66:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:369:9)

xctest-client.js:150:16 [master] pid:3226 tail: /Users/admin/Library/Logs/CoreSimulator/2B47D1C8-0E80-4820-8000-0509B7DC01CF/system.log: No such file or directory

1) "before all" hook

responseHandler.js:24:12 [master] pid:3226 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:3226 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:3226 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3226 Creating session, sessionId: 67986dd4-cf46-49a0-92b2-65fcfa35724e.
helper.js:205:12 [master] pid:3226 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:3226 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:3226 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:3226 xcode version: 7.3.1
xctest-client.js:219:14 [master] pid:3226 2016-05-09 10:17:40.233 xcodebuild[3364:70199] [MT] IDETestOperationsObserverDebug: (E40CDF7F-5622-455D-BB37-463C134015AA) Beginning test session E40CDF7F-5622-455D-BB37-463C134015AA with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7ff14c72a8d0> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

xctest-client.js:219:14 [master] pid:3226 2016-05-09 10:17:40.240 xcodebuild[3277:69030] [MT] IDETestOperationsObserverDebug: (54F8E329-82D8-46FC-8E2D-BD6574F7422B) Beginning test session 54F8E329-82D8-46FC-8E2D-BD6574F7422B with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7ff97ad7c6c0> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

xctest-client.js:219:14 [master] pid:3226 2016-05-09 10:17:40.250 xcodebuild[3364:70209] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/22503484-3171-43D3-AB81-8121D232E8D7/Session-2016-05-09_10:17:40-rWpoQ0.log

xctest-client.js:219:14 [master] pid:3226 2016-05-09 10:17:40.251 xcodebuild[3277:70309] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/837D7BD5-39AA-4B1F-95F4-C79136DE6C3D/Session-2016-05-09_10:17:40-MAAoxR.log

xctest-client.js:219:14 [master] pid:3226
Testing failed:
Command /bin/sh failed with exit code 1
** TEST FAILED **

xctest-client.js:219:14 [master] pid:3226
The following build commands failed:
PhaseScriptExecution Copy\ Pods\ Resources /Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Build/Intermediates/WebDriverAgent.build/Debug-iphonesimulator/XCTUITestRunner.build/Script-84E99BA5A11D6EF368DAFB3C.sh
(1 failure)

xctest-client.js:227:14 [master] pid:3226 xctest client exit with code: 65, signal: null
responseHandler.js:24:12 [master] pid:3226 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3226 Creating session, sessionId: 669d34d9-f40a-4327-82cc-476c98a5298b.
helper.js:205:12 [master] pid:3226 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:3226 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
xctest-client.js:219:14 [master] pid:3226 ** TEST FAILED **

xctest-client.js:227:14 [master] pid:3226 xctest client exit with code: 65, signal: null
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:3226 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:3226 xcode version: 7.3.1
xctest-client.js:219:14 [master] pid:3226 2016-05-09 10:19:39.241 xcodebuild[3514:72651] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/558D79BE-1B0C-4F62-BC17-0C711F8CEF43/Session-2016-05-09_10:19:39-DoNtyt.log

xctest-client.js:219:14 [master] pid:3226 2016-05-09 10:19:39.241 xcodebuild[3514:72224] [MT] IDETestOperationsObserverDebug: (D2FDFE3B-AEC3-41FF-A9CD-DB5B93132C9C) Beginning test session D2FDFE3B-AEC3-41FF-A9CD-DB5B93132C9C with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7f9f2c45e300> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

responseHandler.js:24:12 [master] pid:3226 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3226 Creating session, sessionId: 6da9bb29-b0d0-40ec-be39-793c9124be29.
helper.js:205:12 [master] pid:3226 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:3226 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
xctest-client.js:219:14 [master] pid:3226 ** TEST FAILED **

xctest-client.js:227:14 [master] pid:3226 xctest client exit with code: 65, signal: null
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:3226 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:3226 xcode version: 7.3.1
xctest-client.js:219:14 [master] pid:3226 2016-05-09 10:21:45.568 xcodebuild[3663:74498] [MT] IDETestOperationsObserverDebug: (8716F81C-E12B-423F-91C0-39D4235E22E2) Beginning test session 8716F81C-E12B-423F-91C0-39D4235E22E2 with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7fb63bccb5e0> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

xctest-client.js:219:14 [master] pid:3226 2016-05-09 10:21:45.569 xcodebuild[3663:74912] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/19C16D3E-87FF-40AD-AC82-33D51CF06CF9/Session-2016-05-09_10:21:45-kmFUwp.log

3) "before all" hook

responseHandler.js:24:12 [master] pid:3226 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:3226 Send HTTP Respone to Client: 405 Method Not Allowed
4) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:3226 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3226 Creating session, sessionId: 37229000-2503-4c1c-a30b-d4a4e3fd958f.
helper.js:205:12 [master] pid:3226 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:3226 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:3226 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:3226 xcode version: 7.3.1
xctest-client.js:158:16 [master] pid:3226 bootstrap exit with code: 1, signal: null
responseHandler.js:63:12 [master] pid:3226 Send Error Respone to Client: undefined

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/responseHandler.js:66:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:369:9)

xctest-client.js:150:16 [master] pid:3226 tail: /Users/admin/Library/Logs/CoreSimulator/2B47D1C8-0E80-4820-8000-0509B7DC01CF/system.log: No such file or directory

5) "before all" hook

responseHandler.js:24:12 [master] pid:3226 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:3226 Send HTTP Respone to Client: 405 Method Not Allowed
6) "after all" hook

0 passing (6m)
6 failing

  1. macaca desktop sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)
  1. macaca desktop 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

  2. macaca mobile sample "before all" hook:
    Error: timeout of 300000ms exceeded. Ensure the done() callback is being called in this test.

  1. 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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)
  1. macaca mobile sample "before all" hook:
    [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"})] The environment you requested was unavailable.
    Error: [init({"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"app/ios-app-bootstrap.zip"})] 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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913: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. (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. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/webdriver-client/node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:913:12)

Test completed!
admindeMBP:macaca-test-sample-master admin$ clean
-bash: clean: command not found
admindeMBP:macaca-test-sample-master admin$ clear

admindeMBP:macaca-test-sample-master admin$ macaca run --verbose

index.js:93:12 [master] pid:3874 webdriver server start with config:
{ port: 3456,
window: true,
ip: '0.0.0.0',
host: 'admindeMacBook-Pro.local',
loaded_time: '2016-05-09 10:29:19' }
middlewares.js:30:10 [master] pid:3874 base middlewares attached
router.js:117:10 [master] pid:3874 router set
webdriver sdk launched

macaca desktop sample

responseHandler.js:24:12 [master] pid:3874 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3874 Creating session, sessionId: 295b5f1d-2553-46a0-b662-158a66de3c26.
helper.js:205:12 [master] pid:3874 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:3874 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
macaca-ios.js:220:12 [master] pid:3874 Shutdown simulator 2B47D1C8-0E80-4820-8000-0509B7DC01CF failed Error: Command failed: /bin/sh -c xcrun simctl shutdown "2B47D1C8-0E80-4820-8000-0509B7DC01CF"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Unable to shutdown device in current state: Shutdown

agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:3874 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:3874 xcode version: 7.3.1
xctest-client.js:150:16 [master] pid:3874 tail: /Users/admin/Library/Logs/CoreSimulator/2B47D1C8-0E80-4820-8000-0509B7DC01CF/system.log: No such file or directory

xctest-client.js:158:16 [master] pid:3874 bootstrap exit with code: 1, signal: null
responseHandler.js:63:12 [master] pid:3874 Send Error Respone to Client: undefined

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/responseHandler.js:66:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:369:9)

1) "before all" hook

responseHandler.js:24:12 [master] pid:3874 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:32:14 [master] pid:3874 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook

macaca mobile sample

responseHandler.js:24:12 [master] pid:3874 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3874 Creating session, sessionId: bf9867d9-f19b-4ac3-9345-a81e15d8af73.
helper.js:205:12 [master] pid:3874 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:3874 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:3874 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:3874 xcode version: 7.3.1
xctest-client.js:219:14 [master] pid:3874 2016-05-09 10:30:14.336 xcodebuild[3925:78585] [MT] IDETestOperationsObserverDebug: (BEED8704-4D80-4FBF-896B-213AA02A317D) Beginning test session BEED8704-4D80-4FBF-896B-213AA02A317D with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7ff6bb5167e0> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

xctest-client.js:219:14 [master] pid:3874 2016-05-09 10:30:14.408 xcodebuild[3925:79259] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/9B1987F9-BAF5-4BCB-8DDE-2205ABFA298E/Session-2016-05-09_10:30:14-uyD1wL.log

xctest-client.js:219:14 [master] pid:3874 2016-05-09 10:30:14.518 xcodebuild[3998:79296] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/836399FA-CA7F-4FCC-A785-4E69258A4E59/Session-2016-05-09_10:30:14-JGYAyo.log
2016-05-09 10:30:14.518 xcodebuild[3998:79175] [MT] IDETestOperationsObserverDebug: (F03C2448-B740-498C-8183-7B7F881DD5F3) Beginning test session F03C2448-B740-498C-8183-7B7F881DD5F3 with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7feaac598df0> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

responseHandler.js:24:12 [master] pid:3874 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3874 Creating session, sessionId: dedef3a8-9b81-46f3-922b-7f7cf281173d.
helper.js:205:12 [master] pid:3874 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
macaca-ios.js:181:10 [master] pid:3874 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
xctest-client.js:219:14 [master] pid:3874
Testing failed:

xctest-client.js:219:14 [master] pid:3874 Rm: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/Resources/WebDriverAgent.bundle: No such file or directory
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
** TEST FAILED **

xctest-client.js:227:14 [master] pid:3874 xctest client exit with code: 65, signal: null
xctest-client.js:219:14 [master] pid:3874
Testing failed:

xctest-client.js:219:14 [master] pid:3874 Test target XCTUITestRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **

xctest-client.js:227:14 [master] pid:3874 xctest client exit with code: 65, signal: null
agent path: /usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
macaca-ios.js:131:10 [master] pid:3874 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"platformVersion": "9.3",
"app": "/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"
}
xctest-client.js:246:12 [master] pid:3874 xcode version: 7.3.1
xctest-client.js:219:14 [master] pid:3874 2016-05-09 10:32:30.797 xcodebuild[4165:81559] [MT] IDETestOperationsObserverDebug: (E50AED9B-D6DB-47E2-B93E-8290207DB4F5) Beginning test session E50AED9B-D6DB-47E2-B93E-8290207DB4F5 with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7fe3a94131c0> {
SimDevice: SimDevice : iPhone 6s Plus (2B47D1C8-0E80-4820-8000-0509B7DC01CF) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))

xctest-client.js:219:14 [master] pid:3874 2016-05-09 10:32:30.881 xcodebuild[4165:81947] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/admin/Library/Developer/Xcode/DerivedData/WebDriverAgent-awzftkcqdhbxwscoabxyxnwjqjqc/Logs/Test/CF218D8B-3CC9-496C-8512-4E60ADA0C0F2/Session-2016-05-09_10:32:30-3mcrPc.log

responseHandler.js:24:12 [master] pid:3874 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 6s Plus","app":"/Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip"}}
session.js:24:10 [master] pid:3874 Creating session, sessionId: 31975fb8-1b8c-492f-b803-e9e2bd9d3213.
helper.js:205:12 [master] pid:3874 Unzipping local app form /Users/admin/Downloads/macaca-test-sample-master/app/ios-app-bootstrap.zip
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/Info.plist
proxy.js:67:14 [master] pid:3874 Proxy: /session:POST to http://:8100/session:POST with body: {"desiredCapabilities":{"bundleId":"xudafeng.ios-app-bootstrap","platformName":"iOS","platformVersion":"9.3","app":"/var/folders/dh/fvsjmhs56jx_yn2j4hdzwhym0000gn/T/ios-app-bootstrap.app/"}}
macaca-ios.js:181:10 [master] pid:3874 Get available devices [{"name":"iPhone 4s","udid":"C5590B3A-7571-425C-9CC9-92C0997EB0DB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5","udid":"440FC1A8-D843-4136-B233-659F632D6C2E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 5s","udid":"6F898BC1-B45A-4CE1-9A9C-B720FB1DEBCD","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6","udid":"D0464A88-230B-41BE-803D-13FCD27EBAC0","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6 Plus","udid":"D379E69D-2D45-4AA9-B23E-C5E7DA1EA3FB","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s","udid":"9F00E9A0-6C8F-4061-B4F6-1EA9F4FA852C","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPhone 6s Plus","udid":"2B47D1C8-0E80-4820-8000-0509B7DC01CF","state":"Booted","available":true,"runtime":"iOS 9.3"},{"name":"iPad 2","udid":"970D52B4-08EF-4FC5-8FC5-2A4D731EEB53","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Retina","udid":"B23C8F64-968F-4BAC-B40C-772F3A3BA2B7","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air","udid":"79A9E064-7F63-4F9B-9083-105CC436F8C6","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Air 2","udid":"43303CBD-5C14-41D1-8FA4-85D1E74E688E","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"iPad Pro","udid":"F8446078-97E1-4924-9306-1B6B3AE605F9","state":"Shutdown","available":true,"runtime":"iOS 9.3"},{"name":"Apple TV 1080p","udid":"C5EC5A2A-3AF4-4412-98FA-352B2F5A624C","state":"Shutdown","available":true,"runtime":"tvOS 9.2"},{"name":"Apple Watch - 38mm","udid":"C1E12FD1-B082-4FFE-9860-E468A0F276F5","state":"Shutdown","available":true,"runtime":"watchOS 2.2"},{"name":"Apple Watch - 42mm","udid":"57D8E2CB-15DA-454B-934C-8465CA2AC0C7","state":"Shutdown","available":true,"runtime":"watchOS 2.2"}]
proxy.js:71:18 [master] pid:3874 xctest client proxy error with: Error: socket hang up
/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:162
throw new Error(res);
^

Error: >> proxy.js:71:18 [master] pid:3874 xctest client proxy error with: Error: socket hang up
at Logger.error (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:162:9)
at Request._callback (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/lib/proxy.js:71:18)
at self.callback (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:199:22)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at Request.onRequestError (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/node_modules/node-installer/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:821:8)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketOnEnd (_http_client.js:292:9)
at emitNone (events.js:72:20)
at Socket.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:913:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
admindeMBP:macaca-test-sample-master admin$
`

真机跑脚本Internal Server Error

我的脚本如下
const path = require('path');
const wd = require('wd'); // 引用 wd 模块

describe('macaca mobile sample', function() {
this.timeout(5 * 60 * 1000); // mocha 设置超时时间

var driver = wd.promiseChainRemote({ // 初始化 webdriver
host: 'localhost',
port: 3456
});

before(function() {
return driver.init({
platformName: 'iOS',
udid: 'd8f6f0875320116fc5946b020a84b6dccba9d815',
bundleId: 'com.mosheberman.Surfboard'
});
});

after(function() { // 所有测试用例的统一后置动作
return driver
.sleep(1000)
.quit();
});

it('#1 should login success', function() {
return driver
.elementByName('Tap Here To Surf Again')
.click()
.sleep(3000)
.takeScreenshot(path);

});

});

下面是错误

Last login: Tue Apr 12 15:53:23 on ttys000
clydeiMac:~ cly$ cd /Users/cly/Desktop/macaca-test/
clydeiMac:macaca-test cly$ make test
platform= macaca run --server --verbose



index.js:62:12 [master] pid:39068 webdriver server start with config:
{ port: 3456,
ip: '192.168.3.70',
host: 'clydeiMac.local',
loaded_time: '2016-04-12 16:06:34' }
middlewares.js:31:10 [master] pid:39068 base middlewares attached
router.js:101:10 [master] pid:39068 router set
webdriver sdk launched

macaca mobile sample
responseHandler.js:24:12 [master] pid:39068 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"iOS","udid":"d8f6f0875320116fc5946b020a84b6dccba9d815","bundleId":"com.mosheberman.Surfboard","browserName":"firefox","version":"","javascriptEnabled":true,"platform":"ANY"}}
session.js:22:10 [master] pid:39068 Creating session, sessionId: a4307991-cae2-4656-8e5b-5e6296358984.
responseHandler.js:56:12 [master] pid:39068 Send Error Respone to Client TypeError: Cannot read property 'substring' of undefined
responseHandler.js:62:14 [master] pid:39068 TypeError: Cannot read property 'substring' of undefined
at Function..sleep..retry..waitForCondition..exec..spawn.child.on..configApp (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/common/helper.js:174:10)
at WebdriverServer.start (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/index.js:39:16)
at next (native)
at onFulfilled (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:65:19)
at /Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
at Object.co (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:50:10)
at Object.toPromise (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:118:63)
at next (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:99:29)
at onFulfilled (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:69:7)
at /Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
at Object.co (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:50:10)
at Object.toPromise (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:118:63)
at next (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:99:29)
at onFulfilled (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:69:7)
at /Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
at Object.co (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:50:10)
responseHandler.js:81:14 [master] pid:39068 Unexcepted error TypeError

InternalServerError: Internal Server Error
at Object.module.exports.throw (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/responseHandler.js:82:17)
at throw (native)
at onRejected (/Users/cly/.nvm/versions/node/v4.4.0/lib/node_modules/macaca-client/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:369:9)

  1. "before all" hook
    responseHandler.js:24:12 [master] pid:39068 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
    responseHandler.js:48:14 [master] pid:39068 Send HTTP Respone to Client: {"sessionId":"","status":0}

0 passing (4s)
1 failing

  1. macaca mobile sample "before all" hook:
    Error: [init({"platformName":"iOS","udid":"d8f6f0875320116fc5946b020a84b6dccba9d815","bundleId":"com.mosheberman.Surfboard"})] The environment you requested was unavailable.
    at endReadableNT (_stream_readable.js:905:12)

Test completed!

手势密码解锁问题

Thanks for wanting to report an issue you've found in Macaca. Please fill in the template below by replacing the html comments with an appropriate answer.

Macaca Version: usually output of macaca -v
Macaca Doctor: usually output of macaca doctor
Platform: either uname -a output, or if Windows, version and 32 or 64-bit.

Thank you!
-->

  • Macaca Version:
    1.0.24
  • Macaca Doctor: 正常
  • Platform:Mac

ios上的手势密码,要求四点链接,整个控件为一个整体的控件,点击任何一个点,都无法获得坐标,只有点击上去才能触发成功,然后才能操作四点链接,该类问题,如何解决?谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.