Welcome to the course! In this intro episode, we kick things off by talking about testing Inertia apps with end-to-end (E2E) tests. E2E tests are awesome for making sure your app—especially ones with lots of JavaScript, like those built with Inertia—is working the way it should for your users.
We’re going to use Laravel’s official Dusk package to do this. Dusk can open a browser (either headless or visible), interact with your app just like a real user would, and make sure everything is behaving. There’s a brief chat about other testing tools like Cypress, but we’re sticking with Dusk because it plays so nicely with Laravel.
Then I give a quick demo of how these tests work, showing PHPUnit (with Pest) and Dusk running tests against a task list app. You’ll see how the test browser creates tasks, deletes tasks, and more. We'll even play around with some failing tests to see how errors show up—a sneak peek at how this all works in continuous integration with GitHub Actions (that's coming later).
Throughout the course, we’re aiming to cover about 80% of the Dusk features you’ll actually need in real life, and I promise to share tons of practical tips and Gotchas I’ve learned so you’ll write robust tests (that don’t break if you just change a button label, for example).
Finally, I’ll touch on when not to bother with E2E tests—super important! Next up: we’ll dive straight into setting up Dusk so you can follow along. Let’s go!