Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run e2e on android device #122

Closed
thementos opened this issue Jul 18, 2016 · 6 comments
Closed

How to run e2e on android device #122

thementos opened this issue Jul 18, 2016 · 6 comments

Comments

@thementos
Copy link

I'm new for ionic. I want to know how can i use this sample to run test on real device or emu.
I try to test with appium on my device but test not start application it start chrome

this my config

exports.config = {
    seleniumAddress: 'http://localhost:4723/wd/hub',

    specs: [
        '../www/build/test/**/*.e2e.js'
    ],



    capabilities: {
        platformName: 'android',
        platformVersion: '5.0',
        deviceName: 'ASUS_Z00AD',
        browserName: "android",
        autoWebview: true,
        //CHANGE THIS TO YOUR ABSOLUTE PATH
        app: 'D:/Work Space/HappyMath/58HPM001/clicker.git/trunk/platforms/android/build/outputs/apk/android-debug.apk'
        //newCommandTimeout: 60
    },
    baseUrl: 'http://10.0.2.2:8000',

    onPrepare: function() {
      var wd = require('wd'),
          protractor = require('protractor'),
          wdBridge = require('wd-bridge')(protractor, wd);
      wdBridge.initFromProtractor(exports.config);
    },
@lathonez
Copy link
Owner

Hey,

Thanks for reaching out.

See #52. We haven't implemented a way of doing this yet, but it is on the list.

Personally I've never done anything with emulation before, let alone testing.

I encourage you to comment on #52 if you have any opinion or past experience with this. If you can lend a hand that would be great.

I will close this now as we have #52 already for emulation.

@thementos
Copy link
Author

Hi,

I have try to run e2e on Native Clicker (.apk). Now I can run it with appium (but not finish all)

  1. Use protractor.config.js from start issue
  2. On e2e test don't use "browser.get('')" because we don't want to open browser and tell protractor with "browser.ignoreSynchronization = true;"
  3. Build .apk (ionic build android). on this step I remove gulp.task "clean" because I want test in apk
  4. start appium
  5. run protractor "protractor test/protractor.config.js

but it will fail in "the left menu has a link with title Clickers" because in last test click "menu" and not toggle again then this test will fail

@lathonez
Copy link
Owner

lathonez commented Aug 8, 2016

Hi,

Thanks for the update on progress with this. As per my previous response emulation is still on the TODO list.

What's the exact output from your test failure? I may be able to help debug.

Thanks

@criesbeck
Copy link

#52 seems to be about Ripple, and what I have is more a direct follow-up to the above. I have created a version of Clicker that manages to get some tests running through Appium onto an Android emulator. Seven of twelve tests fail. The message for the first failure is

1) ClickerApp the left menu has a link with title Clickers
  - Failed: unknown error: Element is not clickable at point (32, 28). Other element would receive the click: <div class="toolbar-title toolbar-title-md" ng-reflect-klass="toolbar-title" ng-reflect-ng-class="toolbar-title-md">...</div>

Does this help?

@lathonez
Copy link
Owner

Testing on emu / device is not supported.

Sounds like you've made some good progress on it. How about a PR on #52?

@lathonez
Copy link
Owner

#52 is not meant to be about ripple, just a recommended way of testing on device / emu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants