Courses

Testing in Laravel 11: Advanced Level

Too Many Failed Tests? Stop or Skip

Summary of this lesson:
- Stop tests on first failure
- Skip specific tests temporarily
- Use --stop-on-failure flag
- Implement test skipping techniques
- Compare Pest and PHPUnit skipping methods

If you have a big test suite with many errors, it can be difficult to navigate between them. I will show you a few tricks for dealing with this situation.


Example Scenario

Imagine your application has many tests, some of which fail. Where would you start?

When running all tests, you see a lot of errors, so how do you even read them? If the failing tests are in the middle, you must scroll a lot in the terminal.


Solution 1: Stop On Failure

When running the tests, you can pass...

The full lesson is only for Premium Members.
Want to access all 31 lessons of this course? (74 min read)

You also get:

  • 69 courses (majority in latest Laravel 11)
  • Premium tutorials
  • Access to repositories
  • Private Discord