kotest / kotest-intellij-plugin

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

Test based on subclass of a spec not detected #67

Closed xiaodongw closed 4 years ago

xiaodongw commented 4 years ago

I have some tests organized by this way:

// parent class for all my integration tests
abstract class ServiceIntegrationSpec : FunSpec() {
  ...
  override fun beforeSpec(spec: Spec) {
    service.start()
  }
}

// the actual test
class XxxIntegrationSpec : ServiceIntegrationSpec() {
  init {
    test("some test") {...}
  }
}

I can run the test with Gradle without problem. When I open the XxxIntegrationSpec in Intellij, it doesn't recognize it as a test (no run menu or icon). It used to work with the old Intellij plugin (kotlin-test). I'm using kotest plugin 0.90.16, with kotest 4.1.0.259-SNAPSHOT

Obirah commented 4 years ago

Same for me with plugin version 1.0.0 and KoTest 4.1.0.RC2 - would really love to be able to get rid of redundancies with abstract specs while still being able to execute single test cases from IntelliJ.

sksamuel commented 4 years ago

Fixed in 1.0.1 which is pending jetbrains approval on the plugin store.