#21 楼 @xdf
cmd@cmd-PC MINGW64 /d/macaca/macaca-test-sample-master/macaca-test
$ macaca run -d /d/macaca/macaca-test-sample-master/macaca-test/macaca-desktop-sample.test.js --verbose
index.js:17:12 [master] pid:6560 webdriver server start with config:
{ port: 3456,
window: true,
ip: '169.254.166.89',
host: 'cmd-PC',
loaded_time: '2016-07-21 10:15:07' }
middlewares.js:17:10 [master] pid:6560 base middlewares attached
router.js:108:10 [master] pid:6560 router set
webdriver sdk launchedmacaca desktop sample
responseHandler.js:11:12 [master] pid:6560 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"browserName":"chrome","platformName":"desktop","version":"","javascriptEnabled":true,"platform":"ANY"}}
session.js:47:10 [master] pid:6560 Creating session, sessionId: 769ed0d9-e4bb-48ef-80ec-a1f5335a318d.
session.js:31:14 [master] pid:6560 Error: Cannot find module 'macaca-chrome'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at detectDevice (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\webdriver-server\lib\server\controllers\session.js:28:20)
at Object.createDevice (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\webdriver-server\lib\server\controllers\session.js:10:18)
at next (native)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:65:19)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
please run:macaca install chrome
responseHandler.js:50:12 [master] pid:6560 Send Error Respone to Client: TypeError: Cannot set property 'proxyMode' of undefined
responseHandler.js:56:14 [master] pid:6560 TypeError: Cannot set property 'proxyMode' of undefined
at Object.createDevice (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\webdriver-server\lib\server\controllers\session.js:16:20)
at next (native)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:65:19)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
at Object.toPromise (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:118:63)
at next (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:99:29)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:69:7)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
TypeError: Cannot set property 'proxyMode' of undefined
at Object.createDevice (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\webdriver-server\lib\server\controllers\session.js:16:20)
at next (native)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:65:19)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
at Object.toPromise (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:118:63)
at next (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:99:29)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:69:7)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
1) "before all" hook
responseHandler.js:11:12 [master] pid:6560 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:19:14 [master] pid:6560 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook0 passing (124ms)
2 failing
1) macaca desktop sample "before all" hook:
Error: [init({"autoAcceptAlerts":true,"browserName":"chrome","platformName":"desktop"})] The environment you requested was unavailable.
at D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\webdriver.js:134:15
at Request._callback (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\http-utils.js:87:7)
at Request.self.callback (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:368:22)
at Request. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:1219:14)
at IncomingMessage. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:1167:12)
at endReadableNT (_stream_readable.js:921:12)2) macaca desktop sample "after all" hook:
Error: [quit()] Unexpected data in simpleCallback.
at exports.newError (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\utils.js:139:13)
at null. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\callbacks.js:42:12)
at cb (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\webdriver.js:165:22)
at D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\webdriver.js:179:5
at Request._callback (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\http-utils.js:87:7)
at Request.self.callback (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:368:22)
at Request. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:1219:14)
at IncomingMessage. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:1167:12)
at endReadableNT (_stream_readable.js:921:12)Test completed!
#19 楼 @xdf
cmd@cmd-PC MINGW64 /d/macaca/macaca-test-sample-master/macaca-test
$ macaca run
webdriver sdk launched
D:\nodejs\node-global\node_modules\macaca-cli\node_modules\mocha\lib\utils.js:628
throw new Error("cannot resolve path (or pattern) '" + path + "'");
^
Error: cannot resolve path (or pattern) 'macaca-test'
at Object.lookupFiles (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\mocha\lib\utils.js:628:15)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\mocha\bin_mocha:326:30
at Array.forEach (native)
at Object. (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\mocha\bin_mocha:325:6)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
Test completed!
#3 楼 @alison2012win 你好 windonws 下 gitbash 也就是 MINGW64 命令行窗口下,怎么安装 make 命令呢?
你好 @xdf
我下载了 macaca-test-sample-master.zip 样例 但是执行的时候是如此。
D:\macaca\macaca-test-sample-master\macaca-test 的目录
2016/07/13 23:16
.D:\macaca\macaca-test-sample-master\macaca-test>platform=android macaca run --verbose -d macaca-desktop-sample.test.js
'platform' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
D:\macaca\macaca-test-sample-master\macaca-test>macaca run --verbose -d macaca-desktop-sample.test.js
index.js:17:12 [master] pid:14388 webdriver server start with config:
{ port: 3456,
window: true,
ip: '169.254.166.89',
host: 'cmd-PC',
loaded_time: '2016-07-19 11:33:19' }
middlewares.js:17:10 [master] pid:14388 base middlewares attached
router.js:105:10 [master] pid:14388 router set
webdriver sdk launchedmacaca desktop sample
responseHandler.js:11:12 [master] pid:14388 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"browserName":"chrome","platformName":"desktop","version":"","javascriptEnabled":true,"platform":"ANY"}}
session.js:47:10 [master] pid:14388 Creating session, sessionId: 50828aa2-0d56-47f5-8237-5efc1a7907dc.
session.js:31:14 [master] pid:14388 Error: Cannot find module 'macaca-chrome'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at detectDevice (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\webdriver-server\lib\server\controllers\session.js:28:20)
at Object.createDevice (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\webdriver-server\lib\server\controllers\session.js:10:18)
at next (native)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:65:19)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
please run:macaca install chrome
responseHandler.js:50:12 [master] pid:14388 Send Error Respone to Client: TypeError: Cannot set property 'proxyMode' of undefined
responseHandler.js:56:14 [master] pid:14388 TypeError: Cannot set property 'proxyMode' of undefined
at Object.createDevice (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\webdriver-server\lib\server\controllers\session.js:16:20)
at next (native)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:65:19)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
at Object.toPromise (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:118:63)
at next (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:99:29)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:69:7)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
TypeError: Cannot set property 'proxyMode' of undefined
at Object.createDevice (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\webdriver-server\lib\server\controllers\session.js:16:20)
at next (native)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:65:19)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
at Object.toPromise (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:118:63)
at next (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:99:29)
at onFulfilled (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:69:7)
at D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:54:5
at Object.co (D:\nodejs\node-global\node_modules\macaca-cli\node_modules\co\index.js:50:10)
1) "before all" hook
responseHandler.js:11:12 [master] pid:14388 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:19:14 [master] pid:14388 Send HTTP Respone to Client: 405 Method Not Allowed
2) "after all" hook0 passing (361ms)
2 failing
1) macaca desktop sample "before all" hook:
Error: [init({"autoAcceptAlerts":true,"browserName":"chrome","platformName":"desktop"})] The environment you requested was unavailable.
at D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\webdriver.js:134:15
at Request._callback (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\http-utils.js:87:7)
at Request.self.callback (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:368:22)
at Request. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:1219:14)
at IncomingMessage. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:1167:12)
at endReadableNT (_stream_readable.js:913:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
2) macaca desktop sample "after all" hook:
Error: [quit()] Unexpected data in simpleCallback.
at exports.newError (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\utils.js:139:13)
at null. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\callbacks.js:42:12)
at cb (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\webdriver.js:165:22)
at D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\webdriver.js:179:5
at Request._callback (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\wd\lib\http-utils.js:87:7)
at Request.self.callback (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:368:22)
at Request. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:1219:14)
at IncomingMessage. (D:\macaca\macaca-test-sample-master\node_modules\macaca-wd\node_modules\request\request.js:1167:12)
at endReadableNT (_stream_readable.js:913:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Test completed!
@xdf 已提交到 github issues 下 盼指正回复。
win10 平台下 安装不了 android 和 ios 啊 求指点 以下是我机器环境相关和安装日志输出
C:\Users\cmd>macaca --registry http://registry.cnpmjs.org install chrome
http://registry.cnpmjs.org driver is not support yet
C:\Users\cmd>npm -v
3.8.7
C:\Users\cmd>node -v
v5.10.1
C:\Users\cmd>appium -v
1.5.3
C:\Users\cmd>macaca install android
macaca-android is installing for the first time with args: ["install","macaca-android","-—global","--registry=https://registry.npmjs.org/"]
/ loading...macaca-cli@1.0.36 D:\nodejs\node-global\node_modules\macaca-cli
`-- macaca-android@1.0.16 extraneous
npm WARN deprecated win-spawn@2.0.0: use cross-spawn or cross-spawn-async instead.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "macaca-android" "-—global" "--registry=https://registry.npmjs.org/"
npm ERR! node v5.10.1
npm ERR! npm v3.8.7
npm ERR! path D:\nodejs\node-global\node_modules\macaca-cli
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename
npm ERR! EBUSY: resource busy or locked, rename 'D:\nodejs\node-global\node_modules\macaca-cli' -> 'D:\nodejs\node-global\node_modules.macaca-cli.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! D:\nodejs\node-global\node_modules\macaca-cli\npm-debug.log
npm install exited with code 4294963214 and signal null
install macaca-android failed with Error: npm WARN deprecated win-spawn@2.0.0: use cross-spawn or cross-spawn-async instead.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "macaca-android" "-—global" "--registry=https://registry.npmjs.org/"
npm ERR! node v5.10.1
npm ERR! npm v3.8.7
npm ERR! path D:\nodejs\node-global\node_modules\macaca-cli
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename
npm ERR! EBUSY: resource busy or locked, rename 'D:\nodejs\node-global\node_modules\macaca-cli' -> 'D:\nodejs\node-global\node_modules.macaca-cli.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! D:\nodejs\node-global\node_modules\macaca-cli\npm-debug.log
C:\Users\cmd>npm config get registry
http://registry.cnpmjs.org/
C:\Users\cmd>macaca doctor
Node.js checklist:
node env: D:\nodejs\node.exe
node version: v5.10.1
Android checklist:
JAVA version is 1.8.0_91
JAVA_HOME is set to C:\Program Files\Java\jdk1.8.0_91
ANDROID_HOME is set to D:\Android\android-sdk-windows
Platforms is set to D:\Android\android-sdk-windows\platforms\android-24
Android tools is set to D:\Android\android-sdk-windows\tools\android.bat
ANT_HOME is set to D:\apache-ant-1.9.7
C:\Users\cmd>macaca install ios
macaca-ios is installing for the first time with args: ["install","macaca-ios","-—global","--registry=https://registry.npmjs.org/"]
| loading...macaca-cli@1.0.36 D:\nodejs\node-global\node_modules\macaca-cli
`-- macaca-ios@1.0.30 extraneous
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "macaca-ios" "-—global" "--registry=https://registry.npmjs.org/"
npm ERR! node v5.10.1
npm ERR! npm v3.8.7
npm ERR! path D:\nodejs\node-global\node_modules\macaca-cli
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename
npm ERR! EBUSY: resource busy or locked, rename 'D:\nodejs\node-global\node_modules\macaca-cli' -> 'D:\nodejs\node-global\node_modules.macaca-cli.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! D:\nodejs\node-global\node_modules\macaca-cli\npm-debug.log
npm install exited with code 4294963214 and signal null
install macaca-ios failed with Error: npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "macaca-ios" "-—global" "--registry=https://registry.npmjs.org/"
npm ERR! node v5.10.1
npm ERR! npm v3.8.7
npm ERR! path D:\nodejs\node-global\node_modules\macaca-cli
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename
npm ERR! EBUSY: resource busy or locked, rename 'D:\nodejs\node-global\node_modules\macaca-cli' -> 'D:\nodejs\node-global\node_modules.macaca-cli.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! D:\nodejs\node-global\node_modules\macaca-cli\npm-debug.log
这作者头像不是网易胖编吗?
@lwut0n9 楼主 我也是https://nodejs.org/en/ 下载的 node-v5.10.1-linux-x64.tar.xz 解压到/opt/nodejs/
下 然后添加环境 PATH 的方式来安装的 node.js 现在发现官网又更新到 node-v6.0.0-linux-x64.tar.xz 了。
现在问题来了,这种编译好的二进制包,更新不太方便啊。想卸载/opt/nodejs 下的 sudo rm -rf /opt/nodejs 就行了吗? 然后再解压 v6.0?
我就问 PPA 更新源的方式
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
这种安装后,再安装 appium 会有什么问题吗?
@young_roy
请问 win 平台下的 chrome://apps 里的 postman 为什么找不到代理设置的地方?
@seveniruby 我看了下扫描结果文件夹下的图片,仔细对比了下 app 应用,发现只是遍历 native 原生 android 框架吗?
然后对首页的焦点展示图 向右滑动 访问了第二个焦点的链接,并向下滑动浏览然后回退再浏览。
我想知道的是,怎么自己控制这些遍历业务流程? 哦 还有扫描出来的 freemind.mm 文件打开是报错的 用的是最新的 FreeMind-Windows-Installer-1.0.0-min.1185392965.exe 打开的。xmind 想打开也保错了。
扫描后 freemind.mm 用 freemind 打开报错了
Error while parsing file:freemind.main.XMLParseException: XML Parse Exception during parsing of a map element at line 2: Expected: =
@seveniruby 求解答,为什么提示我找不到包?
win10 和 ubuntu14.04 下不支持吗?
win10 下可以了,原来 -o 参数后边接的 apk 路径 必须是绝对路径,我说楼主 你也不说明白。。。。。
@kinget007 大神你好 签入 github 上的代码再看了,遇到些问题 想咨询下 能否给个联系 QQ 呢
总结的相当全面,给个赞~~··
这个也是基于 selenium webdriver 等底层 api 自己封装的一套语法吧?
#26 楼 @lihuazhang 两条路走,一条自己内部挖掘培养 ,一条招聘。但也如你所说也基本为了 money 或有心的想更大发展,或学到些就跳走了。行业很浮躁,水涨船高的很快。泥沙俱下,相当部分人都觉的测试好做,混经验升级的人相当多。对自己有要求,自学沉淀下来的少。但来到 testehome,还是发现有相当多的业内翘楚人才的,分享的都很优秀。希望这个平台越办越好,给越来越多的测试人,指引明灯。
” 我们先来聊聊工作 10 多年的,这类人一般已经形成自己的测试习惯,注意我不说体系,因为很少有人有自己的测试体系。并坚持这样的习惯很多年。这类人固执,且坚持按自己的经验来做事情。我个人经历中,这类人通常是领域专家或者管理人员。如果不是,基本可以直接 reject,当然不排除真正狂热分子。“ 赞这句话!!!
总结的真好,说的都是实话真话。小弟不才也混成了个部门 leader,也负责面试。所以感同身受,真就是这么回事。3 年能做好黑盒测试用例设计,形成一套成熟个人测试体系和总结出习惯的人真的是凤毛。但是工资一个一个要的那可是真高。。。我也想给部门转型,招些有测试经验 + 脚本语言的都相当的难,要么皮毛 稍微还可以的 价格又过高,公司层面过不了。太低的又不能鼓捣起来,达不到预期。现在只能继续硬着头皮自己学。
期待开源版本和 windows 下版本,没 MAC 环境的飘过。。。