-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
When a golden test fails because the actual output didn't match the expected output (as opposed to because of a crash during the test), the output isn't very clear/legible:
It would greatly improve readability if, when this happens, the output dump that follows the error message was either omitted and replaced with a note to run
golden diff
for more details or omitted and replaced with the output of
golden diff
directly.
An idea for an approach would be to change the error message that is logged here and/or here to simplify the messages.
Also, in the case where a test fails because the actual output didn't match the expected output, the backtrace that is logged doesn't provide any additional information. One way to simplify this would be to create a custom AssertionFailureException class for golden tests that would replace the exception thrown here. This class would not print the stack trace in its constructor like TestAssertionFailure does.