Skip to content
Snippets Groups Projects
Commit f23d047e authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-7160: add script to try running each file

parent 4bf17d7f
No related branches found
No related tags found
2 merge requests!83ISTWCMS-7160 Fix service content type in testAutomaticListBlocksSettings in...,!81ISTWCMS-7160 Make existing Codeception tests pass
rm -rf tests/_output
rm -rf tests/_data
# Ensure we are not using the recorder.
cp tests/acceptance_norecorder.suite.yml tests/acceptance.suite.yml
while getopts 'r' OPTION; do
case "$OPTION" in
r)
cp tests/acceptance_recorder.suite.yml tests/acceptance.suite.yml
;;
s)
stepper=1
;;
?)
echo "script usage: [-r]" >&2
exit 1
;;
esac
done
# Directory to iterate through
directory="tests/acceptance"
files=()
for file in "$directory"/*; do
if [[ -f "$file" ]]; then
file="${file//tests\/acceptance\//}"
file="${file//\.php/}"
files+=("$file")
fi
done
# Perform the tests using the groups
for value in "${files[@]}"; do
pgrep chrome | xargs kill -9
chromedriver --port=9515 --url-base=/wd/hub &
echo "**************************************"
echo "Current Test: $value"
echo "**************************************"
if [[ $stepper == 1 ]]; then
php vendor/bin/codecept run acceptance "$value" --fail-fast --steps
else
php vendor/bin/codecept run acceptance "$value" --fail-fast
fi
if [[ $? -ne 0 ]]; then
break
fi
done
......@@ -4,4 +4,5 @@ cp tests/codeception.yml .
cp tests/index.php web
cp tests/run_tests.sh .
cp tests/run_groups.sh .
cp tests/run_files.sh .
sed -i 's/self::COVERAGE_COOKIE,\s$value,\s$cookieParams/self::COVERAGE_COOKIE, $value/g' /var/www/html/vendor/codeception/codeception/src/Codeception/Coverage/Subscriber/LocalServer.php
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment