Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F253189F7 for ; Thu, 21 Jan 2016 01:25:37 +0000 (UTC) Received: (qmail 75016 invoked by uid 500); 21 Jan 2016 01:25:37 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 74970 invoked by uid 500); 21 Jan 2016 01:25:37 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 74957 invoked by uid 99); 21 Jan 2016 01:25:36 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2016 01:25:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 848EB18058F for ; Thu, 21 Jan 2016 01:25:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.15 X-Spam-Level: *** X-Spam-Status: No, score=3.15 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id pvmlpZ6d-K7F for ; Thu, 21 Jan 2016 01:25:25 +0000 (UTC) Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com [209.85.213.51]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 58F1B2054B for ; Thu, 21 Jan 2016 01:25:25 +0000 (UTC) Received: by mail-vk0-f51.google.com with SMTP id e185so15213259vkb.1 for ; Wed, 20 Jan 2016 17:25:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=1VbGYcig6EaO0W5hLpABGkc1pDQ0BOx2msJ13lkFlDI=; b=0QRa+rru2hSkr1Kghd9i0raGTkX8oOk5YcRPcuoXEzV43yJDjobu92DqtvhFZjBTaD cUbEgBoszuoYo3Ge3eqzs57Hc5JYHFNNeY/T1bF9ylhsfSklPyciV6Pycllkxr18Q4GM TggWtX5wQcsJPbLg7rbICtBW73/oN+35pOTOhQLupzThxa2odOnvkaEK/iZqOygVzaCM ug+fkyR9b4PAp3OtjFjmaoELFJpGyUx2MLZb9Wj3qR8E/WlBhM/npJ1ew2AShwS0+S9/ jPjUcYosJwdcUL1Gkws39giRRenimvAwjgb77v5mbLCEYR2FVMEL0DtB4izcXYbDAP8J uyLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; bh=1VbGYcig6EaO0W5hLpABGkc1pDQ0BOx2msJ13lkFlDI=; b=gYnV75Wu0Sp309+QpU7QDV2rdpI6U9D0kqFv83aziERo6wAfF4/QRDfYSwsrvzp4SM ZYWWJr3AzEAi7c7UWjWMWzz+X4E8Pu/8+T3O24GsaWkEDN7S8UGin/mGmEOEhA0j7/zK yvpSRepaltFsWRYboaHXY0pHK3fiWCcqeagEKCRioJQhAdjm6MRhaBdI6KXegJjzPsP3 J0a2ye3l76gLcSsYBJUnbgHJfguod2dtmSOK66UJzm2Z3huxNk97Lztth6bMhu+NMxaE YfzV6C8BJ1tr2SNylHx7Ifpq+qDGpU46yRi5sJGePYs127MlTcVjHzolK7PQ6IJGzNmP 4G9g== X-Gm-Message-State: ALoCoQk7AkJgDJM5Oj4it/qA9cAk2xaRJ3UW3E3PA4a2xyDh1DKYaO9eFrILpWbDZdSBw5GbrLKgxhWuYXqc9JNHqsb8HgO40A== X-Received: by 10.31.130.199 with SMTP id e190mr24156021vkd.49.1453339524538; Wed, 20 Jan 2016 17:25:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Carlos Santana Date: Thu, 21 Jan 2016 01:25:14 +0000 Message-ID: Subject: Re: [DISCUSS] Improving core plugins automated test coverage To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a1143e7821928790529cdfad6 --001a1143e7821928790529cdfad6 Content-Type: text/plain; charset=UTF-8 Wow this is great! not just for our cordova code, but app developers that want to learn how to use appium to test their own plugins and app code Is this something we can run on saucelabs?, I think is free for open source projects. On Wed, Jan 20, 2016 at 8:16 PM Steven Gill wrote: > Sweet! Thanks for doing this Alexander! Always thought it would be a great > idea to write some our tests with appium > > On Wed, Jan 20, 2016 at 5:07 PM, Joe Bowser wrote: > > > So, Appium works now and I can close the issue complaining that Appium > > doesn't work? > > > > On Wed, Jan 20, 2016, 9:12 AM Alexander Sorokin (Akvelon) < > > v-alsoro@microsoft.com> wrote: > > > > > Hi guys. > > > > > > Lately I've been working on improving automated test coverage of core > > > plugins. Work is still in progress but there are some results that I > want > > > to share. > > > > > > The idea is to use Appium framework to automate core plugins manual > tests > > > in mobilespec app. I've implemented a new command for Medic. It starts > an > > > Appium server instance, looks for the tests, then runs the mobilespec > app > > > from the specified folder and runs the tests. > > > > > > Appium supports only iOS and Android platforms so there are tests only > > for > > > these two, but we can extend the coverage of other platforms using > > > different ui testing frameworks. > > > > > > The tests themselves are written for jasmine-node and are using "wd" > > > module to connect to Appium server. They are currently located in > plugin > > > repos. Here's some links: > > > > > > Test runner (medic): > > > https://github.com/apache/cordova-medic/pull/70 > > > > > > Battery Status tests: > > > https://github.com/apache/cordova-plugin-battery-status/pull/29 > > > > > > Camera tests: > > > https://github.com/apache/cordova-plugin-camera/pull/156 > > > > > > Contacts tests: > > > https://github.com/apache/cordova-plugin-contacts/pull/101 > > > > > > Device Motion tests: > > > https://github.com/apache/cordova-plugin-device-motion/pull/39 > > > > > > Tests can run on both real devices and emulators/simulators. > > > While developing the tests, I've been using Android emulator and device > > > with API level 19 (Android 4.4, KitKat) and iOS device (iPad 2) with > iOS > > > 7.1 so the tests can fail on other devices/emulators. I'm going to add > > the > > > support for other versions/devices as well as implement more Appium > tests > > > for other plugins in the nearest future. > > > > > > To run the tests: > > > 1. Clone cordova-medic repo > > > 2. Clone tested plugins repos (appium tests are there, in appium-tests > > > folder) > > > 3. Create mobile spec app with tested plugins: > > > node cordova-mobile-spec/createmobilespec/createmobilespec.js > > > mobspec-android --android --plugins "cordova-plugin-battery-status > > > cordova-plugin-camera cordova-plugin-contacts > > cordova-plugin-device-motion" > > > 4. Build the mobilespec app: > > > cd mobspec-android && cordova build > > > 5. Start the emulator/connect the device > > > 6. Run the tests using command: > > > node cordova-medic/medic/medic.js appium --app [mobilespec folder] > > > --platform [platform] --device-name [device/emulator name] > > > --platform-version [platform version] --plugins [list of plugins to > test > > > separated by space] [--device (only if running on a real device)] > --udid > > > [iOS real devices only, device UDID] > > > Every argument except --platform is optional. On iOS, --udid is > mandatory > > > if running on real device. > > > > > > For example, android emulator: > > > node cordova-medic/medic/medic.js appium --app mobspec-android > --platform > > > android --device-name appium --platform-version 19 --plugins > > > "cordova-plugin-device-motion" > > > > > > Android device: > > > node cordova-medic/medic/medic.js appium --platform android --app > > > mobspec-android --plugins "cordova-plugin-contacts" --device > > > > > > iOS simulator: > > > node cordova-medic/medic/medic.js appium --app mobspec-ios --platform > ios > > > --plugins "cordova-plugin-contacts" > > > > > > iOS device: > > > node cordova-medic/medic/medic.js appium --app mobspec-ios --platform > ios > > > --device-name "iPad 2" --udid [UDID here] --plugins > > "cordova-plugin-camera > > > cordova-plugin-contacts" > > > > > > I hope we will be running these tests along with other medic tests that > > > are now running on CI in future: > > > http://ci.cordova.io/ > > > > > > Please take a look and say what you think. > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > > > For additional commands, e-mail: dev-help@cordova.apache.org > > > > > > > > > --001a1143e7821928790529cdfad6--