Support for custom TestEngine
s?
#330
-
Let me prefix this with a big 🎉 Thank you 🎊! This project rocks and works wonderfully. Great job maintaining it over the years and thanks for sharing it with the Android community! I'm interested in getting Kotest to work for Android instrumentation tests. While there is https://github.com/LeoColman/kotest-android, it doesn't check all the boxes for me:
It's all open-source, so I wanted to get my hands dirty and see if I can get it to work better. So now I'm looking into whether this plugin supports using a custom I saw #329 and am now wondering whether one could get Kotest's
In a first test, I've gotten a custom Perhaps the answer to some of my questions is "you won't be able to get Android Studio to give you the gutter icons" for some reason. That's fine and that's why I'm asking here - to gain some knowledge on this topic in case there's already some that could be shared. tl;dr: Ignoring Kotest, is there a way to get this plugin to use a custom |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Thanks for bringing up this topic! Essentially, the instrumentation test libraries provided by android-junit5 hook into the Android instrumentation (which is very much hard-wired to running on JUnit 4 only) and then launch a standard discovery process for test cases with the JUnit Platform. With the most recent advancements in #329, this discovery proess can now find any The way to show gutter icons for non-standard test frameworks seems a bit out of scope for this repo, but essentially the idea is that you'd have a pair of dependencies (in this case for Kotest) and that would be enough for the instrumentation to pick up their tests at runtime:
Note that you do need the local branch from #329 at the moment, since the current versions of the instrumentation library still disregard any non-Jupiter test. But still, that's it in a nutshell! I believe that for this specific use case, IDE integration would likely require some tweaking with the corresponding IntelliJ plugin for that framework, making it aware of what an |
Beta Was this translation helpful? Give feedback.
-
It looks like #329 was closed without merging. Are there any plans to bring back TestEngine discovery or did it not work as expected? |
Beta Was this translation helpful? Give feedback.
Thanks for bringing up this topic! Essentially, the instrumentation test libraries provided by android-junit5 hook into the Android instrumentation (which is very much hard-wired to running on JUnit 4 only) and then launch a standard discovery process for test cases with the JUnit Platform. With the most recent advancements in #329, this discovery proess can now find any
TestEngine
implementation on the runtime classpath and ask it to contribute to the overall test plan. This is how it finds JUnit Jupiter tests in theandroidTest
source set, and it would then also find stuff written with Kotest, for example.The way to show gutter icons for non-standard test frameworks seems a bit out of …