Created
July 14, 2012 11:35
-
-
Save DominikDary/3110764 to your computer and use it in GitHub Desktop.
IRB Configuration to speed up the development of calabash-android mobile tests.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
ARGV.concat [ "--readline", | |
"--prompt-mode", | |
"simple" ] | |
# 25 entries in the list | |
IRB.conf[:SAVE_HISTORY] = 50 | |
# Store results in home directory with specified file name | |
IRB.conf[:HISTORY_FILE] = ".irb-history" | |
require 'calabash-android/operations' | |
include Calabash::Android::Operations | |
connect_to_test_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TEST_SERVER_PORT=34777 | |
MOBILE_APP_PACKAGE=$1 | |
if [ -z "$MOBILE_APP_PACKAGE" ]; then | |
echo 'The parameter about your mobile app package is missing: e.g. com.springsource.greenhouse.test' | |
exit 1 | |
else | |
# use this line for calabash version 0.1 | |
# adb shell am instrument -e class sh.calaba.instrumentationbackend.InstrumentationBackend -w $MOBILE_APP_PACKAGE/android.test.InstrumentationTestRunner & | |
adb shell am instrument -e class sh.calaba.instrumentationbackend.InstrumentationBackend -w $MOBILE_APP_PACKAGE/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner & | |
sleep 7 | |
IRBRC=.irbrc TEST_SERVER_PORT=$TEST_SERVER_PORT irb | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment