|
|
|
|
@ -11,17 +11,19 @@ set -u
|
|
|
|
|
PASSWORD="selenium"
|
|
|
|
|
|
|
|
|
|
if [ -z "${1:-}" ] ; then
|
|
|
|
|
echo "Usage: $0 <testsystem> [<output_directory>] [junit]" >&2
|
|
|
|
|
echo "Usage: $0 <testsystem> [<output_directory>] [junit] [test_plan]" >&2
|
|
|
|
|
echo
|
|
|
|
|
echo "Usage examples:
|
|
|
|
|
|
|
|
|
|
$0 192.168.88.162
|
|
|
|
|
$0 192.168.88.162 /results/ junit"
|
|
|
|
|
$0 192.168.88.162 /results/ junit controller_billing.t"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
SERVER="${1}"
|
|
|
|
|
OUTPUT_DIRECTORY="${2:-/code/}"
|
|
|
|
|
OUTPUT_TYPE=${3:-}
|
|
|
|
|
TEST_PLAN="${4:-*.t}"
|
|
|
|
|
|
|
|
|
|
# workaround for new Selenium::Remote::Driver (see Dockerfile)
|
|
|
|
|
export PERL5LIB=/home/selenium/Selenium-Remote-Driver/lib/
|
|
|
|
|
@ -51,12 +53,14 @@ echo "Selenium server log file available at /home/selenium/selenium.log"
|
|
|
|
|
echo "Watch at test runs by connecting via VNC (password: '${PASSWORD}'):"
|
|
|
|
|
echo "echo -e '$PASSWORD_ENCODED' >/tmp/vncpasswd ; vncviewer geometry=1280x1024x16 passwd=/tmp/vncpasswd localhost:5999"
|
|
|
|
|
|
|
|
|
|
if [ -n "${3:-}" ] && [ "${3:-}" = "junit" ] ; then
|
|
|
|
|
CATALYST_SERVER=https://${SERVER}:1443/ prove -ofmv --formatter TAP::Formatter::JUnit -l -It/lib t/selenium/*.t | \
|
|
|
|
|
if [ "${OUTPUT_TYPE:-}" = "junit" ] ; then
|
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
|
CATALYST_SERVER=https://${SERVER}:1443/ prove -ofmv --formatter TAP::Formatter::JUnit -l -It/lib t/selenium/${TEST_PLAN} | \
|
|
|
|
|
tee -a "${OUTPUT_DIRECTORY}/selenium.xml"
|
|
|
|
|
RC="${PIPESTATUS[0]}"
|
|
|
|
|
else
|
|
|
|
|
CATALYST_SERVER="https://${SERVER}:1443" prove -ofmv --color -l -It/lib t/selenium/*.t | \
|
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
|
CATALYST_SERVER="https://${SERVER}:1443" prove -ofmv --color -l -It/lib t/selenium/${TEST_PLAN} | \
|
|
|
|
|
tee -a "${OUTPUT_DIRECTORY}/selenium.pretty"
|
|
|
|
|
RC="${PIPESTATUS[0]}"
|
|
|
|
|
fi
|
|
|
|
|
|