You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When showFullStackTraces is true, 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.
// main/kotlin/Foo.ktclassFoo {
funmethod1(): Int {
returnthis.method2()
}
privatefunmethod2(): Int {
returnthis.divideByZero()
}
privatefundivideByZero(): Int {
return1/0
}
}
// test/kotlin/FooTest.ktclassFooTest : StringSpec({
"failing test" {
val foo = Foo()
foo.method1() shouldBe 1
}
})
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 or kotlinx.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:
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: