Suggestion on improvements for new users

Many a times in very structured environment before one be able to use a new language one starts by writing test to production code, this happened to me years ago when I decided to learn Groovy and I am having a Déjà vu
feeling with Kotlin.
In light of this reasoning I would like to urge to make the improvement of the documentation for the Kotlin test frameworks a priority. My experience is that the testing framework documentation is a bit lacking at the moment

1 Like

If I am not mistaken, on the JVM the test annotations available through the stdlib are just wrappers for Junit. If you know how to use it you know how to test in Kotlin. Idk for JS and Native platforms.

Furthermore you can test using directly JUnit annotations (or whatever lib you want). There are third party made libraries that ease up the code using Kotlin conciseness such as mokito-kotlin which is just another wrapper around mokito.

Well having been spoiled by the beauty and elegance of Groovy/Spockframework I find hard to write tests just using the classic JUnit style there has to be something better in Kotlin, Spek still looks unstable so this just leave KotlinTest but I find the documentation lacking …

AFAIK KotlinTest is not an official JetBrains library and is fully developed by the community. So I’m not sure that the developers see your feedback here. I don’t know it’s documentation so I can’t tell whether it’s good or bad. Maybe add an issue at their github with your feedback.

Please feel free to try GitHub - mvysny/dynatest: Simplest Most Powerful Testing Framework For Kotlin - maybe you’ll like this mini testing framework. However it doesn’t offer such semantics like Spek offers - it simply allows you to build tests and group them. However there is power in simplicity - please read the documentation and let me know if you miss anything.

1 Like

@luistrigueiros I’m trying to actively improve KT’s documentation. If you have anything you believe is not pretty over there, drop us an issue or a message in gitter.

I particularly am trying pretty hard to improve the in-code documentation, to allow an easy access to documentations in the IDE. Please tell me anything you find confusing :slight_smile:

1 Like