Menu

1 / 2

Test a committed Laravel webhook whose acknowledgement was lost

DEV Community: laravel·Ahmed Elkholy·about 3 hours ago
#5pi9BGdC
#devtolaravel#devto#dev#test#failurelab
Reading 0:00
15s threshold

The webhook committed. The sender never received the acknowledgement. Now it retries.

That is different from a handler that failed and rolled back. If you test only exceptions inside the handler, you can miss the successful-commit/uncertain-delivery boundary.

If your only test throws inside the handler, it may never exercise the successful-commit/uncertain-delivery boundary. A recovery test should state both the delivery observation and the business invariant.

I maintain Laravel FailureLab , an MIT, test-only package for named fault injection and bounded sequential replay. Its public runner is in-process, not a distributed network simulator.

Install in the test application

composer require --dev mykholy/laravel-failurelab:^1.2

Enter fullscreen mode

Exit fullscreen mode

Use PHP 8.3+, Laravel 12/13, APP_ENV=testing and disposable storage.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.