Ask Claude to Write a Smoke Test That Hits Every Route and Checks for Crashes
You don't need 100% coverage to catch the worst bugs. A smoke test that visits every route and checks for non-500 responses catches broken pages, missing views, and fatal errors — the kind of things that embarrass you in production.
"Read the routes file and write a smoke test that hits every GET endpoint
and asserts no 500 errors"
Claude reads your routes, creates test cases for each one, and handles authentication where needed:
// Claude generates something like:
it('does not crash on any page', function (string $route) {
$response = $this->actingAs($user)->get($route);
expect($response->status())->not->toBe(500);
})->with([
'/' ,
'/dashboard',
'/settings/profile',
'/settings/security',
'/users',
'/orders',
]);
This catches problems that focused unit tests miss:
# Common issues smoke tests find:
# - A Blade template references a variable that doesn't exist
# - A controller action forgot to return a response
# - A middleware throws on a specific route
# - A service provider binding is broken after a refactor
# - A missing migration causes a table-not-found error
You can expand beyond just GET routes:
# Include API endpoints
"Write a smoke test for every API endpoint — GET returns 200,
POST/PUT/DELETE return 4xx without data (not 500)"
# Check specific response shapes
"For API endpoints, also verify the response is valid JSON"
# Test with different user roles
"Run the smoke test as an admin, a regular user, and a guest —
check that permissions work and nothing crashes"
Run the smoke test after every deploy, dependency update, or major refactor. It takes seconds and catches the bugs that make your whole app unusable.
A smoke test doesn't prove your app works correctly — it proves it doesn't explode. That's the minimum bar, and Claude writes it in one prompt.
via Claude Code
Log in to leave a comment.
Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.
Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.