2011-08-08 20:19:12 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
if [ $# -ne 3 ]
|
|
|
|
|
then
|
|
|
|
|
echo "Usage: testrunner.sh <sah file|suite file> <startURL> <browserType>"
|
|
|
|
|
echo "File path is relative to <libreplan root folder>/scripts/functional-tests"
|
|
|
|
|
echo "Example:"
|
2011-10-28 08:17:54 +02:00
|
|
|
echo "./testrunner.sh data-types/all_data_type_test.suite http://localhost:8080/libreplan-webapp <browserType>"
|
|
|
|
|
echo "./testrunner.sh data-types/progress_test.sah http://localhost:8080/libreplan-webapp <browserType>"
|
2011-08-08 20:19:12 +02:00
|
|
|
else
|
|
|
|
|
|
|
|
|
|
. ./sahi-common-env.sh
|
|
|
|
|
|
|
|
|
|
export USERDATA_DIR=$SAHI_HOME/userdata/
|
|
|
|
|
export SCRIPTS_PATH=`pwd`/$1
|
|
|
|
|
export BROWSER=$3
|
|
|
|
|
export START_URL=$2
|
2011-08-25 11:17:04 +02:00
|
|
|
export THREADS=1
|
2011-08-08 20:19:12 +02:00
|
|
|
export SINGLE_SESSION=false
|
|
|
|
|
java -cp $SAHI_HOME/lib/ant-sahi.jar net.sf.sahi.test.TestRunner -test $SCRIPTS_PATH -browserType "$BROWSER" -baseURL $START_URL -host localhost -port 9999 -threads $THREADS -useSingleSession $SINGLE_SESSION
|
|
|
|
|
fi
|