Hey everyone! :wave: I wanted to share a library ...
# feed
m
Hey everyone! 👋 I wanted to share a library I recently built to reduce boilerplate when writing tests. I was getting really tired of hand-crafting massive dummy objects, breaking test isolation with shared instances, and having dozens of tests fail to compile just because I added a single field to a data class. I used tools like
kotlinfixture
and Kotest Arbs for a while, but I wanted something that was 100% pure Kotlin under the hood to perfectly handle things like Sealed Interfaces. So, I built Some. It’s a Kotlin JVM library that instantly generates fully populated test instances without any setup. You just call:
Copy code
val testObject = some<MyClass>()
...and it handles the rest (including deeply nested structures and recursive sealed classes). I just published it on GitHub and also blog post about why I built it and how it works. I'd love for you to check it out and hear any feedback! 💻 GitHub: https://github.com/MessiasLima/Some 📖 Docs: https://some.appoutlet.dev/ 📃 Blog post: https://blog.appoutlet.dev/some-a-library-to-generate-dummy-objects-for-unit-testing-in-kotlin/
👀 2
🆒 1
s
m
Sad it is abandoned 😕