Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intellij always executes StringSpec tests #367

Closed
jillesvangurp opened this issue Jun 25, 2018 · 5 comments
Closed

intellij always executes StringSpec tests #367

jillesvangurp opened this issue Jun 25, 2018 · 5 comments

Comments

@jillesvangurp
Copy link

I have a non kotlin-test unit test (junit 5) that I'm trying to run with ctrl+shift+r. When that runs a StringSpec test that I have also executes. This is unexpected. It seems that the test runner in intellij always picks it up.

Given these two tests.

import io.kotlintest.specs.StringSpec

class FooTest : StringSpec({
    "should_not_run" {
        println("but it does")
    }
})
import org.junit.jupiter.api.Test

class BarTest {
    @Test
    fun shouldOnlyRunThis() {
        println("test")
    }
}

When I run shouldOnlyRunThis with ctrl+shift+r, FooTest (and any StringSpec tests) also execute.

@sksamuel
Copy link
Member

What versions of junit, intellij, and kotlintest are you using in your build so I can duplicate.

@jillesvangurp
Copy link
Author

Gradle 4.8 wrapper, intellij 2018.1.5, testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.6"

@sksamuel
Copy link
Member

image

It works when I select the top arrow, but not when I select the test name arrow. I assume you are getting the same behaviour? If so, I can fix.

@jillesvangurp
Copy link
Author

Yes confirmed. It seems to run all StringSpec tests in the project when you run the test method but not when you run the class.

@sksamuel
Copy link
Member

Thanks, fixed in master. I'll be releasing 3.1.8 shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants