kotest-intellij-plugin icon indicating copy to clipboard operation
kotest-intellij-plugin copied to clipboard

KMM tests can't be run from common source set if Android is the only JVM target

Open OSemenovBoyarka opened this issue 1 year ago • 2 comments

Kotest version: 5.6.2 Kotest IntelliJ plugin version: 1.3.69-IC-2022.2 Android Studio version: 2022.2.1 Patch 2

I have a KMM project with only Android and iOS targets and I'd like to use Kotest for unit tests. The issue is whenever I create a test in a commonTest sourceset - I can't run it from the editor (run and debug buttons are grey): Screenshot 2023-06-21 at 17 16 28

If I put that same file to the androidUnitTest source set - all works good. I can run test from commandline with ./gradlew check. And I'm also able to run it by clicking Run all tests in ... package from project navigator.

Additionally is I use create test dialog on a class which is in commonMain sourceset - it creates test file in the androidUnitTest instead of commonTest.

OSemenovBoyarka avatar Jun 21 '23 14:06 OSemenovBoyarka