Improved test error reporting