cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Sorokin (Akvelon)" <v-als...@microsoft.com>
Subject RE: [DISCUSS] Improving core plugins automated test coverage
Date Fri, 22 Jan 2016 09:10:44 GMT
Thanks for suggesting saucelabs! I'll take a look at it.

-----Original Message-----
From: Carlos Santana [mailto:csantana23@gmail.com] 
Sent: Thursday, January 21, 2016 4:25 AM
To: dev@cordova.apache.org
Subject: Re: [DISCUSS] Improving core plugins automated test coverage

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 <stevengill97@gmail.com> 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 <bowserj@gmail.com> 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:
> > > https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fci
> > > .cordova.io%2f&data=01%7c01%7cv-alsoro%40microsoft.com%7c5c198a04b
> > > bef4dd0eab508d32201c51c%7c72f988bf86f141af91ab2d7cd011db47%7c1&sda
> > > ta=YrNTt%2f1zkrRjqr3WVSDF37SDgkCbD2KjjDnaxn47bLU%3d
> > >
> > > 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
> > >
> > >
> >
>
Mime
View raw message