macaca-sample / sample-nodejs Goto Github PK
View Code? Open in Web Editor NEWMacaca test sample for Node.js
Home Page: https://macacajs.github.io
License: MIT License
Macaca test sample for Node.js
Home Page: https://macacajs.github.io
License: MIT License
I have built a macaca environment
`
Node.js checklist:
node env: /usr/local/bin/node
node version: v6.10.2
iOS checklist:
Xcode is uninstalled
xcodebuild version: 8.3.3
iproxy[usbmuxd] is installed at: /usr/local/bin/iproxy
ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy
carthage is installed, version: 0.24.0
Android checklist:
JAVA version is 1.8.0_111
JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
ANDROID_HOME is set to /Users/lijingjing/Documents/android-sdk-macosx
Platforms is set to /Users/lijingjing/Documents/android-sdk-macosx/platforms/android-25
ADB tool is set to /Users/lijingjing/Documents/android-sdk-macosx/platform-tools/adb
gradle is installed, version: 4.0
Installed driver list:
android: 2.0.31
chrome: 1.0.6
ios: 2.0.23
`
When I run the program, the following exception is thrown:
`
uiautomator-client.js:56:14 [master] pid:6408 INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.macaca.android.testing.test/android.support.test.runner.AndroidJUnitRunner}
uiautomator-client.js:56:14 [master] pid:6408 INSTRUMENTATION_STATUS_CODE: -1
uiautomator-client.js:56:14 [master] pid:6408 android.util.AndroidException: INSTRUMENTATION_FAILED: com.macaca.android.testing.test/android.support.test.runner.AndroidJUnitRunner
uiautomator-client.js:56:14 [master] pid:6408 at com.android.commands.am.Am.runInstrument(Am.java:676)
uiautomator-client.js:56:14 [master] pid:6408 at com.android.commands.am.Am.run(Am.java:119)
at com.android.commands.am.Am.main(Am.java:82)
uiautomator-client.js:56:14 [master] pid:6408
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
uiautomator-client.js:56:14 [master] pid:6408 at dalvik.system.NativeStart.main(Native Method)
`
How do i solve this problem?
安装项目依赖
npm ERR! code ETARGET
npm ERR! notarget No matching version found for microtemplate@^1.0.2.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
尝试microtemplate2也不可以
npm i microtemplate2
其中一个测试失败之后,就再也无法进行下去了,求怎么破,谢谢
I am following the steps listed here https://macacajs.github.io/zh/quick-start
when i run the test-ios-safari, 0 test have been executed, with the warrning
(node:53112) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Looks like the os.tmpDir has still been used in macaca-wd.
./node_modules/macaca-wd/wd/lib/tmp.js:42: tmpDir = os.tmpDir || _getTMPDir,
The detail log is listed
$ make test-ios-safari
macaca doctor
macaca-doctor version: 2.0.3
Node.js checklist:
node env: /usr/local/bin/node
node version: v8.9.1
iOS checklist:
Xcode Command Line Tools is ready, version: 2349.
xcodebuild version: 9.1
iproxy[usbmuxd] is installed at: /usr/local/bin/iproxy
ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy
carthage is installed, version: 0.26.2
Android checklist:
JAVA version is 1.8.0_152
JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home
ANDROID_HOME is set to /Users/Tao/Library/Android/sdk
Platforms is set to /Users/Tao/Library/Android/sdk/platforms/android-27
ADB tool is set to /Users/Tao/Library/Android/sdk/platform-tools/adb
gradle is installed, version: 4.3
Installed driver list:
ios: 2.0.29
browser=safari macaca run --verbose --reporter macaca-reporter -d ./macaca-test/mobile-browser-sample.test.js
index.js:18:12 [master] pid:53110 webdriver server start with config:
{ port: 3456,
verbose: false,
always: true,
window: true,
ip: '192.168.29.218',
host: 'Taos-MBP.T-mobile.com',
loaded_time: '2017-11-14 00:25:13' }
middlewares.js:17:10 [master] pid:53110 base middlewares attached
router.js:133:10 [master] pid:53110 router set
webdriver sdk launched
[ '/Users/Tao/workspace/sample-nodejs/node_modules/.bin/mocha',
'./macaca-test/mobile-browser-sample.test.js',
'--reporter',
'macaca-reporter',
'--colors',
'--verbose' ]
0 passing (1ms)
reporter generated: /Users/Tao/workspace/sample-nodejs/reports/index.html
(node:53112) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Test completed!
Please let me know if these sample test will still be maintain. Since i also have the issue with the app test.
Thank you very much
Tao
始终以超时结束
uiautomator-client.js:61:14 [master] pid:22400 D:\WorkSpace\Node\sample-nodejs\node_modules\uiautomatorwd\app\build\outputs\apk\androidTest\debug\app-debug-androidTest.apk not found, please resolve and r
einstall android driver
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.