Is Kotest compatible with Gradle 9.2? ```> Task :...
# kotest
c
Is Kotest compatible with Gradle 9.2?
Copy code
> Task :gradle:templates:template-app:jsBrowserTest FAILED
java.lang.IllegalStateException: :gradle:templates:template-app:jsBrowserTest exited with errors (exit code: 1)
>> Kotest
- To infinity and beyond! (with tests)
- Test plan has 1 specs

1.  HelloWorldKotestTest

>> All tests passed

Specs:   1 passed, 0 failed, 1 total
Tests:   0 passed, 0 failed, 0 ignored, 0 totalingwX64
Time:    0s

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':gradle:templates:template-app:jsBrowserTest'.
> There are test sources present and no filters are applied, but the test task did not discover any tests to execute. This is likely due to a misconfiguration. Please check your test configuration. If this is not a misconfiguration, this error can be disabled by setting the 'failOnNoDiscoveredTests' property to false.
Kotest clearly finds the test, but I guess it doesn't report it correctly to Gradle?
v
Doesn't your output say one spec but no tests, so the error is correct?
c
Ah. You're right.
👌 1
Now, the interesting part is that this specific project is copy pasted between multiple of my repositories, and in some it successfully finds the test, and in others it just finds the spec.
v
Then it is good that Gradle now fails if no tests are found despite sources being present :-)
c
Oh, I do agree it's a good thing that Gradle fails when no tests are found. The painful thing is that many things that do actually run tests don't report it correctly. But yeah in this specific case I need to find what the problem actually is.
v
Really, didn't have such cases yet. And especially it is quite trivial to write a simple JUnit Platform engine that would automatically integrate it with any valid JUnit Platform consumer like build tools, CI servers, IDEs, ... 🤷‍♂️
c
Yeah, but JUnit Platform is JVM-only. I've been battling such cases since August, it's only this week that I've been able to upgrade to Gradle 9 in my sample repository, and now I'm trying to fix the actual repos
Right. So, removing the lock file and running the test again, and then Kotest does find the test. That explains why it works in CI, at least.
Nevermind, that fixes it in one of the repositories but not in another 😐
v
Sounds like fun 😄
Yeah, but JUnit Platform is JVM-only.
Ah, hm, yeah. I mainly just think JVM, sry.
c
Welp. I just tried out the official Kotest samples:
Copy code
>> All tests passed

Specs:   4 passed, 0 failed, 4 total
Tests:   0 passed, 0 failed, 0 ignored, 0 total
Time:    0s

BUILD SUCCESSFUL in 1m 21s
39 actionable tasks: 39 executed
I think the problem is in the aggregation of tests?
However, even in that case, Gradle doesn't complain that there are no tests…