cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakatyal <...@git.apache.org>
Subject [GitHub] cordova-medic pull request: CB-11112 Added Appium documentation
Date Tue, 19 Apr 2016 17:56:37 GMT
Github user rakatyal commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/93#discussion_r60278921
  
    --- Diff: APPIUM.md ---
    @@ -0,0 +1,64 @@
    +Cordova Medic Appium Runner
    +===========================
    +
    +This document describes a method to run Cordova Appium tests without full-blown CI setup
with [Camera][plugin_camera] and [Contacts][plugin_contacts] plugins taken as an example.
    +Appium tests can be ran on Android and iOS.
    +
    +## Setup
    +
    +Clone medic repository by running
    +
    +``` shell
    + > git clone https://github.com/apache/cordova-medic
    +```
    +
    +You will need an app to test, so create it and add the platform and the plugins:
    +
    +``` shell
    + > cordova create test-app
    + > cd test-app
    + > cordova platform add <android or ios>
    + > cordova plugin add cordova-plugin-camera cordova-plugin-contacts
    +```
    +
    +### Running on Android
    +
    +Cordova Appium tests for Android can be ran on either real device or an emulator. If
you're running tests on the emulator you will need to launch it manually before the test run.
Please also note that Appium tests are written with Android API 19 (KitKat) and 21 (Lollipop)
in mind. They're not yet tested on higher versions of Android OS.
    +
    +``` shell
    + > emulator -avd <avd name, for example, api19>
    +```
    +
    +Now you're ready to run the tests. Command sample to run the tests on the emulator with
the name "api19" and API level 19:
    +
    +``` shell
    + > node cordova-medic/medic/medic.js appium --app test-app --platform android --deviceName
api19 --platformVersion 19 --plugins "cordova-plugin-camera cordova-plugin-contacts"
    +```
    +
    +### Running on iOS
    +
    +You can run Cordova Appium tests for iOS on either real device or a simulator.
    +
    +To run Appium tests on real iOS device you may need to install `ios-webkit-debug-proxy`.
If you don't have Homebrew installed, please install it according to the [Homebrew docs][brew].
    +
    +When you've got Homebrew installed, just run the following commands:
    +
    + ``` shell
    + > brew update
    + > brew install ios-webkit-debug-proxy
    + ```
    +
    +More info on installing `ios-webkit-debug-proxy` can be found in [Appium docs][appium_docs].
    +
    +If running on simulator, no need to launch it manually - Appium will do it automatically.
    +
    +Command sample to run tests on the "iPhone 6" simulator with iOS 8.4:
    --- End diff --
    
    Should we include an example to run it on a device for android/ios?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message