What happened to the kotest gradle task?
# kotest
e
What happened to the kotest gradle task?
s
Are you on 6.1?
e
Yes!
s
In your gradle file try adding kotest { custom... = true }
e
Thanks, I'll try that. I'd like to note that I can't find a page for the gradle plugin in the docs. I'd expect it to be the first hit in the search list for "gradle".
s
Hmmm I'll look at the setup docs
👍 1
See what needs to be clarified. I know it needs some work around the new features in the intellij integration
e
literally
custom...
or is there something after that? It's hard to search for.
s
No it's useCustom or something. Sorry on phone
e
I imagine it's
customGradleTask = true
but `gradle kotest`still does not work. I am running
gradle test
hoping that it will use the kotest runner.
s
I'll check into that later. The normal test task should be fine also though
e
Are you deprecating the old runner? Its output is more readable than the junit one. Should I invest in configuring junit instead?
s
Both are supported
The kotest one does have nicer output yes
But the gradle one is more "normal"
I'm looking into ways of having kotest change the output of the gradle one to get the best of both worlds
It's possible because this does it https://github.com/radarsh/gradle-test-logger-plugin
👍 1
e
if you are going to refactor that bit consider that structured output; JSON or CSV. Or do we have it?
s
Don't follow, can you explain
e
emit the results as JSON so I can parse it easily. The current output is optimized for humans.
s
Oh right
Have you looked at the xml output
e
no, that would fit the bill.
s
Gradle outputs xml by default
e
can you have the nice kotest output and xml at the same time (in one run)?
s
Yes the xml is separate
👍 1
Take a look at that test logger. It might be nicer than kotests maybe
But not sure if it supports nested tests
m
IIRC it does, but there are special modes for parallel test execution
e
What are those,
SpecExecutionMode.Concurrent
? Do you also need to configure
build.gradle.kts
to parallelize tests?
s
SpecExecutionMode.Concurrent
will launch all the tests at once, in separate coroutines, so like doing async {} around all your tests.
The gradle setting causes gradle to lunch multiple test engines each with a subset of the tests
so you can do either, both, etc