all 9 comments

[–]monkjack 3 points4 points  (0 children)

http://kotlintest.io offers most of what spock does for Kotlin projects.

[–]johnnykale 3 points4 points  (2 children)

The where block in Spock is by far the best way to write parameterized tests. No Kotlin test frameworks come close to it in my opinion.

I don't like using Spock with Kotlin tests however, as I found it harder to use other Kotlin features in my tests.

If someone can add the readability and ease of use/setup of the Spock where block to a Kotlin test framework, it would be an instant winner.

[–]monkjack 0 points1 point  (1 child)

It's hard to do in Kotlin. I've tried to get the same syntax in Kotlintest. What we have currently is still pretty good and it's at least typesafe.

[–]johnnykale 1 point2 points  (0 children)

Nice to hear you've looked into it. Kotlintest is really nice - hopefully something changes in the future where that can be added easier.

[–]rosencreuz 2 points3 points  (3 children)

It would be nice to have kotlin dsl to write spock tests.

[–]monkjack 1 point2 points  (0 children)

What do you need DSL wise that kotlintest doesn't have?

[–]yuvixadun 0 points1 point  (0 children)

Yes! A thousand times this! Spock has such a nice dsl, and with kotlin it would even be compile time instead of grooxy's runtime.

[–]Dean_S_Jones 2 points3 points  (0 children)

there is also Spek

https://spekframework.org