Bash script to run all tests

This commit is contained in:
Benjamin Beganović 2021-07-11 17:29:27 +02:00
parent 97919aa573
commit 117930ad35

40
dusk.sh Normal file
View File

@ -0,0 +1,40 @@
#!/bin/bash
echo "$ php artisan optimize"
php artisan optimize
GENERIC_TESTS=`find tests/Browser/ClientPortal/ -maxdepth 1 -type f -name '*.php'`
for TEST_CLASS in $GENERIC_TESTS; do
echo "Test class: $TEST_CLASS"
echo "$ php artisan migrate:fresh --seed"
php artisan migrate:fresh --seed &> /dev/null
echo "$ php artisan ninja:create-single-account"
php artisan ninja:create-single-account &> /dev/null
echo "$ php artisan dusk $TEST_CLASS"
php artisan dusk --stop-on-failure $TEST_CLASS
echo "=========================================="
done || exit 1
GATEWAY_TESTS=`find tests/Browser/ClientPortal/Gateways/ -type f -name '*.php'`
for TEST_CLASS in $GATEWAY_TESTS; do
echo "Test class: $TEST_CLASS"
echo "$ php artisan migrate:fresh --seed"
php artisan migrate:fresh --seed &> /dev/null
echo "$ php artisan ninja:create-single-account"
php artisan ninja:create-single-account &> /dev/null
echo "$ php artisan dusk $TEST_CLASS"
php artisan dusk --stop-on-failure $TEST_CLASS
echo "=========================================="
done || exit 1
echo 'All tests completed successfully.'