Project

General

Profile

Download (747 Bytes) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/bash
2
#
3
# USAGE:
4
#     bash -ex /usr/lib/selenium/headlessSelenium.sh MODULE_ROOT
5
# whereas MODULE_ROOT points to the cdm_dataportal folder in the jenkins workspace
6
#
7
MODULE_ROOT=$1
8
FIREFOX_BIN="/usr/lib/iceweasel/firefox-bin"
9

    
10
DISPLAY=":99"
11

    
12
#
13
# This option creates screen screennum and sets its width, height, and depth to W, H, and  D  respectively.
14
# By default, only screen 0 exists and has the dimensions 1280x1024x8.
15
#
16
SCREEN="0 1280x1024x16"
17

    
18
#Use virtual X server
19
VIRTUAL_X="Xvfb $DISPLAY"
20

    
21
#init
22
if [ -z "$(pidof Xvfb)" ]; then
23
        $VIRTUAL_X &
24
else
25
        echo "Xvfb already running with pid $(pidof Xvfb)"
26
fi
27
export DISPLAY
28

    
29
cd $MODULE_ROOT/test/java/dataportal-selenium-tests/
30
mvn -Dwebdriver.firefox.bin=$FIREFOX_BIN test
(3-3/4)