<@U54CM9PGS> and I have been investigating improvi...
# kotest-contributors
a
@Oliver.O and I have been investigating improving Kotest support for JS and Wasm tests (mostly focused on supporting nested testing). (mostly in this thread) TL;DR: • integrating with existing JS frameworks is hard (they just don't support fully async dynamic nested tests) • integrating with Kotlin Gradle Plugin JS tests is hard (KGP parses log messages, but the parser is overly opinionated and tightly coupled, and is internal - so depending on this would be difficult) • Good news: creating a custom JS launcher should be possible, but it requires lots of work (need a local dev server (Ktor) to host the compiled Kotlin/JS .js files, and Playwright to run browser tests). • One significant part is reporting the test results to Gradle, which requires creating a custom JUnit TestEngine, because Gradle doesn't support any other way of reporting tests. (although we could decide this isn't necessary?) @sam (or other contributors), can you help with something? I came across your message from a while ago regarding future JUnit platform integration. Is it still the idea that Kotest will stop using JUnit platform? Might that affect our plans? https://kotlinlang.slack.com/archives/CT0G9SD7Z/p1666957973023689?thread_ts=1666788639.534289&cid=CT0G9SD7Z
s
I would say not using junit is more of a wish list item. We would need our own gradle plugin to replicate the built in test plugin that gradle has. And we'd need to find a way for intellij to detect it a bit better. But it would mean that all the hacks we have to make kotest work in junit could go away.
a
okay, cool, thanks!
btw, if there was some sort of standalone Kotest executable (be it a JAR or a native process, it doesn't matter), all that would be needed to report the results to IntelliJ would be to log messages to stdout inside of a Test task.
basically, if there was a Kotest command line executable (e.g.
kotest --dir-to-scan-for-tests build/classes/kotlin --options kotest.conf
), then we could easily bypass KGP and Gradle, and report the tests to IntelliJ. However, it would be harder to integrate with the Gradle test reporting, so the Gradle test reports would be empty.