Skip to content

Include more stack frames in soft assertion failures #4040

@SebastianFlothow

Description

@SebastianFlothow

Feature summary

Currently, a soft assertion failure (i.e. the message of an AssertJMultipleFailuresError) only contains the topmost stack frame of each individual failure. While this is often sufficient, there are cases where it isn't - e.g. when using a custom assertion via the softly.check(() -> ...) idiom, only the stack frame within the custom assertion method is visible, not the one from where it was called.

Therefore, please increase the number of stack frames shown, or make it configurable (e.g. through an instance method in AbstractSoftAssertions, or a static method in some suitable class).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions