question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

intellij always executes StringSpec tests

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sksamuelcommented, Jun 29, 2018

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

0reactions
jillesvangurpcommented, Jun 29, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run tests | IntelliJ IDEA Documentation - JetBrains
To run all tests in a folder, select this folder in the Project tool window and press Ctrl+Shift+F10 or select Run Tests in...
Read more >
Unable to run individual KotlinTests all of a sudden
I have a big Kotlin project with about 2500 unit tests written for KotlinTest. The project is a gradle project and I am...
Read more >
Explore test results | IntelliJ IDEA Documentation - JetBrains
Show Inline Statistics: view the execution time for tests. Suites Always on Top: always place test nodes on top of the list when...
Read more >
Executing JUnit test sometimes runs on old binaries
In 90% of all cases, IntelliJ compiles and runs the code just fine, but in the remaining 10% it "forgets" the compile step...
Read more >
Test-driven development | IntelliJ IDEA Documentation
As always, you can use IntelliJ IDEA's refactoring tools to create ... You'll run a test, see it fail (go red), implement the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found