From e44bef6de7473ff15853d348f57143b8afea302f Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Fri, 28 Oct 2022 00:22:42 +0100 Subject: [PATCH] [TESTS] Use paratest and PHPUnit cache This speeds up tests from 90s to 44s on my machine --- docker/tooling/coverage.sh | 4 ++-- phpunit.xml.dist | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docker/tooling/coverage.sh b/docker/tooling/coverage.sh index ec200ee62c..ebc4a40206 100755 --- a/docker/tooling/coverage.sh +++ b/docker/tooling/coverage.sh @@ -9,8 +9,8 @@ bin/console doctrine:schema:update --force || exit 1 yes yes | bin/console doctrine:fixtures:load || exit 1 if [ "$#" -eq 0 ] || [ -z "$*" ]; then - vendor/bin/simple-phpunit -vvv --coverage-html .test_coverage_report + XDEBUG_MODE=coverage vendor/bin/paratest --verbose --debug --processes=32 --functional --configuration=phpunit.xml.dist else echo "Running with filter" - vendor/bin/simple-phpunit -vvv --coverage-html .test_coverage_report $* + XDEBUG_MODE=coverage vendor/bin/paratest --verbose --debug --processes=32 --functional --configuration=phpunit.xml.dist fi diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 3210694a60..d839b70c1b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,12 +5,15 @@ backupGlobals="false" colors="true" bootstrap="tests/bootstrap.php" - cacheDirectory="var/phpunit/coverage_cache" cacheResultFile="var/phpunit/result_cache" - stopOnFailure="true" - stopOnError="true" - cacheResult="true"> - + cacheResult="true" + processIsolation="false"> + + src @@ -35,6 +38,9 @@ + + + ./tests/Controller