Skip to content

Commit

Permalink
Merge pull request #328 from joergsteffens/dev/joergs/master/webui-se…
Browse files Browse the repository at this point in the history
…lenium

webui: improve selenium test
  • Loading branch information
fbergkemper committed Nov 28, 2019
2 parents b2f24cb + b9ee242 commit e711dc7
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 53 deletions.
11 changes: 7 additions & 4 deletions systemtests/tests/webui-common/testrunner.in
Expand Up @@ -40,18 +40,21 @@ run_bareos

PHP_PID=$(echo $!)

# run tests but stop the test run on the first error or failure
# run tests

#
# test with admin profile resource
#
export BAREOS_WEBUI_PROFILE=@BAREOS_WEBUI_PROFILE@
export BAREOS_WEBUI_TESTNAME=@BAREOS_WEBUI_TESTNAME@
echo "test with ${BAREOS_WEBUI_PROFILE} profile:" >"$tmp/selenium.out" 2>&1
@PYTHON@ @CMAKE_SOURCE_DIR@/webui/tests/selenium/webui-selenium-test.py -v "SeleniumTest.test_${BAREOS_WEBUI_TESTNAME}" | tee "$tmp/selenium.out" 2>&1
# WRONG: false | tee /tmp/tmp.txt has always $? == 0.
#@PYTHON@ @CMAKE_SOURCE_DIR@/webui/tests/selenium/webui-selenium-test.py -v "SeleniumTest.test_${BAREOS_WEBUI_TESTNAME}" | tee "$tmp/selenium.out" 2>&1
if ! @PYTHON@ @CMAKE_SOURCE_DIR@/webui/tests/selenium/webui-selenium-test.py -v "SeleniumTest.test_${BAREOS_WEBUI_TESTNAME}" >>"$tmp/selenium.out" 2>&1; then

estat=$?
export estat
set_error "$(cat "$tmp/selenium.out")"

fi

kill "${PHP_PID}"

Expand Down

0 comments on commit e711dc7

Please sign in to comment.