Skip to content

Commit

Permalink
Update documentation and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
juliette-derancourt committed Jun 26, 2023
1 parent 1381a3d commit 42cb963
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 7 additions & 12 deletions documentation/src/docs/asciidoc/user-guide/running-tests.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 42cb963

Please sign in to comment.