If you are speaking about unit testing, I don't know of any tool to handle this.
Although, I imagine you could just make use of the onNotSuccessfulTest method, which should fire for every failed test.
Something like:
protected function onNotSuccessfulTest(\Throwable $e)
{
Mail::send('emails.testFailed', ['exception' => $e], function($message)
{
$message->to('[email protected]', 'Admin Name')->subject('Test Failed');
});
}
You can handle all the formatting for the email within the view. You could place the above code in your BaseTest class, or into a Trait which you could use only on the test files you want this functionality.
Then just set up your cron job to run the test suite.
You'd also probably want to consider adding an environment check, so you're not constantly sending out emails upon failures when writing tests.