diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.0-RC1.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.0-RC1.adoc index c3a9bdaea88f..4524496a0b36 100644 --- a/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.0-RC1.adoc +++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.10.0-RC1.adoc @@ -33,7 +33,10 @@ JUnit repository on GitHub. * New `selectMethod()` and `selectNestedMethod()` variants in `DiscoverySelectors` that accept a `Class...` argument of parameter types as a type-safe alternative to providing the names of parameter types as a comma-delimited string. - +* Stack trace pruning has been revised and now only removes calls from the `org.junit`, + `jdk.internal.reflect`, and `sun.reflect` packages. Please refer to the + <<../user-guide/index.adoc#stacktrace-pruning, User Guide>> for details. +* New `getAncestors()` method in `TestDescriptor`. [[release-notes-5.10.0-RC1-junit-jupiter]] === JUnit Jupiter diff --git a/documentation/src/docs/asciidoc/user-guide/running-tests.adoc b/documentation/src/docs/asciidoc/user-guide/running-tests.adoc index 8461b9bc7c1f..35915254fd95 100644 --- a/documentation/src/docs/asciidoc/user-guide/running-tests.adoc +++ b/documentation/src/docs/asciidoc/user-guide/running-tests.adoc @@ -1138,18 +1138,13 @@ Since version 1.10, the JUnit Platform provides built-in support for pruning sta produced by failing tests. This feature can be enabled or disabled via the `junit.platform.stacktrace.pruning.enabled` _configuration parameter_. -By default, all calls from the `org.junit`, `java`, and `jdk` packages are removed from the -stack trace. You can also configure the JUnit Platform to exclude different or additional -calls. To do this, provide a pattern for the `junit.platform.stacktrace.pruning.pattern` -_configuration parameter_ to specify which fully qualified class names should be excluded -from the stack traces. - -In addition, and independently of the provided pattern, all elements prior to and -including the first call from the JUnit Platform Launcher will be removed. - -NOTE: Since they provide necessary insights to understand a test failure, calls to -`{Assertions}` or `{Assumptions}` will never be excluded from stack traces even though -they are part of the `org.junit` package. +If enabled, all calls from the `org.junit`, `jdk.internal.reflect`, and `sun.reflect` +packages are removed from the stack trace, unless they are subsequent to the test itself +or any of its ancestors. For that reason, calls to `{Assertions}` or `{Assumptions}` will +never be excluded. + +In addition, all elements prior to and including the first call from the JUnit Platform +Launcher will be removed. [[stacktrace-pruning-pattern]] ==== Pattern Matching Syntax