Capture test error messages where appropriate
As part of the effort to limit the output while running tests it captures the logged errors in tests that were expecting an error.
As part of the effort to limit the output while running tests it captures the logged errors in tests that were expecting an error.