Matthew Dolan
Oct 31, 2021

--

I’m a big fan of property based testing, especially as you mention for spotting some of those edge cases that are otherwise easily missed.

My only gripe with Kotest though is the built-in generators are too simplistic. Fortunately you can use KotlinFixture (https://github.com/appmattus/kotlinfixture/) with support for Kotest to easily generate most objects even when deeply nested.

The generators used are subtly different for some of the types like strings but everything is easily customisable (and reusable)

--

--

Matthew Dolan
Matthew Dolan

Written by Matthew Dolan

Matt Dolan has been eating doughnuts and developing with Android since the dark days of v1.6.

No responses yet