I have a problem which I find awfully hard to debug:
In my application, I currently have about 1000 tests, so not much. They are split across several directories (tests/someDir, tests/someOtherDir, tests/evenAnotherDir....).
When I run phpunit for one of these directories separately, the tests have a normal performance. When I run the whole /tests directory however, the tests get awfully slow, increasing from test to test. Tests that usually take 100ms suddenly take 2s and more.
I have no idea what the issue is, which makes debugging hard. What I checked so far:
- System resources: There is no unusual CPU load, nor is the memory full - nothing is put to swap (see screenshot). However, the fan of my computer starts working hard when I run the tests.
- Database (MariaDB 11): All tests use the same connection, there is no max_connection problem or so.
My setup:
- Ubuntu 24.04 on a modern machine (LG Gram 2024)
- PhpStorm as IDE - I run the tests from PhpStorm (
[docker-compose://[/var/www/html/EOO/EOOv5/app/tests/.docker/docker-compose.yml]:php-apache-xdebug/]:php /var/www/html/vendor/phpunit/phpunit/phpunit --configuration /var/www/html/phpunit.xml.dist /var/www/html/tests --teamcity) - PHP8.3 dockered, Xdebug on on coverage mode
- MariaDB dockered
Can you give me a hint what to try to find the issue?
Best regards


setUp()and rolled back intearDown()