Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

Keep your testing database separate from development

Understanding how phpunit.xml works opens up many possibilities

Joel Clermont
Joel Clermont
2025-10-31

From our daily Laravel tips email. Get the next one in your inbox.

In a previous video, I shared how to efficiently seed your database while running tests.

Someone asked me "How can I do this, but not lose all my other data?"

In today's video, I show how to easily configure your tests to use a separate database from your local development database.

This is something I do on every single project, and I think you'll find it a nice improvement for your projects as well.

Watch Now (4 min)

And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.

Here to help,

Joel

P.S. Testing is a core pillar of my Laravel development principles. Would you like to learn how to become proficient with Laravel testing?

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.