kotest / kotest-intellij-plugin

The official Kotest plugin for Intellij and Android Studio
Apache License 2.0
175 stars 23 forks source link

Tests ran with the kotest plugin ignore unmock #235

Open matejdro opened 1 year ago

matejdro commented 1 year ago

unmock is a gradle plugin that allows using android utility classes (such as Uri, Location, TextUtils etc.) within unit tests.

Unfortunately it does not seem to work with the kotest IntelliJ plugin, kotest seems to completely ignore unmock's existence.

Steps to reproduce:

  1. Open this project with android studio
  2. Run java/com/matejdro/kotestunmock/ExampleUnitTest.kt with gradle
  3. Notice that test passes
  4. Run "Given" block inside that test with the kotest plugin

BUG: Test will fail

matejdro commented 1 year ago

Possibly related to the https://github.com/kotest/kotest-intellij-plugin/issues/178?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

matejdro commented 1 year ago

This is still relevant and a major pain point - It prevents us from running individual tests of any code that includes utility Android classes, for example Location class.

sksamuel commented 10 months ago

Yeah kotest plugin doesn't use gradle, so anything setup there won't work.

matejdro commented 10 months ago

Yeah that's why I marked #178 as related - this issue is meant as another use case for running gradle instead of IntelliJ. But we can merge them if desired.