android 出错 Error: Cannot find test framework "mocha"
C:\Users\0.0>macaca doctor
macaca-doctor version: 1.1.4
Node.js checklist:
node env: D:\Program Files\nodejs\node.exe node version: v6.10.3
Android checklist:
JAVA version is 1.8.0_121
JAVA_HOME is set to D:\Program Files\Java\jdk1.8.0_121
ANDROID_HOME is set to D:\Android\sdk
Platforms is set to D:\Android\sdk\platforms\android-25
Android tools is set to D:\Android\sdk\tools\android.bat
ADB tool is set to D:\Android\sdk\platform-tools\adb.exe
GRADLE_HOME is set to C:\Users\0.0\.gradle\wrapper\dists\gradle-3.3-all\55gk2
rcmfc6p2dg9u9ohc3hw9\gradle-3.3
Installed driver list:
android: 2.0.0 chrome: 1.0.5 electron: 1.1.6
报错如下:
D:\TestStudioProjects\macaca-android-test-sample\macaca-test>macaca run myapp.te st.js --server
webdriver sdk launched C:\Users\0.0\AppData\Roaming\npm\node_modules\macaca-cli\lib\run\index.js:45 throw err; ^
Error: Cannot find test framework "mocha" in D:\TestStudioProjects\macaca-androi d-test-sample\macaca-test\node_modules at Runner.initFramework (C:\Users\0.0\AppData\Roaming\npm\node_modules\macac a-cli\lib\run\index.js:72:13) at co.then (C:\Users\0.0\AppData\Roaming\npm\node_modules\macaca-cli\lib\run \index.js:42:10) at process._tickCallback (internal/process/next_tick.js:109:7) at Module.runMain (module.js:606:11) at run (bootstrap_node.js:390:7) at startup (bootstrap_node.js:150:9) at bootstrap_node.js:505:3
@liubin-5288 you try to run test inside macaca test. Run the macac run command from root directory
for you case
D:\TestStudioProjects\macaca-android-test-sample>
Check whether the node modules folder exists before run.