Hi, is the Robolectric kotest extension abandoned?
# kotest
n
Hi, is the Robolectric kotest extension abandoned?
s
I would say if @LeoColman is not maintaining it anymore, than yeah. We need someone from the community to step up.
👍 1
n
Thanks @sam
l
I'm not. Robolectric was too much to me
n
Thanks @LeoColman, Getting robolectric to work well with junit5 is already difficult on it's own. I appreciate your effort!
w
I’d say it’s pretty much impossible to have proper Robolectric support in JUnit5 right now: on one hand Robolectric only provides APIs for JUnit4, on the other JUnit5 doesn’t expose hooks for manipulating classpath for tests. So for now vintage runner + Robolectric rule is the only sane approach
s
@LeoColman would you mind updating the repo to add a note to this effect and mark the repo as archived ?
👍 1
w
(the only better alternative is to ditch Robolectric completely)
n
I almost go things working yesterday, but ran into some MainLooper issues.
thanks @wasyl, Could you please expand on vintage runner + Robolectric rule as the only sane approach?
w
It’s just the only officially supported way to run Robolectric. I was mistaken about the rule, I meant
@RunWith(AndroidJUnit4::class)
annotation for tests and writing oldschool
@org.junit.Test
tests
and if you use JUnit5 in the project, you can do that by using vintage engine I think
n
Thanks, that's exactly the setup i currently have
s
vintage engine allows you to run junit4 via junit platform yeah
n
and I wish there was a better alternative to robolectric for running android tests on a jvm, but alas. we work with the hand we're dealt
I appreciate the help fellas! have a good one
👍🏻 1