From 117930ad350024cefdcc6af7aaaf97ad125f1fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Sun, 11 Jul 2021 17:29:27 +0200 Subject: [PATCH] Bash script to run all tests --- dusk.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 dusk.sh diff --git a/dusk.sh b/dusk.sh new file mode 100644 index 000000000000..f0dd8203bfd0 --- /dev/null +++ b/dusk.sh @@ -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.'