diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestExecutionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestExecutionListener.java index 548395c43cfa..2b8ae2dd98f5 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestExecutionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestExecutionListener.java @@ -13,6 +13,7 @@ import static org.apiguardian.api.API.Status.STABLE; import org.apiguardian.api.API; +import org.junit.platform.commons.util.UnrecoverableExceptions; import org.junit.platform.engine.TestExecutionResult; import org.junit.platform.engine.TestExecutionResult.Status; import org.junit.platform.engine.reporting.ReportEntry; @@ -30,6 +31,12 @@ * events are called in reverse order. Test case execution won't start before * all {@link #executionStarted(TestIdentifier)} calls have returned. * + *
If an exception is thrown by an implementation of a method of this + * interface, the exception will be caught and logged unless it is deemed + * {@linkplain UnrecoverableExceptions unrecoverable}. In consequence, a + * {@code TestExecutionListener} cannot cause test execution to fail or abort it + * early by throwing an exception. + * *
JUnit provides two example implementations. * *