-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception thrown in @MethodSource method results in "no tests" #2319
Comments
Well, in Eclipse at least the exception is reported in the UI. Look at the lower left corner or your screen shot. The Thus, if you want Eclipse to report the failure differently, you will need to open an ticket in the Eclipse bug tracker. I assume the same is true for Maven Surefire and that the JUnit Platform reports the exception for the If you find that JUnit Jupiter does not properly report the failure to a |
Thanks for the explanation. I created a public class MyTestExecutionListener implements TestExecutionListener {
public MyTestExecutionListener() {
System.out.println("Here");
}
@Override
public void executionFinished(TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) {
System.out.format("finished - id: %s, result: %s%n", testIdentifier, testExecutionResult);
}
} Which shows:
So to me that looks like the exception gets reported, and Surefire doesn't record it properly. I raised an issue in their JIRA: https://issues.apache.org/jira/browse/SUREFIRE-1799 |
Thanks for verifying the status quo on your end with a custom In light of that, I'm closing this issue. |
Steps to reproduce
Running the following code:
Results in:
My expectation would be that:
Additional information:
It fails the same way, being a
static
methodIt fails the same way, running the test from inside Eclipse:
Screenshot of failure in Eclipse
Context
Deliverables
The text was updated successfully, but these errors were encountered: