Who has used Strikt? It seems quite nice from cursory usage in a few places. Would love to hear from people who have used it widely.

Its tasteful usage of language features is appealing to me. It stands in stark contrast to that other popular testing library which has 10 ways to do things and needlessly makes its functions infix or operator invoke to try and look cute.

@jw I tried both and prefer that other library 🤷‍♂️

@jw .. Although, to be fair, my greatest beef was with Spek.

Feels a bit like Google's Truth assertion library.

@streetsofboston Yep! Although it seems to solve every problem I have with Truth. Lack of good extensibility of built-in subjects. Inability to chain multiple assertions. Inability to walk down into an instance's property and perform assertions on them.

@jw tangentially related to your question but can you elaborate on what specific parts of the JUnit5 design you find to be suboptimal?

@ethauvin Yeah I've used assertk too. It's a solid choice, but it always seemed like it didn't live up to the full potential of the language. I'm still a happy customer of it. Strikt almost feels like it would be a major version revision on assertk.

@jw Totally agree. There quite a few things that irks me about AssertK which I think would be easily solved by Strikt's extensions.

@jw it looks great, 100% trying it next time I do an Android project

@grodin Yeah it seems like they need to switch their APIs up a bit. It's not clear why they accept a suspending lambda as a parameter to an inline function.

I suspect it can be fixed since they don't have a stable API yet.

@jw Hello Jake, I used Strikt for about a year in 2021. I found it and used Strikt for the soft assertions. I liked it so much that I even wrote a blogpost:

I haven't used it for the last year because in work we have KoTest .

@jw I came across this the other day and thought it might interest you:

It's basically Google Truth rewritten for KMP, using kotlin language features where useful. It seems pretty similar to strikt.

@grodin Thanks for the heads up! In practice, like Truth, it's API leaves a lot to be desired. I think AssertK does a better job for a Truth/AssertJ-like API.

HOWEVER, AssertK is lacking support for the native targets I need so I'm actually using Truthis! (for now)

@jw yeah, I thought it's API was a little thin. It's a bit of a mystery why there isn't anything in this space that's multiplatform, not overdoing the language features, but with a decent API. 🤷‍♂️

@grodin I'm working on AssertK now to bring it into every target and not just some.

Sign in to participate in the conversation

This server is a place for Jake Wharton. Are you Jake Wharton? This is your place. Are you not Jake Wharton? Well, at least you can find him here.