Skip to main content

Quick Tip: Run Only SPECIFIC Tests

Premium
2 min read

We have covered a lot of tests related to our product CRUD. The final tip in this section is about running the tests: what if you want to run a specific test file/method and not wait for all the tests to run?


While running php artisan test, you can specify a filter where you can provide a class name or test name.

For example, running php artisan test --filter=AuthTest will run all tests that are in the tests/Feature/AuthTest.php file.

filter auth tests

By specifying a method name, it will...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (30 h 41 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

No comments yet…

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.