We tried to build our own Robolectric extension (planning to contribute it back to Kotest repo) but it proved to be quite difficult to support configuration as well as Kotest features (for example isolation mode). Ultimately the issue is with JUnit5 not supporting per-test classloader (https://github.com/junit-team/junit5/issues/201) as well as with Robolectric not supporting JUnit5 (https://github.com/robolectric/robolectric/issues/3397). We decided to not write our Robolectric tests in Kotest until these two are fixed and proper, non-hacky support can be added
s
sam
10/05/2020, 10:03 AM
A four year old ticket wow
sam
10/05/2020, 10:05 AM
I looked at this once. The junit listener they use would need to be written again from scratch in kotlin
w
wasyl
10/05/2020, 10:08 AM
JUnit5 issue is in 5.8 milestone, which is the next bigger release. Hopefully they’ll be able to implement it, and Robolectric will follow