macacajs / NoSmoke

A cross platform UI crawler which scans view trees then generate and execute UI test cases.
https://macacajs.github.io/NoSmoke
MIT License
198 stars 57 forks source link

android默认配置无法启动app #31

Closed gaoyuan2013 closed 6 years ago

gaoyuan2013 commented 6 years ago

[nodemon] 1.11.0 [nodemon] to restart at any time, enter rs [nodemon] watching: . [nodemon] starting node ./bin/nosmoke -s udid: undefined

NoSmoke start at: http://30.28.177.76:5678 ----> silent mode <------- <-- GET / { stats: { suites: 0, tests: 0, passes: 3, pending: 0, failures: 0, start: 2017-10-26T07:45:04.968Z, passPercent: 50, pendingPercent: 0, other: 0, hasOther: false, skipped: 1, hasSkipped: true, duration: 14523, end: 2017-10-26T07:45:04.968Z }, suites: { title: '', ctx: {}, suites: [], tests: [], pending: [], _beforeEach: [], _beforeAll: [], _afterEach: [], _afterAll: [], root: true, _timeout: 2000, _enableTimeouts: true, _slow: 75, _retries: -1, delayed: false, _events: { 'pre-require': [] }, _eventsCount: 1, uuid: 'xxxxxxxxxxx', fullFile: '', file: '', passes: [], failures: [], skipped: [], totalTests: 0, totalPasses: 0, totalFailures: 0, totalPending: 0, totalSkipped: 0, duration: 0, _totalTime: 14523 }, current: { image: 'https://macacajs.github.io/macaca-logo/svg/monkey.svg', list: [ [Object], [Object], [Object] ] } } { name: 'macaca-reporter', fileName: 'index.html', assetsInline: true, dataAttr: 'data-output', configAttr: 'config-output', distDir: 'C:\auto\NoSmoke-master\NoSmoke-master', socket: { server: 'http://30.28.177.76:56788' } } reporter generated: C:\auto\NoSmoke-master\NoSmoke-master\reports\index.html --> GET / 200 socket connected (node:67976) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): FetchError: invalid json response body at http://localhost:3456/wd/hub/session reason: Unexpected token I in JSON at position 0

helper.js:176:12 [master] pid:65136 Using local app form C:\Users\YOYO.macaca-temp\and roid_app_bootstrap-debug.apk uiautomator-client.js:30:12 [master] pid:65136 Error: Command failed: C:\gaoyuan\sdk/pl atform-tools/adb -s a7daaba shell "pm clear "com.macaca.android.testing"" Failed

at ChildProcess.exithandler (child_process.js:198:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)

responseHandler.js:56:12 [master] pid:65136 Send Error Respone to Client: Error: Comman d failed: C:\gaoyuan\sdk/platform-tools/adb -s a7daaba push C:\Users\YOYO\AppData\Roaming\ npm\node_modules\macaca-android\node_modules\uiautomatorwd\app\build\outputs\apk\app-debug .apk /data/local/tmp/com.macaca.android.testing

responseHandler.js:62:14 [master] pid:65136 Error: Command failed: C:\gaoyuan\sdk/platf orm-tools/adb -s a7daaba push C:\Users\YOYO\AppData\Roaming\npm\node_modules\macaca-androi d\node_modules\uiautomatorwd\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.macac a.android.testing

at ChildProcess.exithandler (child_process.js:198:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)

Error: Command failed: C:\gaoyuan\sdk/platform-tools/adb -s a7daaba push C:\Users\YOYO\A ppData\Roaming\npm\node_modules\macaca-android\node_modules\uiautomatorwd\app\build\output s\apk\app-debug.apk /data/local/tmp/com.macaca.android.testing

  at ChildProcess.exithandler (child_process.js:198:12)
  at emitTwo (events.js:106:13)
  at ChildProcess.emit (events.js:191:7)
  at maybeClose (internal/child_process.js:920:16)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)

求大神指导。

SamuelZhaoY commented 6 years ago

请问现在使用的真机 还是模拟器, 系统版本, 另外可否看一下你的配置文件