summaryrefslogtreecommitdiffstats
path: root/install/ui/test/bin/selenium.sh
blob: 034b1df6f5bb7fbe8312e826c081b9116c9ea806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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