Skip to content

Instantly share code, notes, and snippets.

@DominikDary DominikDary/.irbrc
Created Jul 14, 2012

Embed
What would you like to do?
IRB Configuration to speed up the development of calabash-android mobile tests.
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
#!/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
You can’t perform that action at this time.