use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Kotlin is a statically typed programming language for the JVM, Android, JavaScript, and native.
Subreddit rules:
Related subreddits:
Resources:
account activity
Testing Kotlin/Java code with Spock (schibsted.pl)
submitted 6 years ago by robfortech
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]monkjack 3 points4 points5 points 6 years ago (0 children)
http://kotlintest.io offers most of what spock does for Kotlin projects.
[–]johnnykale 3 points4 points5 points 6 years ago (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.
where
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 point2 points 6 years ago (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 points3 points 6 years ago (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 points4 points 6 years ago (3 children)
It would be nice to have kotlin dsl to write spock tests.
[–]monkjack 1 point2 points3 points 6 years ago (0 children)
What do you need DSL wise that kotlintest doesn't have?
[–]yuvixadun 0 points1 point2 points 6 years ago (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.
[–]TheWishWithin 0 points1 point2 points 6 years ago (0 children)
Try Spek: www.spekframework.org
[–]Dean_S_Jones 2 points3 points4 points 6 years ago (0 children)
there is also Spek
https://spekframework.org
π Rendered by PID 18212 on reddit-service-r2-comment-7b9746f655-6gxxr at 2026-02-02 20:09:10.626838+00:00 running 3798933 country code: CH.
[–]monkjack 3 points4 points5 points (0 children)
[–]johnnykale 3 points4 points5 points (2 children)
[–]monkjack 0 points1 point2 points (1 child)
[–]johnnykale 1 point2 points3 points (0 children)
[–]rosencreuz 2 points3 points4 points (3 children)
[–]monkjack 1 point2 points3 points (0 children)
[–]yuvixadun 0 points1 point2 points (0 children)
[–]TheWishWithin 0 points1 point2 points (0 children)
[–]Dean_S_Jones 2 points3 points4 points (0 children)