summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-03-30 13:22:32 -0400
committerEndi S. Dewata <edewata@redhat.com>2011-03-30 13:22:32 -0400
commitebf746afd90efc3c456bf5507f06a8afcf2ff3ca (patch)
tree5b2547fafdc95c364940ff8d4065588e4217943c
parentfebf755dff3fc8f785d69fe33313058f6f1aa29e (diff)
downloadfreeipa-selenium.tar.gz
freeipa-selenium.tar.xz
freeipa-selenium.zip
Added Selenium script.selenium
-rwxr-xr-xinstall/ui/test/bin/selenium.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/install/ui/test/bin/selenium.sh b/install/ui/test/bin/selenium.sh
new file mode 100755
index 00000000..034b1df6
--- /dev/null
+++ b/install/ui/test/bin/selenium.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+
+TEST_SUITE=$1
+TEST_RESULTS=$2
+
+if [ "$TEST_SUITE" = "" -o "$TEST_RESULTS" = "" ]
+then
+ echo "Usage: $0 <test suite> <test results>"
+ exit 1
+fi
+
+if [ ! -f $TEST_SUITE ]
+then
+ echo "Error: Test suite $TEST_SUITE not found."
+ exit 1
+fi
+
+PROFILE_DIR=$HOME/.mozilla/firefox
+PROFILE=`ls $PROFILE_DIR | grep .default`
+PROFILE_TEMPLATE=$PROFILE_DIR/$PROFILE
+
+java -jar /usr/share/java/selenium-server-standalone.jar -firefoxProfileTemplate $PROFILE_TEMPLATE -htmlSuite "*firefox" "http://localhost" $TEST_SUITE $TEST_RESULTS
+
+# Kill Firefox
+ps -ef|grep -i firefox|grep '\-profile'|awk '{print $2;}'|xargs kill -9