Commit d1524130 authored by Aaron Barnes's avatar Aaron Barnes Committed by Gerrit Code Review
Browse files

test/behat/mahara_behat.sh: Added a "rundebug" option

Change-Id: I579256703eae2141faacd9678931df6f1e6b1ee2
parent a596b554
......@@ -34,7 +34,7 @@ then
PERFORM=$2
php htdocs/testing/frameworks/behat/cli/util.php --$PERFORM
elif [ "$ACTION" = "run" -o "$ACTION" = "runheadless" ]
elif [ "$ACTION" = "run" -o "$ACTION" = "runheadless" -o "$ACTION" = "rundebug" ]
then
# Initialise the behat environment
......@@ -91,9 +91,11 @@ then
BEHATCONFIGFILE=`php htdocs/testing/frameworks/behat/cli/util.php --config`
echo "Run Behat..."
OPTIONS=''
if [ "$TAGS" ]
then
echo "Only run tests with the tag: $TAGS"
OPTIONS=$OPTIONS" --tags "$TAGS
else
echo "Run all tests"
fi
......@@ -102,13 +104,13 @@ then
echo "=================================================="
echo
if [ "$TAGS" ]
if [[ $ACTION == 'rundebug' ]]
then
./external/vendor/bin/behat --config $BEHATCONFIGFILE --tags $TAGS
else
./external/vendor/bin/behat --config $BEHATCONFIGFILE
OPTIONS=$OPTIONS" --format=pretty"
fi
./external/vendor/bin/behat --config $BEHATCONFIGFILE $OPTIONS
echo
echo "=================================================="
echo
......@@ -128,6 +130,10 @@ else
echo "# Run tests with specific tag:"
echo "mahara_behat run @tagname"
echo ""
echo "# Run tests with extra debug output:"
echo "mahara_behat rundebug"
echo "mahara_behat rundebug @tagname"
echo ""
echo "# Enable test site:"
echo "mahara_behat action enable"
echo ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment