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
Add option to filter full stacktrace #261
Labels
Comments
@shwaka Could you create a pull request right ahead, so that other developers browsing this repository see it, too? |
Sure! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When
showFullStackTraces
istrue
, the plugin prints the whole stacktrace.But I think that most lines of the stacktrace is useless since they come from test framework (e.g. Kotest).
So I request a feature that can filter lines of a stacktrace.
Additional information
Example
(See shwaka/gradle-test-logger-issue for the complete example.)
Consider the following simple code.
This test fails since the method
divideByZero()
throws an error.Using the plugin with
showFullStackTraces = true
, the output looks like as follows:But all lines below the 7th line of the stacktrace have class names starting from
io.kotest
orkotlinx.coroutines
, which are useless for debugging.So I want to filter the stacktrace as follows:
Implementation
I have a fork shwaka/gradle-test-logger-plugin which implements the filtering feature.
Setting
filterFullStackTraces = "io\\.kotest.*"
, the plugin will filter stacktrace as in the 2nd screenshot.I'm willing to create a pull request if you like it.
The text was updated successfully, but these errors were encountered: