I’d like to show kotlintest to my new peer (curren...
# kotlintest
t
I’d like to show kotlintest to my new peer (currently we are using junit+assertj but I had this experience in previous company with kotlintest and like it more), however I am still having some issues with intellij plugin. for instance, I cannot run single tests, it always run the entire class (I see https://github.com/kotlintest/kotlintest-intellij-plugin/issues/23 so I guess I am not alone) and the integration with the run window (right click on a single test to re-run it or jumping from failing test to failing assertion for instance) does not work. are these problems known or should I invest some time to describe them in more details in an official github issue? to complicate things (maybe) I am on mac
w
I have this too, just got used to having to run entire test class 😕
jumping from failing test to failing assertion
You mean after clicking on the test name or stacktrace?
I’ll add to that extremely unreadable test results if a test failed: all tests in tests window are marked as failed, and I get multiple stacktraces even with just one actual test
And then if I run the same tests in Gradle, I get Gradle exceptions with tons of
Copy code
Received a failure event for test with unknown id '1.318'. Registered test ids: '[1.1, :domain:test, 1.313, 1.314]'
java.lang.IllegalArgumentException: Received a failure event for test with unknown id '1.318'. Registered test ids: '[1.1, :domain:test, 1.313, 1.314]'
errors and null pointer exceptions. And only somewhere below I get actual reason tests failed
So there are rough edges around tooling, even though APIs are ok
t
I mean clicking on the test name. and wow, I did not use kotlintest for a while and for now sticking to
StringSpec
for simplicity, did not remember the “ugly” reporting
s
There's bugs in gradle that cause this
Gradle still thinks everything is a method in a class
Trying to work around it for 4.0
But the intellij poor reporting is all KT and it's mostly fixed in 4.0 snapshots
Copy code
Received a failure event for test with unknown id '1.318'. Registered test ids: '[1.1, :domain:test, 1.313, 1.314]'
That’s a bug in KT for sure. Shouldn’t happen in 4.0 snapshots. Although 4.0 snapshot is quite ready for RC, we’re aiming for an end of Jan release candidate.
Anything where there’s one level of nesting tends to play nicer with gradle’s poor support as well.
t
that is awesome news 🙂
thank you
w
@sam do you have link for the Gradle issue somewhere? I know it’s there and I’m surprised they’ve been ignoring it for so long, seeing as JUnit5 gains popularity 😕
s
@wasyl there's several open tickets, this is just one of them, https://github.com/gradle/gradle/issues/4912
👍 1