|
HowTo_Test_BungeniBuilds
Setting up a Bungeni Build Monitor with Hudson and Selenium
Phase-QA Introduction
Pre-requisities
sudo apt-get install sun-java6-jdk Setting up Hudson
wget http://apache.imghat.com/tomcat/tomcat-5/v5.5.28/bin/apache-tomcat-5.5.28.tar.gz mkdir tomcat-server tomcat -C tomcat-server -xvf apache-tomcat-5.5.28.tar.gz
export JAVA_HOME=/path/to/java/installation <user username="admin" password="admin" roles="tomcat,manager"/>
wget http://hudson.gotdns.com/latest/hudson.war cp hudson.war ./tomcat-server/webapps Setting up Selenium RCFolder structure for testsThe following is the folder structure for the tests tests
|-- bin
| |-- ant
| | |-- bin
| | |-- docs
| | |-- etc
| | `-- lib
| `-- selenium-server
| |-- selenium-dotnet-client-driver-1.0.1
| |-- selenium-java-client-driver-1.0.1
| |-- selenium-perl-client-driver-1.0.1
| |-- selenium-php-client-driver-1.0.1
| |-- selenium-python-client-driver-1.0.1
| |-- selenium-ruby-client-driver-1.0.1
| `-- selenium-server-1.0.3
|-- dbdumps
`-- java-tests
`-- selenium-tests
|-- build
|-- lib
|-- nbproject
|-- src
`-- testWe start by preparing the folder structure mkdir tests mkdir tests/bin mkdir tests/java-tests Installing SeleniumDownload & Install Selenium into tests/bin/selenium-server : wget http://selenium.googlecode.com/files/selenium-remote-control-1.0.3.zip unzip selenium-remote-control-1.0.3.zip -d tests/bin/selenium-server Installing AntDownload & Install ant into tests/bin/ant : wget http://apache.osuosl.org/ant/binaries/apache-ant-1.8.0-bin.tar.gz mkdir tests/bin/ant tar -C tests/bin/ant -xvf apache-ant-1.8.0-bin.tar.gz Using the Selenium testsPre-requisites
sudo apt-get install firefox sudo apt-get install Xvfb
Running the tests
rm -rf tests/java-tests/selenium-tests svn export http://bungeni-portal.googlecode.com/svn/BungeniTesting/java/selenium-tests tests/java-tests/selenium-tests Xvfb :99 -ac & export DISPLAY=:99 /usr/lib/firefox-3.0.18/firefox & java -jar tests/bin/selenium-server/selenium-server-1.0.3/selenium-server.jar & cd tests/java-tests/selenium-tests && ../../bin/ant/bin/ant -Dtest-sys-prop.test.props=`pwd`/src/resources/runtime.properties test wget -O result.txt http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer killall firefox killall Xvfb Automated running of testsAll the above tests can be run via shell scripts : rm tests/*.sh tests/*.path rm -rf tests/startup_scripts cd tests && svn export http://bungeni-portal.googlecode.com/svn/BungeniTesting/java/startup_scripts/ cp startup_scripts/*.sh .. cp startup_scripts/*.path .. cd ../.. Edit the file firefox.path appropriately to point it to the firefox binary and then run : cd tests && ./runall.sh Setup the Automated Build & Test task on Hudson
| |
► Sign in to add a comment