Phpunit test slow - on local machine 3 minutes on GitLab-CI 44 minutes
Do you have any tips on what I can do about this?
I have 745 tests that I am testing before deploying, however on GitLab-CI it takes ages to complete them. I run 3 workes at the time, but still.
I'm considering to rewrite every test so I don't need to call resfreshDatabase-Trait. But still that's tough... Any ideas?
How/when and where do you test your app?
Ideally you test everything in your application.
You need to really check what you're doing in your tests. Are you doing a lot of expensive assertions in each test?
Can some tests be refactored to improve the speed at which they run? There's so many little things.
It's super hard to give any kind of advice without seeing the actual tests.
YES: I found the reason why it was so slow. My docker file installed Xdebug as well. This reduces the perfomance of phpunit drastically!
Please or to participate in this conversation.