Collapse ParameterizedAssertionErrors and their cause
Reported by ffff | November 29th, 2009 @ 01:47 AM
The problem markers for failing jUnit theories don't have a terribly helpful message, because the real failure is hidden in the cause of the org.junit.experimental.theories.internal.ParameterizedAssertionError. The purpose of the PEA class is to give hints to which data-point that caused the theory to fail. This information is useful as well, so I suggest that the problem marker message should the concatenation of the PEA message, a new-line and then the message from the cause.
Here is an example that demonstrates the problem:
@RunWith(Theories.class)
public class TheoryExample {
@DataPoint public static String msg = "this should not be hidden";
@Theory public void
shouldFailWith(String message) {
throw new RuntimeException(message);
}
}
Comments and changes to this ticket
-
ffff November 29th, 2009 @ 01:59 AM
- Tag set to error_markers
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Continuous Test Runner for Java
People watching this ticket
Tags
Referenced by
- 53 Customer Feedback - Christian Vest Hansen (dev license) Specifically, these bugs are annoying me: http://improvin...