Macaca 下载这个 macaca-test-sample-master 例子后,运行 macaca-mobile-sample.test.js 报错,请问如何解决?mocha 看了是安装好的啊,请高手指点下。

青雅 · 2017年03月01日 · 最后由 青雅 回复于 2017年03月02日 · 1977 次阅读

C:\Users\wqh\AppData\Roaming\npm\node_modules\macaca-cli\lib\run\index.js:45
throw err;
^

Error: Cannot find test framework "mocha" in C:\Users\wqh\macaca-test-sample-m
aster\macaca-test\node_modules
at Runner.initFramework (C:\Users\wqh\AppData\Roaming\npm\node_modules\mac
aca-cli\lib\run\index.js:72:13)
at co.then (C:\Users\wqh\AppData\Roaming\npm\node_modules\macaca-cli\lib\r
un\index.js:42:10)
at process._tickCallback (internal/process/next_tick.js:103:7)
at Function.Module.runMain (module.js:577:11)
at startup (node.js:160:18)
at node.js:449:3

共收到 4 条回复 时间 点赞

@xdf 升级了之后,还是报同样的错误啊?怎么搞呀?

win7 下使用 android 真机连接,报这个错,是什么回事呢?
1) macaca mobile sample "before all" hook:
[init({"autoAcceptAlerts":true,"platformName":"Android","udid":"177fc4b2","
pp":"C:\Users\weiqh\macaca-test-sample-master\app\android-app-bootstrap.zi
"})] connect ECONNREFUSED 127.0.0.1:3456
Error: connect ECONNREFUSED 127.0.0.1:3456
at Object.exports._errnoException (util.js:953:11)
at exports._exceptionWithHostPort (util.js:976:20)
at TCPConnectWrap.afterConnect as oncomplete

2) macaca mobile sample "after all" hook:
[quit()] connect ECONNREFUSED 127.0.0.1:3456
Error: connect ECONNREFUSED 127.0.0.1:3456
at Object.exports._errnoException (util.js:953:11)
at exports._exceptionWithHostPort (util.js:976:20)
at TCPConnectWrap.afterConnect as oncomplete
@xdf

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册