I did have that issue with wrong database usage, but I do not recall how I've solved it. I'm leaving this post as a reminder to myself to check that if I can remember.
Random Dusk failures, caching issue?
Hello,
I am using Laravel 6.18.14 and I'm currently facing big issues with Dusk. Sometimes the tests are not running at all, sometimes it helps to do
php artisan config:clear
php artisan cache:clear
I cannot really find a pattern in it, sometimes it works, sometimes not. I am using a Sqlite database in the database directory, the .env.dusk.local points to it and is copied before the actual test run starts as it should be. When the tests are not running, I am seeing all kinds of DB exceptions like
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table: users
in the logfile, so I assume it's a problem related to the database. Also I have the problem from time to time, that Dusk just uses my local dev DB for its testing instead of the configured Sqlite (also not nice because all data is gone then obviously). All in all it looks like some weird caching effect to me, because of its unpredictable behavior.
Has anyone seen this before and can point me to the right direction maybe?
Thanks.
Please or to participate in this conversation.