From 74884de2be4505997d42d1b2f1c21c628050bb8d Mon Sep 17 00:00:00 2001 From: sebv Date: Thu, 22 May 2014 19:38:38 +0800 Subject: [PATCH 1/2] added --gappium option --- bin/test.sh | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/bin/test.sh b/bin/test.sh index 8dfb48aef..fd6224b30 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -1,5 +1,5 @@ #!/bin/sh -set +e +set -e mocha_args="" ios_only=false ios6_only=false @@ -8,6 +8,7 @@ ios71_only=false android_only=false android_chrome=false selendroid_only=false +gappium_only=false all_tests=true xcode_switch=true xcode_path="" @@ -29,6 +30,9 @@ for arg in "$@"; do elif [ "$arg" = "--selendroid" ]; then selendroid_only=true all_tests=false + elif [ "$arg" = "--gappium" ]; then + gappium_only=true + all_tests=false elif [ "$arg" = "--ios6" ]; then ios6_only=true all_tests=false @@ -66,8 +70,7 @@ run_ios_tests() { echo DEVICE=$2 time $appium_mocha -g $3 -i \ test/functional/common \ - test/functional/ios \ - test/functional/gappium + test/functional/ios } if $ios6_only || $ios_only || $all_tests; then @@ -99,7 +102,7 @@ fi if $android_chrome; then echo "RUNNING ANDROID (ARM) TESTS" echo "---------------------" - DEVICE=android time $appium_mocha \ + DEVICE=android time $appÄium_mocha \ -g '@skip-chrome|@skip-android-all' -i \ test/functional/android/chrome fi @@ -108,6 +111,20 @@ if $selendroid_only || $all_tests; then echo "RUNNING SELENDROID TESTS" echo "---------------------" DEVICE=selendroid time $appium_mocha -g '@skip-selendroid-all' -i \ - test/functional/selendroid \ - test/functional/gappium + test/functional/selendroid +fi + +if $gappium_only || $all_tests; then + echo "RUNNING GAPPIUM TESTS" + echo "---------------------" + DEVICE=ios71 time $appium_mocha test/functional/gappium + DEVICE=ios6 time $appium_mocha test/functional/gappium + # TODO: fix android/gappium test, no webview context found, investigate + # echo "Start the android emulator and press Enter." + # read + # DEVICE=android time $appium_mocha test/functional/gappium + # TODO: the gappium app does not work on selendroid, investigate + # echo "Start the android emulator and press Enter." + # read + # DEVICE=selendroid time $appium_mocha test/functional/gappium fi From 50c6ab4ac2fc3cfe3609debd31929e8c496bdfdc Mon Sep 17 00:00:00 2001 From: sebv Date: Thu, 22 May 2014 19:39:23 +0800 Subject: [PATCH 2/2] gappium and selendroid test fixes --- test/functional/gappium/basic-specs.js | 2 +- test/functional/selendroid/app-activities-specs.js | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/test/functional/gappium/basic-specs.js b/test/functional/gappium/basic-specs.js index 3822ba4de..77046d6b9 100644 --- a/test/functional/gappium/basic-specs.js +++ b/test/functional/gappium/basic-specs.js @@ -37,7 +37,7 @@ var activateWebView = function (driver) { }); }; -describe("gappium @skip-ios6", function () { +describe("gappium", function () { describe('HelloGappium', function () { var driver; setup(this, desired).then(function (d) { driver = d; }); diff --git a/test/functional/selendroid/app-activities-specs.js b/test/functional/selendroid/app-activities-specs.js index f12653eb5..1b675b852 100644 --- a/test/functional/selendroid/app-activities-specs.js +++ b/test/functional/selendroid/app-activities-specs.js @@ -9,14 +9,11 @@ var env = require('../../helpers/env') describe('selendroid - app activities', function () { this.timeout(env.MOCHA_INIT_TIMEOUT); - - // TODO: this does not throw, check why - describe('with no dot @skip-ci', function () { + describe('with no dot', function () { var session; var name = this.parent.title + " " + this.title; - it('should not launch app', function (done) { - var newDesired = _.defaults({'app-activity': 'ApiDemos'}, desired); + var newDesired = _.defaults({'appActivity': 'ApiDemos'}, desired); session = initSession(newDesired, {'no-retry': true}); session .setUp(name) @@ -36,7 +33,7 @@ describe('selendroid - app activities', function () { }); it('should still launch app', function (done) { - var newDesired = _.defaults({'app-activity': 'com.example.android.apis.ApiDemos'}, desired); + var newDesired = _.defaults({'appActivity': 'com.example.android.apis.ApiDemos'}, desired); session = initSession(newDesired); session.setUp(name) .nodeify(done);