When I run phpunit testing it takes long time to complete process because of migrations and seed, so how to fix this problem ?
Instead of using DatabaseMigrations, migrate and seed your database before testing and use the DatabaseTransactions trait. This should speed it up a bit.
@RikSomers the migrations and seed commands are too slow
Is your mysql database local or on a separate machine? Any reason you're using mysql for testing instead of sqlite in memory? Do you need database migrations on every test? Are you using them selectively? Are you doing more than just schema changes in your migrations ( like data updates / api calls to hydrate data / etc )?
Any additional information would be useful. Just saying it's slow doesn't really give us much to work with. Way too many variables.
Please ask on the forums, this repo is for bug reporting only.
Most helpful comment
Instead of using DatabaseMigrations, migrate and seed your database before testing and use the
DatabaseTransactionstrait. This should speed it up a bit.