Vivek Mittal

05/22/2023, 8:53 AM
What is the suggested approach here for unit testing for KMM project? • Plain kotlin test doesn't have strong assertion support • Kotest doesn't have an assertion library for native so it doesn't work with KMM • Atrium, not supported for Native I am targeting iOS & Android only. Most of my code is in commonMain and I plan to do tests in commonTest. Any suggestion on the library would be helpful.


05/22/2023, 9:18 AM
please up-vote or even consider to become a sponsor, would motivate me to deliver also for native 🙂


05/22/2023, 9:37 AM
I've never found the assertion support in plain Kotlin test to be that bad, it's not as fully featured as junit but it does the job

Nicolas Picon

05/22/2023, 7:19 PM
What do you mean about Kotest ? I have used Kotest Assertions in a multiplatform project targeting iOS and Android 🤔

Jeff Lockhart

05/23/2023, 12:04 AM
I ran across this library inspired by Google Truth, but haven't used it. I personally haven't had a problem using kotlin-test, plus writing occasional helper functions if I run into a corner case it doesn't support.
Here's another assertion library to check out: