Author: vrockai
Date: 2009-02-19 07:59:45 -0500 (Thu, 19 Feb 2009)
New Revision: 12838
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/run.sh
Log:
run.sh script
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-19 11:43:13 UTC
(rev 12837)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-19 12:59:45 UTC
(rev 12838)
@@ -29,7 +29,7 @@
<property name="portal.instance" value="default" />
<property name="test.suite" value="testng.xml" />
- <property name="usecase.suite" value="usecaseng.xml" />
+ <property name="usecase.suite" value="end2end.xml" />
<path id="jboss.test.classpath">
<pathelement path="${jboss.test.jar}" />
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/run.sh
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/run.sh 2009-02-19 11:43:13 UTC
(rev 12837)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/run.sh 2009-02-19 12:59:45 UTC
(rev 12838)
@@ -1,28 +1,65 @@
#!/bin/bash
-echo "Firefox bin location: $2"
+export HELPMODE=0
-ant clean
-
-if [ $1 = "test" ]; then
- ant -f build.xml copyApps
- ant -f build.xml selenium-test -Dbrowser="*firefox $2"
-Dworkspace="/home/vrockai/workspace/ui-tests/" -Dscreenshot="true"
+if [ ! -n "${1+x}" ]; then
+ export HELPMODE=1
+elif [ $1 = "help" ]; then
+ export HELPMODE=1
fi
-if [ $1 = "end2end" ]; then
- ant -f build.xml copyApps
- ant -f build.xml selenium-usecase -Dbrowser="*firefox $2"
-Dworkspace="/home/vrockai/workspace/ui-tests/" -Dscreenshot="true"
+if [ $HELPMODE -eq 1 ]; then
+ echo "Usage: "
+ echo " run.sh MODE FF_LOCATION [TESTCLASS_NAME]"
+ echo
+ echo "Description:"
+ echo " Command used to run selenium test of JBoss Portal. Enviroment variables
JBOSS_HOME, JAVA_HOME must be set before running the script. JBoss portal must run on the
same machine where the script is being run (\"http://localhost:8080/portal/\")
."
+ echo
+ echo "FF_LOCATION - the location of firefox binary file (not the firefox running
script - the binary is ussually located in \"/usr/lib*/firefox*/\" directory
)"
+ echo
+ echo "MODE - one of available modes:"
+ echo " help : prints out this helpscreen"
+ echo " test : runnnig the selenium test suite defined in testng.xml"
+ echo " end2end : runnnig the selenium test suite defined in testng.xml"
+ echo " selenium : run the selenium server only (no tests are executed)"
+ echo " single : run single selenium testcase of specified class (TESTCLASS_NAME
must be specified)"
+ echo
+ echo "TESTCLASS_NAME - the class specifiing single testcase (must be set when
running \"single\" mode)"
+ echo
+ echo "Examples:"
+ echo " running the testsuite:"
+ echo " run.sh test /home/vrockai/opt/firefox3/firefox-bin"
+ echo
+ echo " running single testcase:"
+ echo " run.sh single /home/vrockai/opt/firefox3/firefox-bin
org/jboss/portal/test/selenium/DashboardTestCase.class"
+else
+ if [ $1 != "help" ]; then
+ ant clean
+ echo "Action: $1"
+ echo "Firefox bin location: $2"
+ echo "Testclass name: $3"
+ fi
+
+ if [ $1 = "test" ]; then
+ ant -f build.xml copyApps
+ ant -f build.xml selenium-test -Dbrowser="*firefox $2"
-Dworkspace="/home/vrockai/workspace/ui-tests/" -Dscreenshot="true"
+ fi
+
+ if [ $1 = "end2end" ]; then
+ ant -f build.xml copyApps
+ ant -f build.xml selenium-usecase -Dbrowser="*firefox $2"
-Dworkspace="/home/vrockai/workspace/ui-tests/" -Dscreenshot="true"
+ fi
+
+ if [ $1 = "perf" ]; then
+ ant -f build-local.xml copyApps
+ ant -f build-local.xml selenium-test -Dbrowser="*firefox $2"
-Dworkspace="/home/vrockai/workspace/ui-tests/"
+ fi
+
+ if [ $1 = "selenium" ]; then
+ ant -f build-local.xml run-src
+ fi
+
+ if [ $1 = "single" ]; then
+ ant -f build-local.xml single-test -Dbrowser="*firefox $2"
-Dtestname="$3"
+ fi
fi
-
-if [ $1 = "perf" ]; then
- ant -f build-local.xml copyApps
- ant -f build-local.xml selenium-test -Dbrowser="*firefox $2"
-Dworkspace="/home/vrockai/workspace/ui-tests/"
-fi
-
-if [ $1 = "selenium" ]; then
- ant -f build-local.xml run-src
-fi
-
-if [ $1 = "single" ]; then
- ant -f build-local.xml single-test -Dbrowser="*firefox $2"
-Dtestname="$3"
-fi