GithubHelp home page GithubHelp logo

macaca-sample / sample-nodejs Goto Github PK

View Code? Open in Web Editor NEW
44.0 10.0 41.0 189 KB

Macaca test sample for Node.js

Home Page: https://macacajs.github.io

License: MIT License

JavaScript 97.13% HTML 2.87%
macaca ios android automation desktop sample hacktoberfest

sample-nodejs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sample-nodejs's Issues

I can not connect to my phone(android platform)!

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?

Run make test-ios-safari test,no test executed

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

npm run test:android 报错

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.