You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have never developed for android, but I am about to do some tinkering with Quest 3 apps, so I'm curious about this too.
I would expect that it would just work, but I suppose there might be some complexity with shuttling snapshot data from the simulator back to the dev environment. Can you post some info on your setup / stacktraces?
However, the member test of tasks cannot be resolved.
I can get this code to compile by using tasks.withType<Test> instead, but I don't know if that is correct, and the test still fails with Could not start Gradle Test Executor 5.
Kotest is not an option I think, because it does not support robolectric (Which is very important, as it allows running android integreation tests as normal unit tests): I found this repository, but it is archived unfortunately
This works somewhat, however, I run into trouble again when using robolectric. Robolectric requires annotating the test class with @RunWith(RobolectricTestRunner::class) and if I do that, selfie won't work on that class anymore.
That would probably be the simplest solution from a users perspective, but probably a lot of effort to write
So it seems like I can't really use this library without getting rid of robolectric :(
But thanks a lot for your comments!
Thanks for looking into these! Agreed, seems like Selfie doesn't offer a satisfactory experience for Android right now. I expect this will change soon, when we make progress on this it will get reported here.
Activity
nedtwigg commentedon Oct 11, 2024
I have never developed for android, but I am about to do some tinkering with Quest 3 apps, so I'm curious about this too.
I would expect that it would just work, but I suppose there might be some complexity with shuttling snapshot data from the simulator back to the dev environment. Can you post some info on your setup / stacktraces?
Inky-developer commentedon Oct 11, 2024
I think the main problem is that android uses junit4 by default (and I could not figure out how to make junit-vintage work).
Apart from that, the quick start guide suggests this code:
However, the member
testoftaskscannot be resolved.I can get this code to compile by using
tasks.withType<Test>instead, but I don't know if that is correct, and the test still fails withCould not start Gradle Test Executor 5.nedtwigg commentedon Oct 13, 2024
There are three paths:
selfie-runner-kotestio.kotest:kotest-runner-junit4LeoColman/kotest-androidmannodermaus/android-junit5I'm a fan of Kotest anyway, so I'll probably be using
kotest-androidandselfie-runner-kotest. Let me know if you try any of these and how it goes!Inky-developer commentedon Oct 13, 2024
@RunWith(RobolectricTestRunner::class)and if I do that, selfie won't work on that class anymore.So it seems like I can't really use this library without getting rid of robolectric :(
But thanks a lot for your comments!
nedtwigg commentedon Oct 15, 2024
Thanks for looking into these! Agreed, seems like Selfie doesn't offer a satisfactory experience for Android right now. I expect this will change soon, when we make progress on this it will get reported here.