forked from uhafner/warnings-ng-plugin-devenv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testFirefox.sh
executable file
·37 lines (27 loc) · 1.18 KB
/
testFirefox.sh
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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
GECKO_DRIVER_PATH=/opt/bin/geckodriver
CHROME_DRIVER_PATH=/opt/bin/chromedriver
BROWSER=firefox
RETRY=2 # number of retries if a test fails due to timeout errors, etc.
TEST_CASE=$1 # first commandline parameter (leave empty for all warnings plugin tests)
ELASTIC=2 # increase if your machine is slow
error="$(tput setaf 1)$(tput bold)"
warn="$(tput setaf 3)$(tput bold)"
ok="$(tput setaf 2)$(tput bold)"
bold="$(tput bold)"
norm="$(tput setaf 0)$(tput sgr0)"
if [ ! -x ${GECKO_DRIVER_PATH} ]; then
GECKO_DRIVER_PATH=$(which geckodriver)
fi
if [ ! -x ${GECKO_DRIVER_PATH} ]; then
echo "${error}Did not find Selenium driver for Firefox ${GECKO_DRIVER_PATH}${norm}"
exit 1;
fi
if [ -z "$TEST_CASE" ];
then
TEST_CASE=SmokeTests
fi
mvnOptions="-Dquite -Dsurefire.rerunFailingTestsCount=${RETRY} -Dwebdriver.gecko.driver=${GECKO_DRIVER_PATH} -DElasticTime.factor=${ELASTIC} -Dwebdriver.chrome.driver=${CHROME_DRIVER_PATH}"
echo Running: env LC_NUMERIC="en_US.UTF-8" BROWSER=${BROWSER} mvn -V test -Dtest=${TEST_CASE} ${mvnOptions}
cd warnings-ng-plugin/ui-tests
env LC_NUMERIC="en_US.UTF-8" BROWSER=${BROWSER} mvn -V test -Dtest=${TEST_CASE} ${mvnOptions} -P-no-ui-tests-on-mac