Have you disabled Xdebug on your local machine?
That big a discrepancy suggests to me that you're running with xdebug enabled, which creates a HUGE slowdown.
When I run testsuite for my seo forum on Homestead machine, it looks like this:
PHPUnit 6.3.0 by Sebastian Bergmann and contributors.
................................................................. 65 / 65 (100%)
Time: 47.5 seconds, Memory: 132.00MB
OK (65 tests, 135 assertions)
When I run them on my local machine, it takes forever:
PHPUnit 6.3.0 by Sebastian Bergmann and contributors.
................................................................. 65 / 65 (100%)
Time: 11.68 minutes, Memory: 124.00MB
OK (65 tests, 135 assertions)
Using Laravel 5.5 and RefreshDatabase trait.
With DatabaseTransactions it's faster (takes like 15 seconds on Homestead, still forever locally), but can't really use DatabaseTransactions as MySQL doesn't support nested transactions, so I am getting Doctrine\DBAL\Driver\PDOException: SQLSTATE[42000]: Syntax error or access violation: 1305 SAVEPOINT trans2 does not exist when Doctrine tries to create savepoints.
Was trying hard to use SQLite, but it's not possible either, as there are some weird limitations, so I'd have to recreate my migrations (to exclude adding multiple columns to a table at once, nullable/default stuff and so on).
Is there a way for me to speed up my testsuite, so I can run it under 10s for 100 tests from my local machine?
Thank you very much!
Please or to participate in this conversation.